Managing sun.nio.ch.Poller with CRaC

Alan Bateman Alan.Bateman at oracle.com
Tue Apr 16 06:27:49 UTC 2024


On 15/04/2024 22:32, Cleber Muramoto wrote:
> Hello!
>
> I am trying to take a checkpoint using zulu's CRaC.
>
> When using VirtualThreads the checkpoint fails because of open file 
> descriptors created by EPollPoller.
>
> As of now, I think the only possible way to close the FD's is by 
> accessing the private read/write pollers to fetch the epfd's and 
> manually closing them. (I tried the jdk.crac.resource-policies but it 
> doesn't seem to pick up these FDs).
>
> While this works to capture the snapshot, restoring is another story, 
> since the poller threads don't expect the epfds to change.
>
> Are there any plans to add some sort of lifecycle api to Poller to 
> make it CRaC friendly?

I assume this must be a build that uses code from the OpenJDK CRaC 
project as this is not a feature in the JDK main line. You may have to 
ask on crac-dev. There are literally dozens of places right across the 
JDK that would need attention in order to sanely snapshot and continue 
from arbitrary points like this. I haven't had cycles to track what they 
have in the current exploration/prototype but I'm sure the folks on 
crac-dev can help.

-Alan


More information about the loom-dev mailing list