Skip to content

Commit 4764594

Browse files
committed
Immediately print internal exceptions in a non-main thread, in case they would cause a deadlock
(cherry picked from commit f1a6367)
1 parent 60f72d8 commit 4764594

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/truffleruby/core/thread/ThreadManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ private void threadMain(RubyThread thread, Node currentNode, Supplier<Object> ta
315315
final String message = StringUtils
316316
.format("%s terminated with internal error:", Thread.currentThread().getName());
317317
final RuntimeException runtimeException = new RuntimeException(message, e);
318+
// Immediately print internal exceptions, in case they would cause a deadlock
319+
runtimeException.printStackTrace();
318320
rethrowOnMainThread(currentNode, runtimeException);
319321
setThreadValue(context, thread, Nil.INSTANCE);
320322
} finally {

0 commit comments

Comments
 (0)