JDK-8074561 : Wrong volatile qualifier for field ClassLoaderDataGraphKlassIteratorAtomic::_next_klass
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8u40,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-03-06
  • Updated: 2015-09-29
  • Resolved: 2015-03-09
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 8 JDK 9
8u60Fixed 9 b56Fixed
Description
I investigated a crash in ClassLoaderDataGraphKlassIteratorAtomic::next_klass_in_cldg where class is 0. This can happen as _next_klass is changed concurrently, but is not correctly qualified as volatile.
The declaration volatile Klass* _next_klass indicates that the Klass object may change, but actually the pointer is changed.

I have seen the crash on linux s390x