RFR(S): 8194482: Fix SIGSEGV in print_threads_compiling.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR(S): 8194482: Fix SIGSEGV in print_threads_compiling.

Lindenmaier, Goetz
Hi,

print_threads_compiling prints the tasks compiler threads are working on.
It gets the task from the thread, checks it for NULL, and then reads the task again from the
thread. in the meantime, the compiler thread can set the task back to
NULL so that the check was pointless.

The task must be read only once.  The field _task must be volatile, so that
the C-compiler can't re-introduce the read.  

Please review this change. I please need a sponsor. I think this should be fixed
in 10.
http://cr.openjdk.java.net/~goetz/wr18/8194482-fixPrintCompThr/webrev.01/

Best regards,
  Goetz.
Reply | Threaded
Open this post in threaded view
|

Re: RFR(S): 8194482: Fix SIGSEGV in print_threads_compiling.

Vladimir Kozlov
Looks good.

I will sponsor it and push into JDK 10.

Thanks,
Vladimir

On 1/3/18 4:37 AM, Lindenmaier, Goetz wrote:

> Hi,
>
> print_threads_compiling prints the tasks compiler threads are working on.
> It gets the task from the thread, checks it for NULL, and then reads the task again from the
> thread. in the meantime, the compiler thread can set the task back to
> NULL so that the check was pointless.
>
> The task must be read only once.  The field _task must be volatile, so that
> the C-compiler can't re-introduce the read.
>
> Please review this change. I please need a sponsor. I think this should be fixed
> in 10.
> http://cr.openjdk.java.net/~goetz/wr18/8194482-fixPrintCompThr/webrev.01/
>
> Best regards,
>    Goetz.
>
Reply | Threaded
Open this post in threaded view
|

RE: RFR(S): 8194482: Fix SIGSEGV in print_threads_compiling.

Lindenmaier, Goetz
Hi Vladimir,

thanks for reviewing and sponsoring this change!  

Best regards,
  Goetz.

> -----Original Message-----
> From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-
> [hidden email]] On Behalf Of Vladimir Kozlov
> Sent: Mittwoch, 3. Januar 2018 23:42
> To: [hidden email]
> Subject: Re: RFR(S): 8194482: Fix SIGSEGV in print_threads_compiling.
>
> Looks good.
>
> I will sponsor it and push into JDK 10.
>
> Thanks,
> Vladimir
>
> On 1/3/18 4:37 AM, Lindenmaier, Goetz wrote:
> > Hi,
> >
> > print_threads_compiling prints the tasks compiler threads are working on.
> > It gets the task from the thread, checks it for NULL, and then reads the task
> again from the
> > thread. in the meantime, the compiler thread can set the task back to
> > NULL so that the check was pointless.
> >
> > The task must be read only once.  The field _task must be volatile, so that
> > the C-compiler can't re-introduce the read.
> >
> > Please review this change. I please need a sponsor. I think this should be
> fixed
> > in 10.
> > http://cr.openjdk.java.net/~goetz/wr18/8194482-
> fixPrintCompThr/webrev.01/
> >
> > Best regards,
> >    Goetz.
> >