Skip to content

8383631: Test vmTestbase/nsk/jdb/kill/kill003/kill003.java failed - possible NullPointerException#31048

Open
plummercj wants to merge 1 commit intoopenjdk:masterfrom
plummercj:8383631_kill003
Open

8383631: Test vmTestbase/nsk/jdb/kill/kill003/kill003.java failed - possible NullPointerException#31048
plummercj wants to merge 1 commit intoopenjdk:masterfrom
plummercj:8383631_kill003

Conversation

@plummercj
Copy link
Copy Markdown
Contributor

@plummercj plummercj commented May 6, 2026

The test sees the following output and is supposed to detect the "main[1]" prompt to indicate it is done with the "locals" command that was issued, and then issue a "cont" command:

[9:13:15.40] Sending command: locals
[9:13:15.560] reply[0]: Method arguments:
[9:13:15.561] reply[1]: args = instance of java.lang.String[3] (id=669)
[9:13:15.561] reply[2]: Local variables:
[9:13:15.561] reply[3]: main[1]
[9:13:15.561] Sending command: cont

However, the output instead looks like this:

[21:15:18.114] Sending command: locals
[21:15:18.515] reply[0]: Method arguments:
[21:15:18.515] reply[1]: args = instance of java.lang.String[3] (id=686)
[21:15:18.515] reply[2]: Local variables:
[21:15:18.515] Sending command: cont
[21:15:18.716] reply[0]: main[1] >

The JdbTest.findPrompt() code looks for a pattern of characters, followed by '[', then a number, then ']'. Unfortunately it matches the String[3] text you see in the output. Because of that the test thought the "locals" command had completed, and issued the "cont" command too soon, which gets the test out of sync.

Apparently some tests have had this same issue before and a solution was already available. You just need to set compoundPromptIdent to the prompt that the test expects (sans the square brackets part).

I also fixed a couple of comment typos I noticed in JdbTest while debugging this.

Tested by running kill003 a couple hundred times on the failing platform and with the failing JVM args.



Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8383631: Test vmTestbase/nsk/jdb/kill/kill003/kill003.java failed - possible NullPointerException (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31048/head:pull/31048
$ git checkout pull/31048

Update a local copy of the PR:
$ git checkout pull/31048
$ git pull https://git.openjdk.org/jdk.git pull/31048/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31048

View PR using the GUI difftool:
$ git pr show -t 31048

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31048.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 6, 2026

👋 Welcome back cjplummer! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 6, 2026

@plummercj This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8383631: Test vmTestbase/nsk/jdb/kill/kill003/kill003.java failed - possible NullPointerException

Reviewed-by: syan, kevinw, lmesnik

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 11 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk Bot changed the title 8383631 8383631: Test vmTestbase/nsk/jdb/kill/kill003/kill003.java failed - possible NullPointerException May 6, 2026
@openjdk openjdk Bot added the serviceability serviceability-dev@openjdk.org label May 6, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 6, 2026

@plummercj The following label will be automatically applied to this pull request:

  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label May 6, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 6, 2026

Webrevs

Copy link
Copy Markdown
Member

@sendaoYan sendaoYan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@kevinjwalls kevinjwalls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label May 6, 2026
@plummercj
Copy link
Copy Markdown
Contributor Author

test

@plummercj
Copy link
Copy Markdown
Contributor Author

Unfortunately this fix does not work with virtual threads because one of the prompts ends up being old-m-a-i-n[1] instead of main[1]. I'm going to need a different fix. I was working towards one yesterday which I abandoned after I found the solution in the PR. I'll see if I can get that fix working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Pull request is ready to be integrated rfr Pull request is ready for review serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

4 participants