JDK-7048308 : LoggingDeadlock3 test timeout is too small
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.logging
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-05-25
  • Updated: 2013-08-07
  • Resolved: 2011-07-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b01Fixed
Related Reports
Relates :  
Relates :  
Description
I observed a timeout in the following test during my JDK7-B143
baseline test on Solaris X86:

    java/util/logging/LoggingDeadlock3.java

The fix for the following bug:

    7041595 4/4 add lost test for 6487638

added the test.

This test has a timeout value of 15 which is too short.

I ran the test in a loop on my Solaris X86 test machine:

1005 2011.05.25 11:50:56 $ uname -a
SunOS frankenputer 5.10 Generic_141445-09 i86pc i386 i86pc

1006 2011.05.25 11:54:31 $ psrinfo -v
Status of virtual processor 0 as of: 05/25/2011 11:54:35
  on-line since 05/06/2011 07:31:49.
  The i386 processor operates at 2800 MHz,
        and has an i387 compatible floating point processor.
Status of virtual processor 1 as of: 05/25/2011 11:54:35
  on-line since 05/06/2011 07:32:12.
  The i386 processor operates at 2800 MHz,
        and has an i387 compatible floating point processor.

I let the loop run for 25000 iterations (almost 46 hours)
while frankenputer did its normal work (mirror downloads,
repo updates, builds...)

Here are the stats:

ksh do_analysis.ksh
total sample cnt: 25001
min value: 0.97
max value: 18.91
avg value: 1.56
<=  5 seconds: 24674
<= 10 seconds: 289
>  10 seconds: 38

Normally I use 4X the average for a timout, but that
clearly won't work in this case.

I think I'm going to go with 4X the max and round up
to 80 seconds. That should account for running the
test on slower machines.

I think the default is 120 seconds so 80 is still better...

Comments
EVALUATION http://hg.openjdk.java.net/jdk8/tl/jdk/rev/0da0a4d22fba
02-06-2011

SUGGESTED FIX Here is the context diff for the proposed fix: diff -r b8bcb12acea6 test/java/util/logging/LoggingDeadlock3.java --- a/test/java/util/logging/LoggingDeadlock3.java Fri May 27 09:01:33 2011 +0800 +++ b/test/java/util/logging/LoggingDeadlock3.java Wed Jun 01 15:11:11 2011 -0700 @@ -27,7 +27,7 @@ * @summary Calling LogManager.addLogger() and Logger.getLogger() cause deadlock * @author Serguei Spitsyn * @build LoggingDeadlock3 - * @run main/timeout=15 LoggingDeadlock3 + * @run main/timeout=80 LoggingDeadlock3 */ import java.io.*;
01-06-2011

EVALUATION See the description.
25-05-2011