-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thread interrupts permanently break the HostClassLoader #3273
Comments
Tracked internally at GR-30019 |
Thanks for the report. We want to move away from using Thread.interrupt for interruption in general in 21.2. Until then we can maybe handle interrupt more gracefully. |
We think we have already fixed this in latest. |
Initial news is positive. The above reproducer does indeed appear to be fixed and behave as expected on 21.1.0-dev-20210324_0142. Before calling this truly fixed, however, I need to see if the problem as we encountered it in Enso is fixed. Expect updates in a day or so. |
To be able to build our project, we also need the variant of Is it possible to somehow get this JAR variant? Or maybe it's possible to just somehow patch the Unfortunately, |
Alrighty, a bunch of |
Fixed by 9e83f61 in the graalvm-21.1. |
Describe GraalVM and your environment :
java -Xinternalversion
:Have you verified this issue still happens when using the latest snapshot?
You can find snapshot builds here: https://github.com/graalvm/graalvm-ce-dev-builds/releases
No
Describe the issue
Using host interop in the presence of thread interrupts may break host interop forever.
The
HostClassLoader
seems to enter an unrecoverably broken state when a thread interrupt happens.This is very concerning, as it suggests that it is unsafe to use thread interrupts with Truffle, as we have no guarantee
as to when the classloader is running.
Code snippet or code repository that reproduces the issue
Very minimal (albeit impractical) example (it uses
icu4j
, but I assume other jars would be equally problematic):Steps to reproduce the issue
Run the code above (possibly changing the JAR added to host classpath).
Expected behavior
The second call to
fn.execute(cls)
should succeed.Additional context
Notice that the first call to
fn.execute(cls)
fails withNoClassDefFoundError
, with the root cause beingThat seems OK – the thread was interrupted, failures are to be expected.
However, the second (and any further) call to
fn.execute(cls)
fails with aNoClassDefFoundError
, with the root cause:Which suggests that the class loader has entered some broken state.
The text was updated successfully, but these errors were encountered: