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
8276208: vmTestbase/nsk/jdb/repeat/repeat001/repeat001.java fails with "AssertionError: Unexpected output" #6182
Conversation
|
@jakobcornell The following label will be automatically applied to this pull request:
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. |
I'm not sure whether this is expected to be a platform-specific bug, but I've been assuming it is since I've never seen the failure on my Linux system. I started with the Windows failure and noticed that the JDB loop mechanism doesn't seem to be working:
That would seem to be the cause of the "Unexpected output" error, but I can't reproduce the behavior manually on the x86-64 Windows system I have access to. With repeat on:
I wonder if Daniel can provide any more information that might enable me to reproduce the issue for debugging. If not, I don't think I can diagnose the issue. Another question I have is whether anybody has attempted to find the point the bug was introduced by backporting the test to earlier versions of the JDK. I think that would essentially mean reducing the test to I'm assuming the Mach 5 failure has the same underlying cause; I could try virtualizing Linux on PowerPC to try to reproduce that one, but that seems likely to take a lot of time and unlikely to turn up anything useful. |
Webrevs
|
This isn't ready for review; I'm just marking it such to enable integration with the mailing list. |
Dan did reproduce the "Unexpected Output" failure on linux. I'm trying to reproduce now, including linux, windows, and macosx. I want to first get a better idea of how frequently it reproduces. Keep in mind that there were extra VM flags applied on all the runs that failed. Try running with the following:
Most of these are probably unnecessary or aren't even impacting how VM is run (ie -Xcomp probably makes -XX:CompileThreshold=100 not do anything). If anything, -Xcomp might be making a difference. |
I did 20 runs each on linux, mac, and windows. I got 4 "Unexpected output" failures, 3 on mac and 1 on windows. I applied the fix to use
|
I'm pretty sure the problem is with how you are calling ...and you also need to fix the empty command that follows since it repeats the "2 2" command : |
That certainly does make sense, although it makes me wonder how this ever passed in the first place. Maybe there's a bug somewhere in the JDB output processing code that made the failure intermittent. In any case, it should be resolved now. Thanks for doing the heavy lifting on investigation and debugging here. I did have another question related to these tests. I used a record class in the implementation of the |
Mailing list message from David Holmes on serviceability-dev: On 2/11/2021 11:07 am, Jakob Cornell wrote:
Records were a preview feature in JDK 14 and 15, but are a full feature David |
Oh good. I haven't been following recent releases very closely. So this is ready for review then. |
It depends a bit on how the underlying I/O bundles up the reply packets, and how quickly they are read, but probably more the latter than the former. Basically the jdb process is sending a bunch of replies, and the test process usually doesn't start reading the replies until after they have all been sent, so it gets them all with one read. But if the test process is quick enough, then it might do the read before all the replies have been sent. |
@jakobcornell This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
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 29 new commits pushed to the
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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@plummercj, @iklam) but any other Committer may sponsor as well.
|
@iklam - Can you review this fix? You were one of the original reviewers on: Thanks! |
/integrate |
@jakobcornell |
/sponsor |
Going to push as commit c7f070f.
Your commit was automatically rebased without conflicts. |
@plummercj @jakobcornell Pushed as commit c7f070f. |
This will fix a few issues with the tests added in #5290:
failure
method to report problems rather than throwingAssertionError
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6182/head:pull/6182
$ git checkout pull/6182
Update a local copy of the PR:
$ git checkout pull/6182
$ git pull https://git.openjdk.java.net/jdk pull/6182/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6182
View PR using the GUI difftool:
$ git pr show -t 6182
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6182.diff