8335269: [Graal] occasional timeout in java/lang/StringBuffer/TestSynchronization.java with loom
Please review the following simple fix. A pinned virtual thread calling Thread.yield() in a loop might never poll for safepoints if the compiler relies on a poll in native method Continuation.doYield while optimizing. This is a special native method that doesn't always poll for safepoints, and in particular it doesn't if the virtual thread is pinned due to owning monitors. Currently this scenario can be reproduced with the Graal compiler.
I included a test which reproduces the issue with Graal (couldn't reproduce the issue with c2). The test times out without the fix and passes with it. I also run the patch through mach5 tiers1-3.
Thanks, Patricio
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Integration blocker
⚠️ Failed to retrieve information on issue 8335269. Please make sure it exists and is accessible.
Issue
- ⚠️ Failed to retrieve information on issue
8335269.
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20016/head:pull/20016
$ git checkout pull/20016
Update a local copy of the PR:
$ git checkout pull/20016
$ git pull https://git.openjdk.org/jdk.git pull/20016/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20016
View PR using the GUI difftool:
$ git pr show -t 20016
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20016.diff
:wave: Welcome back pchilanomate! 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.
@pchilano 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:
8335269: [Graal] occasional timeout in java/lang/StringBuffer/TestSynchronization.java with loom
Reviewed-by: dholmes, alanb
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 113 new commits pushed to the master branch:
- 81a0d1ba03bbdbe718302b3925cdc207d5d05232: 8325525: Create jtreg test case for JDK-8325203
- b3ef2a600cfec31723dc78fe552e9cf9976b0337: 8336036: Synthetic documentation for a record's equals is incorrect for floating-point types
- 687601ebcaedf133fd4d5cecc42c5aadf9c73f3c: 8336257: Additional tests in jmxremote/startstop to match on PID not app name
- 889055713ea83f899ebd7bf640dcf3c3e1a82ebe: 8335623: Clean up HtmlTag.HtmlTag and make the ARIA role attribute global
- 73e3e0edeb20c6f701b213423476f92fb05dd262: 8321509: False positive in get_trampoline fast path causes crash
- 9eb611e7f07ebb6eb0cbcca32d644abf8352c991: 8334055: Unhelpful 'required: reference' diagnostics after JDK-8043226
- 5100303c6c5e4224d2c41f90719139bb5f4e236e: 8335668: NumberFormat integer only parsing should throw exception for edge case
- 58c98420b65bcea08f37982fdfba747005c03553: 8336021: Doccheck: valign not allowed for HTML5 in java.xml
- d06d79c80980644df511cded0eb8bc0309d878d3: 8325369: @sealedGraph: Bad link to image for tag on nested classes
- dea92742c2b5889717f2183dc29b5772daff5340: 8332125: [nmt] Totals in diff report should print out total malloc and mmap diffs
- ... and 103 more: https://git.openjdk.org/jdk/compare/27982c8f5dad0e2d080846f803055c84bac9fddd...master
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.
@pchilano The following labels will be automatically applied to this pull request:
-
core-libs -
hotspot-runtime
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.
/label add hotspot-dev
/label remove core-libs
/label remove hotspot-runtime
@pchilano
The hotspot label was successfully added.
@pchilano
The core-libs label was successfully removed.
@pchilano
The hotspot-runtime label was successfully removed.
Webrevs
- 05: Full - Incremental (1ea1a06a)
- 04: Full - Incremental (2a8b7076)
- 03: Full - Incremental (1cf425dd)
- 02: Full - Incremental (79be1fcc)
- 01: Full - Incremental (ce777598)
- 00: Full (0490e6c8)
Thanks for the reviews and comments @AlanBateman, @dholmes-ora and @dougxc!
/integrate
Going to push as commit 000de306286bb75bbdad2f572ce6dafd4184680e.
Since your change was applied there have been 137 commits pushed to the master branch:
- 4635531950dbcfcd3ee2f13a57f0909af78a94c7: 8335159: Move method reference to lambda desugaring before Lower
- a253e0ff4b88541d01596b0e73ede4b96a258fca: 8335642: Hide Transform implementation for Class-File API
- 2b0adfc2decf47f6f49f072549c96f301f275285: 8335817: javac AssertionError addLocalVar checkNull
- a96de6d8d273d75a6500e10ed06faab9955f893b: 8336256: memcpy short value to int local is incorrect in VtableStubs::unsafe_hash
- 3f2636d9b71f5270c83d17dcf5d18cf907978475: 8335820: java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java fails due to IllegalArgumentException: hash must be nonzero
- a9f5e76a65f743be9cd995fbea9c78ff9cef3402: 8335905: CompoundElement API cleanup
- 6f325db49365d3d06add5d194d4696a1428675fa: 8310915: Typo in aarch64.ad: "envcodings"
- ae9f318fc35eeab497e546ebab9faed6ec774ec5: 8336301: test/jdk/java/nio/channels/AsyncCloseAndInterrupt.java leaves around a FIFO file upon test completion
- 4166e5345283d118d76b20de579d73bd55436ea6: 8318106: Generated HTML for snippet does not always contain an id
- 5bc86f332986e3fffc1363f569029bb73a706064: 8336259: Wrong link to stylesheet.css in JavaDoc API documentation
- ... and 127 more: https://git.openjdk.org/jdk/compare/27982c8f5dad0e2d080846f803055c84bac9fddd...master
Your commit was automatically rebased without conflicts.
@pchilano Pushed as commit 000de306286bb75bbdad2f572ce6dafd4184680e.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.