RFR: 8359820: Improve handshake/safepoint timeout diagnostic messages [v3]
Anton Artemov
duke at openjdk.org
Fri Jul 18 15:10:35 UTC 2025
On Fri, 18 Jul 2025 13:22:02 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> Was (A) the winner, and it started error handling? And you maybe saw a "Thread XXX also had an error" line from the sending thread?
Yes, the slow thread started reporting, and I think I also observed the latter message as well. Note that the fatal error is still processed in the end of the timeout handler, but not reported by VMError, as it can report only one such error.
So yes, we want to improve the reporting for case A: when a slow thread receives a SIGILL and dies being able to handle the error, we want to know if SIGILL came from handshake/safepoint timeout and print extra info if that is the case.
> To help with this case, I suggest a simple addition in handshake.cpp:
Thanks, added to the latest change.
> Yes, it could happen. The mechanism could be improved by storing the fact that a SIGILL has been sent to thread X not in a global variable but in the `Thread` structure of X. Then, in VMError, one checks if the current thread had been the target of a recent pthread_kill, and only write "sent by xxx" in that case. I ignore here the possible case of multiple senders one receiver, because I think that is extremely unlikely.
I think this would be a more invasive change, we can do it when there is a real need.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26309#issuecomment-3089786756
More information about the hotspot-runtime-dev
mailing list