8031126 java/lang/management/ThreadMXBean/ThreadUserTime.java fails intermittently

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Wed Apr 30 07:54:15 UTC 2014

Hi Staffan,

sorry for introducing this bug!  I obviously oversaw the 'static' at the variable declaration.

Thanks for fixing this,

-----Original Message-----
From: hotspot-runtime-dev [mailto:hotspot-runtime-dev-bounces at openjdk.java.net] On Behalf Of Staffan Larsen
Sent: Dienstag, 29. April 2014 16:21
To: hotspot-runtime-dev
Subject: RFR: 8031126 java/lang/management/ThreadMXBean/ThreadUserTime.java fails intermittently

When JDK-8036122 "Fix warning "format not a string literal"" was fixed, the fix introduced a regression in 
os_linux.cpp:slow_thread_cpu_time(). There is a static variable in the method with a format string. The format string was set to different value if NTPL was used. This check was only done once. After the fix, the incorrect format string is used on NPTL for all but the first call.

Since all our linux variants use NPTL now, I suggest a simple fix that has only one format string.

webrev: http://cr.openjdk.java.net/~sla/8031126/webrev.00/
bug: https://bugs.openjdk.java.net/browse/JDK-8031126


More information about the hotspot-runtime-dev mailing list