RFR (XS) 8202014: Possible to receive signal before signal semaphore created

Thomas Stüfe thomas.stuefe at gmail.com
Wed May 16 06:04:34 UTC 2018


I agree with David. Signal handlers are installed in os::init_2(), but
the semaphore sometime later in the (imho misleadingly named) void
os::signal_init(). This looks like an initialization error.

As a side note, can we make the "void signalHandler(int sig,
siginfo_t* info, void* uc)" functions in os_xxx.cpp static, since they
are only file local marshalling points?

Kind Regards, Thomas

On Wed, May 16, 2018 at 4:40 AM, David Holmes <david.holmes at oracle.com> wrote:
> Hi Coleen,
> On 16/05/2018 11:23 AM, coleen.phillimore at oracle.com wrote:
>> Summary: Don't assert for null semaphore because it can be null before
>> initialization is complete.
> Sorry I don't agree with this. Surely we should not install our signal
> handler until such time as everything is properly initialized? Or the
> handler itself should have some kind of initialization check to guide how it
> responds.
> Thanks,
> David
>> Tested this with a shell script, thanks Robbin, and mach5 tier1,2 all
>> Oracle platforms.  AIX doesn't use the semaphore class so doesn't have this
>> bug.
>> open webrev at http://cr.openjdk.java.net/~coleenp/8202014.01/webrev
>> bug link https://bugs.openjdk.java.net/browse/JDK-8202014
>> Thanks,
>> Coleen

More information about the hotspot-runtime-dev mailing list