This message was deleted.
# community-support
s
This message was deleted.
w
Hmm.. What do you mean by rolled back? What is F2FS?
h
F2FS: the kind of filesystem, not EXT4, nor BTRFS, see https://wikipedia.org/wiki/F2FS
rolled back: the java process sees the directory as cleared, but it's not and the files are still there when gradle exits.
w
What happens if you run the build with
--no-watch-fs
? Same behavior?
h
Same behavior than without options.
Only
--no-daemon
makes it work as expected.
Basically my task populates a directory after clearing it. The populating works, but not the clearing, and I end up with old and new files in the directory.
w
That is very strange. And on
ext4
this works?
h
Give me some minutes to try that.
It does!
So something in F2FS breaks the virtual-fs of gradle, should I report that somewhere ?
w
Since
--no-watch-fs
doesn’t work either, that doesn’t seem to be related to the virtual file system in Gradle. Does
--info
or
--debug
show some interesting things?
h
My fs is listed:
2022-04-04T18:32:51.720+0200 [DEBUG] [org.gradle.internal.watch.vfs.impl.DefaultWatchableFileSystemDetector] Detected f2fs: /home from /dev/nvme0n1p4 (remote: false)
Ah, maybe something interesting:
2022-04-04T18:32:50.668+0200 [DEBUG] [org.gradle.internal.vfs.impl.AbstractVirtualFileSystem] Invalidating VFS paths: [/home/java/javafx-sample/build/native]
That is the offending directory.
w
I don’t see why
--no-daemon
would make a difference.
g
Maybe you have terminal or gradle daemon holding some file open in offending path. Linux really deletes stuff only when file is closed and process is dead
You can try
lsof
to find if it's the case
h
lsof shows the gradle daemon having the files in the directory opened, that's all.
Linux does physically deletes the file when no more process access it, but the files should not be listed anyway in
ls
if it was the reason, I believe.
--info
prints:
Copy code
Not watching /home/java/javafx-sample since the file system is not supported
Watching the file system is configured to be enabled if available
File system watching is active
If that may help: the directory is marked as
@OutputDirectory
, if I replace the annotation with
@Internal
, it works
oops, sorry, forget this, it doesn't work either.
Raah... now it fails on ext4 too. The only situation where it works for sure is with
--no-daemon
All happen as if the daemon vfs didn't record the deletion and the files pop back when it syncs with the concrete fs
Sorry, I misled you. The problem seems finally related to the fact that the files in the directory are native libraries, loaded from the build script, in specific class loaders, but when using the daemon the class loaders linger in the daemon (before being GC one day) and the native libraries stay loaded.
When running with
--no-daemon
the libs are unloaded when the JVM dies. Not sure how to solve this though.