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

8256040: Shenandoah: Allow NULL referent in ShenandoahReferenceProcessor::should_discover() #1117

Closed
wants to merge 1 commit into from

Conversation

rkennke
Copy link
Contributor

@rkennke rkennke commented Nov 9, 2020

Testing showed the following assert:

# Internal Error (/home/rkennke/src/openjdk/jdk/src/hotspot/share/oops/compressedOops.inline.hpp:54), pid=711923, tid=712264
# assert(!is_null(v)) failed: narrow oop value can never be zero

V [libjvm.so+0x1629c84] bool ShenandoahReferenceProcessor::should_discover<narrowOop>(oop, ReferenceType) const+0x404
V [libjvm.so+0x162a01b] bool ShenandoahReferenceProcessor::discover<narrowOop>(oop, ReferenceType, unsigned int)+0x4b
V [libjvm.so+0x16239e8] ShenandoahReferenceProcessor::discover_reference(oop, ReferenceType)+0x138
V [libjvm.so+0x15b7a26] bool InstanceRefKlass::try_discover<narrowOop, ShenandoahMarkRefsMetadataClosure>(oop, ReferenceType, ShenandoahMarkRefsMetadataClosure*)+0x96
V [libjvm.so+0x15b7b3d] void InstanceRefKlass::oop_oop_iterate_discovery<narrowOop, ShenandoahMarkRefsMetadataClosure, AlwaysContains>(oop, ReferenceType, ShenandoahMarkRefsMetadataClosure*, AlwaysContains&) [clone .constprop.696]+0x3d
V [libjvm.so+0x15b7ce1] void InstanceRefKlass::oop_oop_iterate_ref_processing<narrowOop, ShenandoahMarkRefsMetadataClosure, AlwaysContains>(oop, ShenandoahMarkRefsMetadataClosure*, AlwaysContains&)+0x81
V [libjvm.so+0x15b835e] void OopOopIterateDispatch<ShenandoahMarkRefsMetadataClosure>::Table::oop_oop_iterate<InstanceRefKlass, narrowOop>(ShenandoahMarkRefsMetadataClosure*, oop, Klass*)+0x1ee
V [libjvm.so+0x15a905e] void ShenandoahConcurrentMark::do_task<ShenandoahMarkRefsMetadataClosure>(Padded<BufferedOverflowTaskQueue<ShenandoahMarkTask, (MEMFLAGS)5, 131072u>, 128ul>*, ShenandoahMarkRefsMetadataClosure*, unsigned short*, ShenandoahMarkTask*)+0x7be
V [libjvm.so+0x15ab81e] void ShenandoahConcurrentMark::mark_loop_work<ShenandoahMarkRefsMetadataClosure, true>(ShenandoahMarkRefsMetadataClosure*, unsigned short*, unsigned int, TaskTerminator*)+0x3ce

We have this code in ShRefProc::should_discover():
oop referent = CompressedOops::decode_not_null(heap_oop);

However, the referent can legally be NULL. We even treat NULL specially in is_inactive().

Testing:

  • hotspot_gc_shenandoah
  • tier1+UseShenandoahGC+ShenandoahVerify (which originally showed the problem)

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Testing

Linux x64 Linux x86 Windows x64 macOS x64
Build ✔️ (5/5 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed)

Issue

  • JDK-8256040: Shenandoah: Allow NULL referent in ShenandoahReferenceProcessor::should_discover()

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1117/head:pull/1117
$ git checkout pull/1117

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 9, 2020

👋 Welcome back rkennke! 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 openjdk bot added the rfr label Nov 9, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 9, 2020

@rkennke The following labels will be automatically applied to this pull request:

  • hotspot-gc
  • shenandoah

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.

@openjdk openjdk bot added hotspot-gc shenandoah labels Nov 9, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 9, 2020

Webrevs

Copy link
Contributor

@shipilev shipilev left a comment

Looks fine and trivial.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 9, 2020

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

8256040: Shenandoah: Allow NULL referent in ShenandoahReferenceProcessor::should_discover()

Reviewed-by: shade

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 added the ready label Nov 9, 2020
@rkennke
Copy link
Contributor Author

@rkennke rkennke commented Nov 10, 2020

/integrate

@openjdk openjdk bot closed this Nov 10, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 10, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 10, 2020

@rkennke Since your change was applied there have been 10 commits pushed to the master branch:

  • 01567b5: 8256036: Shenandoah: MethodHandles adapters section overflows after JDK-8255762
  • 4bc065c: 8255782: Turn UseTLAB and ResizeTLAB from product_pd to product, defaulting to "true"
  • b5d78af: 8254863: Delete code leftover from old fixes
  • 8066b33: 8253905: Update sanity test suite to not place windows at (0,0)
  • f71f9dc: 8255949: AArch64: Add support for vectorized shift right and accumulate
  • 1332ba3: 8256039: Shenandoah: runtime/stringtable/StringTableCleaningTest.java fails
  • 11431b1: 4619330: All built-in java.awt.color.ColorSpace fields should be specified as such
  • 17f04fc: 8254078: DataOutputStream is very slow post-disabling of Biased Locking
  • 79b7909: 8255980: G1 Service thread register_task can be used after shutdown
  • dd8e4ff: 8255711: Fix and unify hotspot signal handlers

Your commit was automatically rebased without conflicts.

Pushed as commit a38dd53.

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

openjdk-notifier bot referenced this issue Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc integrated shenandoah
2 participants