RFR(xs): 8187028: [aix] Real thread stack size may be up to 64K smaller than requested one

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Tue Sep 5 10:58:05 UTC 2017


Hi Thomas, 

thanks for fixing this. Looks good.

Best regards,
  Goetz.

> -----Original Message-----
> From: Thomas Stüfe [mailto:thomas.stuefe at gmail.com]
> Sent: Dienstag, 5. September 2017 11:29
> To: Volker Simonis <volker.simonis at gmail.com>; Lindenmaier, Goetz
> <goetz.lindenmaier at sap.com>
> Cc: ppc-aix-port-dev at openjdk.java.net; HotSpot Open Source Developers
> <hotspot-dev at openjdk.java.net>
> Subject: Re: RFR(xs): 8187028: [aix] Real thread stack size may be up to 64K
> smaller than requested one
> 
> Hi Guys,
> 
> New webrev:
> http://cr.openjdk.java.net/~stuefe/webrevs/8187028-aix-Real-thread-stack-
> size-may-be-up-to-64K-smaller-than-requested-one/webrev.02/webrev/
> 
> 
> Nothing changed for the fix, But I added a fix to a whitebox test which broke
> due to the fix.
> 
> runtime/whitebox/WBStackSize.java tests that the actual stack size a thread
> receives correlates closely to the requested stack size, and that test had to
> be loosened for AIX.
> 
> Kind Regards, Thomas
> 
> 
> On Thu, Aug 31, 2017 at 12:08 PM, Thomas Stüfe <thomas.stuefe at gmail.com
> <mailto:thomas.stuefe at gmail.com> > wrote:
> 
> 
> 	Hi all,
> 
> 	please review this change:
> 
> 	Bug:
> 	https://bugs.openjdk.java.net/browse/JDK-8187028
> <https://bugs.openjdk.java.net/browse/JDK-8187028>
> 
> 
> 	change:
> 	http://cr.openjdk.java.net/~stuefe/webrevs/8187028-aix-Real-
> thread-stack-size-may-be-up-to-64K-smaller-than-requested-
> one/webrev.00/webrev/
> <http://cr.openjdk.java.net/~stuefe/webrevs/8187028-aix-Real-thread-
> stack-size-may-be-up-to-64K-smaller-than-requested-
> one/webrev.00/webrev/>
> 
> 	The issue is that on AIX, pthread library seems to have a bug where it
> sometimes gives us less thread stack space than we requested (a variable
> amount, but seems to be 0..64K). This may cause intermittent stack overflow
> errors if the stacks are very small to begin with.
> 
> 	The workaround is to add 64K to the requested stack size to account
> for the fact that the OS may give us up to 64K less stack.
> 
> 	Also, improved logging.
> 
> 	Thanks, Thomas
> 



More information about the hotspot-dev mailing list