JDK-8263382 : java/util/logging/ParentLoggersTest.java failed with "checkLoggers: getLoggerNames() returned unexpected loggers"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.logging
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2021-03-10
  • Updated: 2025-01-24
  • Resolved: 2021-05-13
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 11 JDK 17 JDK 8 Other
11.0.13-oracleFixed 17 b23Fixed 8u311Fixed openjdk8u312Fixed
Related Reports
Relates :  
Description
The following test failed in an Adhoc Mach5 job:

java/util/logging/ParentLoggersTest.java

Here's a snippet from the log file:

----------System.out:(18/569)----------

[, abc.xyz.foo, global, myParentLogger.myLogger, abc.xyz.foo.myBar.myLogger]

# checkLoggers: getLoggerNames() returned unexpected loggers
# expected logger names (6):
 expNames[0] = 
 expNames[1] = global
 expNames[2] = myParentLogger
 expNames[3] = myParentLogger.myLogger
 expNames[4] = abc.xyz.foo
 expNames[5] = abc.xyz.foo.myBar.myLogger
# returned logger names (5):
  retNames[0] = 
  retNames[1] = abc.xyz.foo
  retNames[2] = global
  retNames[3] = myParentLogger.myLogger
  retNames[4] = abc.xyz.foo.myBar.myLogger
ParentLoggersTest: failed
----------System.err:(12/719)----------
java.lang.Exception: ParentLoggersTest: failed
	at ParentLoggersTest.main(ParentLoggersTest.java:92)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.base/java.lang.Thread.run(Thread.java:831)

JavaTest Message: Test threw exception: java.lang.Exception
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.Exception: ParentLoggersTest: failed

My Adhoc Mach5 job only contain new tests in another area.
See JDK-8262881 for details.

The repo that I'm using has the tip/HEAD at:

commit b7f0b3fc8b556b352fd7593ca674ab8e562c709a
Author: Harold Seigel <hseigel@openjdk.org>
Date:   Tue Mar 9 13:15:39 2021 +0000

    8252173: Use handles instead of jobjects in modules.cpp
    
    Reviewed-by: lfoltan, coleenp

so it's a very recent repo instead of my usual last snapshot style.

The JVM args for the test task are: -XX:-UseCompressedOops
Comments
Fix Request (8u) I would like to backport this patch openjdk8u for parity with Oracle 8u311. The original patch applies cleanly and test passed.
22-06-2021

Changeset: 08a5a5c6 Author: Daniel Fuchs <dfuchs@openjdk.org> Date: 2021-05-13 08:54:24 +0000 URL: https://git.openjdk.java.net/jdk/commit/08a5a5c6d64db51700d058954d115aa89dbe73be
13-05-2021

This test should better be run in /otherVM mode. 1. It sets the java.util.logging.config.file property - there could be a race condition if another test in the same VM runs concurrently and sets the java.util.logging.config.file property concurrently (not sure whether that's a possible scenario) 2. if another test that ran in the same VM has set the java.util.logging.config.class property then this test will fail because the LogManager will not read java.util.logging.config.file if java.util.logging.config.class is set Of course it could be something else too - but the above would be my first suspicion. We should change the test to use /othervm in order to eliminate these possible scenarios.
10-03-2021

Looks like a similar failure mode was fixed before: JDK-8031068 java/util/logging/ParentLoggersTest.java: checkLoggers: getLoggerNames() returned unexpected loggers
10-03-2021