9

While running unit tests for some code that interacts with temporary files in JRuby, I sometimes get the following:

Exception: java.lang.ThreadDeath thrown from the UncaughtExceptionHandler in thread "Thread-6395"

It doesn't seem to cause any problems, but what's going on, and how can I determine where it's occurring? I tried turning on -d, but that didn't give me a stack trace for the exception.

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
  • Don't know the answer, but the thread that died was "Thread-6395". I think threads are numbered sequentially from 0 or 1, so this is a high number. Is something creating more threads than it should? Can you find out how many threads are running at any given time and make sure it's within a reasonable range for your system? – Keith Bennett Nov 22 '12 at 08:32
  • If you have any "user-space" workaround I'd be really grateful. – inger Jan 31 '14 at 14:22

1 Answers1

6

FWIW: This could be related to http://jira.codehaus.org/browse/JRUBY-7074 .

I'm seeing this Thread-Death output occasionally with a JRuby programm that doesn't use backticks, but calls system.

Anonymous
  • 76
  • 1
  • 2
  • If you have any "user-space" workaround (either ruby or java) I'd be really grateful if you could share. Can I just catch the ThreadDeath around the shell call? – inger Jan 31 '14 at 14:24