[m-rev.] diff: Fix a deadlock in the Java worker thread implementation
Paul Bone
paul at bone.id.au
Tue Apr 12 15:32:25 AEST 2016
On Tue, Apr 12, 2016 at 03:12:32PM +1000, Julien Fischer wrote:
>
>
> 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
> <https://bugs.mercurylang.org/view.php?id=406>?
I hadn't noticed that one.
Right now I'm going back to the two previous problems I was trying to solve
and maybe look at this one in a week or so.
Cheers.
--
Paul Bone
More information about the reviews
mailing list