[URGENT]: [11u] RFR 8244287: JFR: Methods samples have line number 0

Thomas Stüfe thomas.stuefe at gmail.com
Tue Sep 29 15:01:03 UTC 2020


Hi Goetz,

not a JFR expert, but I had a look at the code both in head and in 11u.

While the fix proposed by Martin seems sufficient, I would rather roll back
the initial commit. The code in question in head had been rewritten in
jdk14 for https://bugs.openjdk.java.net/browse/JDK-8236743 which fixes a
problem with tracing code via JFR when classes are redefined. As a side
effect it also fixes the original issue fixed by 8244287 by passing the
line number to the constructor. I would rather go back to a stable point
and later integrate JDK-8236743.

Cheers Thomas



On Tue, Sep 29, 2020 at 4:18 PM Lindenmaier, Goetz <
goetz.lindenmaier at sap.com> wrote:

> Hi,
>
> Any opinion on this?
> Planned freeze of jd11u is in 2 hours ...
>
> Best regards,
>   Goetz.
>
> > -----Original Message-----
> > From: Doerr, Martin <martin.doerr at sap.com>
> > Sent: Tuesday, September 29, 2020 3:11 PM
> > To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; Jaroslav Bachorík
> > <jaroslav.bachorik at datadoghq.com>; jdk-updates-dev <jdk-updates-
> > dev at openjdk.java.net>; hotspot-jfr-dev <hotspot-jfr-dev at openjdk.java.net
> >
> > Subject: RE: [11u] RFR 8244287: JFR: Methods samples have line number 0
> >
> > Hi all,
> >
> > we have seen several crashes on several platforms after this change was
> > pushed.
> >
> > Aarch64 example:
> > Stack: [0x0000ffff90437000,0x0000ffff90637000],  sp=0x0000ffff90635520,
> > free space=2041k
> > Native frames: (J=compiled Java code, A=aot compiled Java code,
> > j=interpreted, Vv=VM code, C=native code)
> > V  [libjvm.so+0x9fb0f8]
> > ObjectSampleCheckpoint::write_stacktrace(JfrStackTrace const*,
> > JfrCheckpointWriter&)+0x208
> > V  [libjvm.so+0x9fb770]
> > StackTraceBlobInstaller::install(ObjectSample*)+0x1b8
> > V  [libjvm.so+0x9fba40]
> > ObjectSampleCheckpoint::on_rotation(ObjectSampler const*,
> > JfrStackTraceRepository&)+0x150
> > V  [libjvm.so+0x72df6c]  JfrRecorderService::pre_safepoint_write()+0x3a4
> > V  [libjvm.so+0x72e828]  JfrRecorderService::write()+0x58
> > V  [libjvm.so+0x72fd2c]  JfrRecorderService::rotate(int)+0x3b4
> > V  [libjvm.so+0x730628]  recorderthread_entry(JavaThread*,
> > Thread*)+0x160
> > V  [libjvm.so+0xbb2dd0]  JavaThread::thread_main_inner()+0xd8
> > V  [libjvm.so+0xbb08fc]  Thread::call_run()+0x94
> > V  [libjvm.so+0xa21718]  thread_native_entry(Thread*)+0x108
> > C  [libpthread.so.0+0x7088]  start_thread+0xb0
> >
> > siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr:
> > 0x0000000000000008
> >
> >
> > This backport uses a different JfrStackFrame constructor (which was
> > probably unused before):
> > JfrStackFrame::JfrStackFrame(const traceid& id, int bci, int type, int
> lineno) :
> >   _method(NULL), _methodid(id), _line(lineno), _bci(bci), _type(type) {}
> >
> > It sets _method to NULL!
> >
> > Should probably be:
> > JfrStackFrame::JfrStackFrame(const traceid& id, int bci, int type, int
> lineno,
> > const Method* method) :
> >   _method(method), _methodid(id), _line(lineno), _bci(bci), _type(type)
> {}
> >
> > and:
> > _frames[count] = JfrStackFrame(mid, bci, type, lineno, method);
> >
> > Do you think we can fix this quickly or should we better revert this
> backport?
> >
> > Best regards,
> > Martin
> >
> >
> > > -----Original Message-----
> > > From: jdk-updates-dev <jdk-updates-dev-bounces at openjdk.java.net> On
> > > Behalf Of Lindenmaier, Goetz
> > > Sent: Montag, 22. Juni 2020 14:42
> > > To: Jaroslav Bachorík <jaroslav.bachorik at datadoghq.com>; jdk-updates-
> > dev
> > > <jdk-updates-dev at openjdk.java.net>; hotspot-jfr-dev <hotspot-jfr-
> > > dev at openjdk.java.net>
> > > Subject: RE: [11u] RFR 8244287: JFR: Methods samples have line
> > > number 0
> > >
> > > Hi Jaroslav,
> > >
> > > The fix looks good to me.  Reviewed.
> > > Please flag the change with jdk11u-fix-request and
> > > add corresponding comment.
> > >
> > > Best regards,
> > >   Goetz
> > >
> > >
> > > -----Original Message-----
> > > From: jdk-updates-dev <jdk-updates-dev-bounces at openjdk.java.net> On
> > > Behalf Of Jaroslav Bachorík
> > > Sent: Donnerstag, 18. Juni 2020 17:27
> > > To: jdk-updates-dev <jdk-updates-dev at openjdk.java.net>;
> hotspot-jfr-dev
> > > <hotspot-jfr-dev at openjdk.java.net>
> > > Subject: [11u] RFR 8244287: JFR: Methods samples have line number 0
> > >
> > > Hi all,
> > >
> > > Could I get this simple fix reviewed?
> > > It is fixing a regression introduced while backporting JDK-823790 and
> > > adding a new test to prevent such regressions in the future.
> > >
> > > JIRA      :  https://bugs.openjdk.java.net/browse/JDK-8244287
> > > Webrev : http://cr.openjdk.java.net/~jbachorik/8244287/webrev/
> > >
> > > Thanks,
> > >
> > > -JB-
>


More information about the jdk-updates-dev mailing list