Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The number of Thread instance names starts with 3 #16621

Closed
weucode opened this issue Jan 28, 2023 · 0 comments · Fixed by #16624
Closed

The number of Thread instance names starts with 3 #16621

weucode opened this issue Jan 28, 2023 · 0 comments · Fixed by #16624

Comments

@weucode
Copy link

weucode commented Jan 28, 2023

Description
When running the following programs, OpenJ9 outputs Thread[Thread-3,5,main] while other JVMs(like Hotspot) output Thread[Thread-0,5,main]. It seems that OpenJ9 executes wrong initialize operation.

Testcase

public class MyJVMTest {
    public static void main(String[] args) throws Exception {
        Runnable runnable = () -> {};
        Thread thread = new Thread(runnable);
        System.out.println(thread);
    }
}

JDK Version
This behavior exist in JDK 8 and 11:

openjdk version "1.8.0_362-internal"
OpenJDK Runtime Environment (build 1.8.0_362-internal-root_2023_01_28_12_10-b00)
Eclipse OpenJ9 VM (build master-6cadc1d9f, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20230128_000000 (JIT enabled, AOT enabled)
OpenJ9   - 6cadc1d9f
OMR      - 4c214a89c
JCL      - 21da58127f based on jdk8u362-b09)
openjdk version "11.0.18-internal"
OpenJDK Runtime Environment (build 11.0.18-internal+0-adhoc.root.openj9-openjdk-jdk11)
Eclipse OpenJ9 VM (build master-6cadc1d9f, JRE 11 Linux amd64-64-Bit Compressed References 20230128_000000 (JIT enabled, AOT enabled)
OpenJ9   - 6cadc1d9f
OMR      - 4c214a89c
JCL      - b399e866bb based on jdk-11.0.18+10)
@pshipton pshipton self-assigned this Jan 30, 2023
pshipton added a commit to pshipton/openj9 that referenced this issue Jan 30, 2023
This avoids having a default name created.

Issue eclipse-openj9#16621

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants