[crac] RFR: Ensure all notifications finish even if only daemon threads remain [v6]
Anton Kozlov
akozlov at openjdk.org
Thu May 18 15:38:38 UTC 2023
> If as a result of beforeCheckpoint() no more non-daemon threads remain, it's possible that VM exits prematurely, before one of afterRestore() get a chance to create another non-daemon thread that will keep VM alive. Triggering checkpoint via jcmd (so checkpointRestore() method is executed on daemon attach-listener thread), increases probability to step in the problem.
>
> The change ensures all notifications are done while there is at least one non-daemon thread. The notification methods are still called from the original thread.
Anton Kozlov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits:
- Fix test build
- Merge remote-tracking branch 'jdk/crac/crac' into daemon-after-restore
- Move KeepAlive to separate class, handle interrupts
- Cleanup
- Fix recursiveCheckpoint test
- Test update
- Fix copyright
- Notify on the original thread
- Ensure all notifications finish even if only daemon threads remain
-------------
Changes: https://git.openjdk.org/crac/pull/62/files
Webrev: https://webrevs.openjdk.org/?repo=crac&pr=62&range=05
Stats: 203 lines in 4 files changed: 188 ins; 7 del; 8 mod
Patch: https://git.openjdk.org/crac/pull/62.diff
Fetch: git fetch https://git.openjdk.org/crac.git pull/62/head:pull/62
PR: https://git.openjdk.org/crac/pull/62
More information about the crac-dev
mailing list