[11u] RFR JDK-8213231 ThreadSnapshot::_threadObj can become stale
Jiangli Zhou
jianglizhou at google.com
Mon Mar 29 16:23:25 UTC 2021
+jdk-updates-dev at openjdk.java.net
On Mon, Mar 29, 2021 at 9:22 AM Jiangli Zhou <jianglizhou at google.com> wrote:
>
> Thanks, Martin. I see the backport is also approved in bugster. Plan
> to submit today.
>
> Best,
> Jiangli
>
> On Mon, Mar 29, 2021 at 2:40 AM Doerr, Martin <martin.doerr at sap.com> wrote:
> >
> > Hi Jiangli,
> >
> > your backport looks good. You only had to integrate manually because of unrelated changes in the context. That's fine.
> >
> > Best regards,
> > Martin
> >
> >
> > > -----Original Message-----
> > > From: jdk-updates-dev <jdk-updates-dev-retn at openjdk.java.net> On
> > > Behalf Of Jiangli Zhou
> > > Sent: Sonntag, 21. März 2021 01:10
> > > To: jdk-updates-dev <jdk-updates-dev at openjdk.java.net>
> > > Subject: [11u] RFR JDK-8213231 ThreadSnapshot::_threadObj can become
> > > stale
> > >
> > > Hello,
> > >
> > > We recently noticed JDK-8213231 related GC crashes in production
> > > environments when running on JDK 11. The crashes were always
> > > associated with a stale pointer from a java.lang.management.ThreadInfo
> > > object to a bad j.l.String object. Applying JDK-8213231's fix resolved
> > > the specific crashes. I'd like to backport JDK-8213231 to JDK 11u.
> > >
> > > Bug: https://bugs.openjdk.java.net/browse/JDK-8213231
> > > Original commit: http://hg.openjdk.java.net/jdk/jdk/rev/391d671f222b
> > > Webrev: http://cr.openjdk.java.net/~jiangli/backport-8213231/webrev.00/
> > >
> > > The patch did not apply cleanly. The following diff in
> > > threadService.hpp were hand merged:
> > >
> > > --- threadService.hpp
> > > +++ threadService.hpp
> > > @@ -213,12 +213,15 @@
> > > ThreadConcurrentLocks* _concurrent_locks;
> > > ThreadSnapshot* _next;
> > >
> > > -public:
> > > - // Dummy snapshot
> > > + // ThreadSnapshot instances should only be created via
> > > + // ThreadDumpResult::add_thread_snapshot.
> > > + friend class ThreadDumpResult;
> > > ThreadSnapshot() : _thread(NULL), _threadObj(NULL),
> > > _blocker_object(NULL), _blocker_object_owner(NULL),
> > > _stack_trace(NULL), _concurrent_locks(NULL),
> > > _next(NULL) {};
> > > - ThreadSnapshot(ThreadsList * t_list, JavaThread* thread);
> > > + void initialize(ThreadsList * t_list, JavaThread* thread);
> > > +
> > > +public:
> > > ~ThreadSnapshot();
> > >
> > > Testing: Linux x86_64 tier1 tests
> > >
> > > Best,
> > > Jiangli
More information about the jdk-updates-dev
mailing list