JDK-8019324 : assert(_f2 == 0 || _f2 == f2) failed: illegal field change
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs25
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-06-27
  • Updated: 2014-10-15
  • Resolved: 2013-07-15
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 7 JDK 8 Other
7u72Fixed 8Fixed hs25Fixed
Description
There seems to be a race condition with this assert in set_f2().  Please see the linked confidential bug for details and how to reproduce on embedded platforms.
Comments
SQE is OK to take this to PSU14_04
09-07-2014

David is right. This assert protects against non-monotonicity in the data structure, without which we could get inconsistent linkage behavior that would be hard to diagnose. In general, assertions are in the code for a reason.
13-07-2013

No need to remove the assertion you just need to read _f2 once only, as is done in other methods.
04-07-2013

It would be appropriate to remove the assertion
02-07-2013

Dean Long added a comment - 2013-06-27 06:37 The assert is broken: assert(_f2 == 0 || _f2 == f2, "illegal field change"); This could be rewritten as: 0: if (_f2 == 0) { 1: /* OK */ 2: } else if (_f2 == f2) { 3: /* OK */ 4: } else { 5: /* illegal field change */ 6: } Note that after line 0 but before line 2, another thread can call set_f2(0), causing the test at line 2 to fail.
01-07-2013