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

8273650: [lworld] Interpreter fails with fatal error: DEBUG MESSAGE: klass not initialized #553

Closed
wants to merge 2 commits into from

Conversation

@fparain
Copy link
Collaborator

@fparain fparain commented Sep 15, 2021

Please review those changes fixing handling of class initialization failures and adding unit tests to cover several failure scenarios and some corner cases (handling of instances from a failed initialization class).

Thank you,

Fred


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8273650: [lworld] Interpreter fails with fatal error: DEBUG MESSAGE: klass not initialized

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/valhalla pull/553/head:pull/553
$ git checkout pull/553

Update a local copy of the PR:
$ git checkout pull/553
$ git pull https://git.openjdk.java.net/valhalla pull/553/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 553

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/valhalla/pull/553.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 15, 2021

👋 Welcome back fparain! A progress list of the required criteria for merging this PR into lworld 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

@openjdk openjdk bot commented Sep 15, 2021

@fparain 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:

8273650: [lworld] Interpreter fails with fatal error: DEBUG MESSAGE: klass not initialized

Reviewed-by: dsimms, thartmann

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 2 new commits pushed to the lworld branch:

  • e075eaf: 8270477: [lworld] bytecode testing API does not emit Q type descriptors
  • 0c0c9e1: 8267697: [lworld] [lw3] VM crashes during heap dump if Java heap contains flat arrays

Please see this link for an up-to-date comparison between the source branch of this pull request and the lworld 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 lworld branch, type /integrate in a new comment.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 15, 2021

Webrevs

Copy link
Member

@MrSimms MrSimms left a comment

Looking good !

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Test looks good, just noticed some typos. I'll verify that it passes with the JIT before integrating JDK-8273594.

* @test
* @summary Test several scenarios of class initialization failures
* @library /test/lib
* @run main/othervm runtime.valhalla.inlinetypes.ClassInitializationFailuresTest
Copy link
Member

@TobiHartmann TobiHartmann Sep 17, 2021

Choose a reason for hiding this comment

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

Just noticed that the /othervm part can be removed because no flags are set. Also, the test should use 4-whitespace indentation.

}
}

// Even if a primitive class fails to initialize property, some instances
Copy link
Member

@TobiHartmann TobiHartmann Sep 17, 2021

Choose a reason for hiding this comment

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

"property" -> "properly"

// First attempt to instantiate TestClass1 must fail with an ExceptionInInitializerError
// because an exception has been thrown during the initialization process
// Second attempt to instantiate TestClass1 must fail with a NoClassDefFoundError
// because TestClass1 must already be in a faile initialization state (so no new
Copy link
Member

@TobiHartmann TobiHartmann Sep 17, 2021

Choose a reason for hiding this comment

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

"faile" -> "failed"

@fparain
Copy link
Collaborator Author

@fparain fparain commented Sep 17, 2021

Thank you for the reviews.
All issues mentioned for the test file have been fixed.

Fred

@fparain
Copy link
Collaborator Author

@fparain fparain commented Sep 17, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Sep 17, 2021

Going to push as commit 8bed69a.
Since your change was applied there have been 2 commits pushed to the lworld branch:

  • e075eaf: 8270477: [lworld] bytecode testing API does not emit Q type descriptors
  • 0c0c9e1: 8267697: [lworld] [lw3] VM crashes during heap dump if Java heap contains flat arrays

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 17, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Sep 17, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 17, 2021

@fparain Pushed as commit 8bed69a.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

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