<AWT Dev> VM shutdown upon X server termination

Maxim Kartashev maxim.kartashev at jetbrains.com
Mon Jun 7 18:21:24 UTC 2021

When the X server suddenly dies, Xlib would usually (or maybe always)
discover this as an I/O error. It will then call the function installed
with XSetIOErrorHandler() and expects that the function will not return
("the called routine should not return" from
If the handler returns, Xlib will simply call ::exit().

AWT installs awt_GraphicsEnv.c`xioerror_handler() as such a function and it
_does_ return. I was wondering if it would be prudent to properly terminate
VM from the handler (with JVM_Halt(), perhaps)? We are getting many reports
of JVM crashes on Linux that seem to be connected with the sudden
disappearance of the X server, but I wasn't able to reproduce this so can't
be sure that this is the issue we are facing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20210607/aef1a10b/attachment-0001.htm>

More information about the awt-dev mailing list