[m-rev.] diff: Fix a deadlock in the Java worker thread implementation
jfischer at opturion.com
Tue Apr 12 15:12:32 AEST 2016
On Tue, 12 Apr 2016, Paul Bone wrote:
> Fix a deadlock in the Java worker thread implementation
> I noticed this bug when accidentally throwing a Mercury exception containing
> some malformed Mercury data (a Java null pointer). The Java worker thread
> tried to report the exception, by calling back into Mercury but this
> encountered a null pointer exception itself due to the bad data and failed
> to de-register itself from the thread pool. This caused the thread pool to
> mistakingly think that a thread was still alive and it failed to terminate
> the program.
> The solution is tu ensure that the pool knows the thread has shutdown if any
> exception occurs.
> This bug isn't likely to occur in practice, throwing exceptions whose
> message is null is unusual.
While you are looking at that, have you had a chance to look at
More information about the reviews