RFR(S) 8239449: [TESTBUG] test/hotspot/jtreg/runtime/TLS/TestTLS.java: skip test if glibc too old for AdjustStackSizeForTLS

Reingruber, Richard richard.reingruber at sap.com
Wed Feb 19 13:45:26 UTC 2020


Hi David,

  > > 
  > > On linux systems with older glibc versions (e.g. 2.11) the option -XX:+AdjustStackSizeForTLS
  > > has no effect, because the private function __pthread_get_minstack is not provided, and the
  > > test fails. With the fix the test is skipped instead.
  > 
  > How old is glibc 2.11?
  > 

About 10y. Seems it was released 2009-11-03 [1]. It is used in SLES 11 SP4.
Unfortunately I don't know, when __pthread_get_minstack was added to glibc.

  > Is it not simpler for the test to try to dlsym the function itself to 
  > see if it exists?
  > 

I've done something similar before. I checked for the phrase "Lookup of __pthread_get_minstack
failed", but that has the disadvantage that the test would not fail if __pthread_get_minstack gets
removed in a future glibc version.

Thanks, Richard.

[1] https://sourceware.org/glibc/wiki/Glibc%20Timeline

-----Original Message-----
From: David Holmes <david.holmes at oracle.com> 
Sent: Mittwoch, 19. Februar 2020 14:15
To: Reingruber, Richard <richard.reingruber at sap.com>; hotspot-dev at openjdk.java.net; hotspot-runtime-dev at openjdk.java.net
Subject: Re: RFR(S) 8239449: [TESTBUG] test/hotspot/jtreg/runtime/TLS/TestTLS.java: skip test if glibc too old for AdjustStackSizeForTLS

Hi Richard,

On 19/02/2020 8:44 pm, Reingruber, Richard wrote:
> Hi,
> 
> please review this small test fix
> 
> Webrev: http://cr.openjdk.java.net/~rrich/webrevs/8239449/webrev.0/
> Bug:    https://bugs.openjdk.java.net/browse/JDK-8239449
> 
> On linux systems with older glibc versions (e.g. 2.11) the option -XX:+AdjustStackSizeForTLS has no effect, because the private function __pthread_get_minstack is not provided, and the test fails. With the fix the test is skipped instead.

How old is glibc 2.11?

Is it not simpler for the test to try to dlsym the function itself to 
see if it exists?

Thanks,
David

> Thanks, Richard.
> 


More information about the hotspot-runtime-dev mailing list