Skip to content

8343529: serviceability/sa/ClhsdbWhere.java fails AssertionFailure: Corrupted constant pool #3395

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -51,6 +51,10 @@ public static void main(String[] args) throws Exception {
CDSTestUtils.createArchiveAndCheck(opts);

ClhsdbLauncher test = new ClhsdbLauncher();
// This test could possibly cause some unexpected SA exceptions because one
// or more threads are active during the stack trace. Ignore them. The threads
// we care about should still be present in the output.
test.ignoreExceptions();
theApp = LingeredApp.startApp(
"-XX:+UnlockDiagnosticVMOptions",
"-XX:SharedArchiveFile=" + sharedArchiveName,
Expand Down
20 changes: 14 additions & 6 deletions test/hotspot/jtreg/serviceability/sa/ClhsdbLauncher.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -41,9 +41,15 @@
public class ClhsdbLauncher {

private Process toolProcess;
private boolean ignoreExceptions;

public ClhsdbLauncher() {
toolProcess = null;
ignoreExceptions = false;
}

public void ignoreExceptions() {
ignoreExceptions = true;
}

/**
Expand Down Expand Up @@ -147,11 +153,13 @@ private String runCmd(List<String> commands,
// -Xcheck:jni might be set via TEST_VM_OPTS. Make sure there are no warnings.
oa.shouldNotMatch("^WARNING: JNI local refs:.*$");
oa.shouldNotMatch("^WARNING in native method:.*$");
// This will detect most SA failures, including during the attach.
oa.shouldNotMatch("^sun.jvm.hotspot.debugger.DebuggerException:.*$");
// This will detect unexpected exceptions, like NPEs and asserts, that are caught
// by sun.jvm.hotspot.CommandProcessor.
oa.shouldNotMatch("^Error: .*$");
if (!ignoreExceptions) {
// This will detect most SA failures, including during the attach.
oa.shouldNotMatch("^sun.jvm.hotspot.debugger.DebuggerException:.*$");
// This will detect unexpected exceptions, like NPEs and asserts, that are caught
// by sun.jvm.hotspot.CommandProcessor.
oa.shouldNotMatch("^Error: .*$");
}

String[] parts = output.split("hsdb>");
for (String cmd : commands) {
Expand Down
6 changes: 5 additions & 1 deletion test/hotspot/jtreg/serviceability/sa/ClhsdbWhere.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -45,6 +45,10 @@ public static void main(String[] args) throws Exception {
LingeredApp theApp = null;
try {
ClhsdbLauncher test = new ClhsdbLauncher();
// This test could possibly cause some unexpected SA exceptions because one
// or more threads are active during the stack trace. Ignore them. The threads
// we care about should still be present in the output.
test.ignoreExceptions();
theApp = LingeredApp.startApp();
System.out.println("Started LingeredApp with pid " + theApp.getPid());

Expand Down