JDK-8209975 : Some GCThreadLocalData not initialized
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2018-08-26
  • Updated: 2018-12-09
  • Resolved: 2018-08-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12 b10Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Description
Some threads are created before the GC barrier set, and the barrier set is used to construct and destroy the _gc_data in a thread when the thread is constructed or destroyed.  To cope with this initialization order problem, the initialization of the _gc_data is deferred for such threads. The barrier set is "installed" via the set_barrier_set function, which is responsible for also performing that deferred _gc_data initialization for threads that have been constructed so far.

However, set_barrier_set presently only performs that initialization for the current thread, which is the main thread (a JavaThread).  But there are configurations where some non-JavaThreads are also created before the barrier set.  set_barrier_set should initialize their _gc_data too.

This doesn't seem to be causing any problems yet, probably because we aren't using the GCThreadLocalData from non-JavaThreads.

Comments
This is blocked by JDK-8209976. The current ad hoc implementation of Threads::non_java_threads_do doesn't work at the point where set_barrier_set is called. This needs the improved iteration support.
26-08-2018

This is a blocker for JDK-8209974. That one won't work with some threads having uninitialized thread-local G1 queues.
26-08-2018