[External] : Re: A noob question about weird sequence of `*synchronization entry` in a C2 compiled code

Jaroslav Bachorík jaroslav.bachorik at datadoghq.com
Wed Mar 1 16:05:58 UTC 2023


Hi Tobias,

Thanks for fixing this subtle and annoying bug. Looking forward to having
the fix accepted so we can start backporting it.

Cheers,

Jaroslav

On Wed 1. 3. 2023 at 16:17, Tobias Hartmann <tobias.hartmann at oracle.com>
wrote:

> Hi Jaroslav,
>
> I finally got the time to investigate this properly and found the root
> cause. The fix is out for
> review: https://github.com/openjdk/jdk/pull/12806
>
> Thanks again for reporting this!
>
> Best regards,
> Tobias
>
>
> On 07.02.22 23:20, dean.long at oracle.com wrote:
> > It turns out the problem with DebugNonSafepoints is a known issue.  See
> > https://bugs.openjdk.java.net/browse/JDK-8201516.
> >
> > dl
> >
> > On 2/7/22 7:58 AM, Jaroslav Bachorík wrote:
> >> Hi Dean,
> >>
> >> The first thing I want to mention is that I isolated  this behaviour
> >> to be triggered by `-XX:DebugNonSafepoints` JVM arg. When this option
> >> is not specified I don't see the pattern at all.
> >>
> >> I have extracted a self-contained (almost) reproducer - it is not a
> >> single class, unfortunately, but building and running it is as simple
> >> as executing the attached `./run.sh`
> >> The reproducer has a weak point, though - I am not able to get the
> >> `*synchronization entry` pattern manifesting at the same locations.
> >> Therefore it is more of PoC than a full test case - it requires going
> >> to the assembly print out and searching for `*synchronization entry`
> >> manually.
> >>
> >> The project can be found here -
> >>
> https://urldefense.com/v3/__https://drive.google.com/file/d/1Z6rX4NpvNpctVA3AuYfaG0Qxjd4KjrED/view?usp=sharing__;!!ACWV5N9M2RV99hQ!f9PhKRCRHuSdH__32-XrLtTdu0RoQCQz8wJGjvsqF83SjHg4R2_vAcUJOJFYqd4$
> >> It is a zipped gradle java project and the only thing it requires is a
> >> working Java env.
> >>
> >> Thanks!
> >>
> >> -JB-
> >>
> >> On Sun, Feb 6, 2022 at 6:45 AM <dean.long at oracle.com> wrote:
> >>>
> >>> On 2/5/22 12:58 PM, Jaroslav Bachorík wrote:
> >>>> Is this the hard limitation of what is possible to do with the debug
> >>>> data at this level of optimization? Are some boundaries irreversibly
> >>>> lost here?
> >>>
> >>> It's quite likely you've discovered a bug that can be fixed.  If you
> >>> could narrow it down to a self-contained test case, that would really
> help.
> >>>
> >>> dl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-compiler-dev/attachments/20230301/c2097bfd/attachment.htm>


More information about the hotspot-compiler-dev mailing list