RFR(S): 8186293: [aix] Fix thread creation with huge stack sizes
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Thu Aug 17 06:52:48 UTC 2017
Hi David,
> I wonder whether a fatal error "Error occurred during initialization of
> VM" would not be better than just logging a warning?
I skip thread creation if the error code is != 0 and return false as it
happens on linux. So you see the exact same behavior. Only I
print the additional message about the stack size because that
is missing from the pthread attr which is reported (as setting it
failed).
I removed the reference to linux, although I find it useful to
point out such unexpected differences.
http://cr.openjdk.java.net/~goetz/wr17/8186293-aixHugeStack/webrev.02/
Best regards,
Goetz.
> -----Original Message-----
> From: David Holmes [mailto:david.holmes at oracle.com]
> Sent: Wednesday, August 16, 2017 10:54 PM
> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; hotspot-runtime-
> dev at openjdk.java.net
> Subject: Re: RFR(S): 8186293: [aix] Fix thread creation with huge stack sizes
>
> On 17/08/2017 12:24 AM, Lindenmaier, Goetz wrote:
> > Hi,
> >
> > TestOptionWithRanges causes the vm on aix to crash on some machines.
> > This is because huge stack sizes are not treated properly.
> >
> > On linux, pthread_attr_setstacksize succeeds if called with huge values, but
> > pthread_create() then fails. On Aix, pthread_attr_setstacksize fails if
> > passed a value exceeding the limits and leaves the minimal system
>
> The AIX behaviour is more in spirit with POSIX.
>
> > thread stack size in attr. Thus thread creation succeeds and leads to
> > crashes after thread creation when the guard pages shall be protected
> > but don't fit on the tiny stack created.
> >
> > Please review this small, aix-only change.
> > http://cr.openjdk.java.net/~goetz/wr17/8186293-
> aixHugeStack/webrev.01/
>
> I wonder whether a fatal error "Error occurred during initialization of
> VM" would not be better than just logging a warning?
>
> As Thomas notes, no need to discuss/describe what may or may not happen
> on other platforms.
>
> Cheers,
> David
>
> > Best regards,
> > Goetz.
> >
More information about the hotspot-runtime-dev
mailing list