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

8247746: [lworld] TestNullableArray::test78 fails with ZGC due to incorrect result #87

Closed
wants to merge 1 commit into from

Conversation

TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented Jun 17, 2020

A missing control dependency between an oop load from an array and the corresponding "is-not-flat" check led to re-ordering of the load to before the check. Although the result is only used in the "not-flat" case, ZGC load barriers are still executed on that "oop" that is actually a non-oop field of the flattened inline type array element. In rare cases, the following barrier code screws up the contents of that field:

#0 0x00007fa990daf32e in Atomic::PlatformCmpxchg<8ul>::operator() (this=, exchange_value=, compare_value=,
dest=0x100000f17350) at /oracle/valhalla_int/open/src/hotspot/os_cpu/linux_x86/atomic_linux_x86.hpp:126
#1 Atomic::CmpxchgImpl<unsigned long, unsigned long, unsigned long, void>::operator() (this=, order=memory_order_conservative, exchange_value=21990232555242,
compare_value=, dest=0x100000f17350) at /oracle/valhalla_int/open/src/hotspot/share/runtime/atomic.hpp:745
#2 Atomic::cmpxchg<unsigned long, unsigned long, unsigned long> (order=memory_order_conservative, exchange_value=21990232555242, compare_value=, dest=0x100000f17350)
at /oracle/valhalla_int/open/src/hotspot/share/runtime/atomic.hpp:721
#3 ZBarrier::self_heal<&ZBarrier::is_good_or_null_fast_path> (heal_addr=, addr=, p=0x100000f17350)
at /oracle/valhalla_int/open/src/hotspot/share/gc/z/zBarrier.inline.hpp:120
#4 ZBarrier::self_heal<&ZBarrier::is_good_or_null_fast_path> (heal_addr=, addr=, p=0x100000f17350)
at /oracle/valhalla_int/open/src/hotspot/share/gc/z/zBarrier.inline.hpp:106
#5 ZBarrier::barrier<&ZBarrier::is_good_or_null_fast_path, &ZBarrier::load_barrier_on_oop_slow_path> (o=..., p=)
at /oracle/valhalla_int/open/src/hotspot/share/gc/z/zBarrier.inline.hpp:152
#6 ZBarrier::load_barrier_on_oop_field_preloaded (o=..., p=0x100000f17350) at /oracle/valhalla_int/open/src/hotspot/share/gc/z/zBarrier.inline.hpp:236
#7 ZBarrierSetRuntime::load_barrier_on_oop_field_preloaded (o=, p=0x100000f17350) at /oracle/valhalla_int/open/src/hotspot/share/gc/z/zBarrierSetRuntime.cpp:30
#8 0x00007fa9851a8774 in ?? ()
#9 0x0000000000000000 in ?? ()


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8247746: [lworld] TestNullableArray::test78 fails with ZGC due to incorrect result

Download

$ git fetch https://git.openjdk.java.net/valhalla pull/87/head:pull/87
$ git checkout pull/87

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 17, 2020

👋 Welcome back thartmann! A progress list of the required criteria for merging this PR into lworld will be added to the body of your pull request.

@openjdk
Copy link

openjdk bot commented Jun 17, 2020

@TobiHartmann This change now passes all automated pre-integration checks, type /integrate in a new comment to proceed. After integration, the commit message will be:

8247746: [lworld] TestNullableArray::test78 fails with ZGC due to incorrect result
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

There are currently no new commits on the lworld branch since the last update of the source branch of this PR. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you would like to avoid potential automatic rebasing, specify the current head hash when integrating, like this: /integrate 8072069c3685c772cbe65aa682a765d2c6802c7c.

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

@mlbridge
Copy link

mlbridge bot commented Jun 17, 2020

Webrevs

@mlbridge
Copy link

mlbridge bot commented Jun 17, 2020

Mailing list message from Roland Westrelin on valhalla-dev:

Webrev: https://webrevs.openjdk.java.net/valhalla/87/webrev.00

Looks good to me.

Roland.

@mlbridge
Copy link

mlbridge bot commented Jun 17, 2020

Mailing list message from Tobias Hartmann on valhalla-dev:

Thanks Roland!

Best regards,
Tobias

On 17.06.20 12:18, Roland Westrelin wrote:

Webrev: https://webrevs.openjdk.java.net/valhalla/87/webrev.00

Looks good to me.

Roland.

@TobiHartmann
Copy link
Member Author

/integrate

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

openjdk bot commented Jun 17, 2020

@TobiHartmann
Pushed as commit dc585c2.

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