[crac] RFR: Linux file system watcher support
joeylee
duke at openjdk.org
Mon May 15 13:37:19 UTC 2023
On Mon, 15 May 2023 07:07:53 GMT, Radim Vansa <duke at openjdk.org> wrote:
>> inotify monitors changes on filesystem, this support automatic restore for LinuxFileWatcher.
>>
>> FileWatcherAfterRestoreTest verifies watcher service works after restore.
>> FileWatcherTest verifies automatic closing inotiify fd
>>
>> The watcher keys are still managed by user, so exception will be thrown if no watcher keys are leaked, as in FileWatcherWithOpenKeysTest
>
> Thanks for the contribution!
>
> I wonder if you have an example of code where it's useful to automatically suspend the service but leave `WatchKey` management up to the user. To me this would be either fully transparent or fully managed, breaking the cycle that polls the events and closing the service as well.
@rvansa Thanks for your comments, I working on my patch based on these recommendations.
I noticed a occasional crash in FileWatcherAfterRestoreTest when restore the Process from dump. As in [github action check](https://github.com/joeyleeeeeee97/crac/actions/runs/4971753576/jobs/8896779795).
It crashes on where main thread is exiting, this is the [crash log](https://gist.github.com/joeyleeeeeee97/42711c35e02b0d2c530bad22aa2c5dd0).
I could reproduce it locally with `hile ~/jtreg/jtreg/bin/jtreg -v ./test/jdk/jdk/crac/fileDescriptors/FileWatcherAfterRestoreTest.java; do :; done` and `/home/ubuntu/jdk/build/linux-x86_64-server-release/images/jdk/bin/java -XX:CRaCRestoreFrom=cr`.
Could I get some inputs on where my updates might caused the crash? Or could it be a separate issue?
-------------
PR Comment: https://git.openjdk.org/crac/pull/72#issuecomment-1547870645
More information about the crac-dev
mailing list