Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2176827 | 7 | David Holmes | P3 | Closed | Fixed | b06 |
JDK-2171897 | 6u4 | David Holmes | P3 | Closed | Fixed | b03 |
The recent fix for 6463133 (deopt should not use code patching) uses one bit of the _suspend_flags to indicate that deopt is necessary. However no concurrency controls are applied to the update of _suspend_flags, and so changes might be lost if multiple bits are modified concurrently.
In the past the _suspend_flags contained a number of VM/Java-suspend related flags, and the async-exception flag was also stored there. Hence updates to the _suspend_flags were protected by acquiring the SR_lock (suspend/resume lock). With the demise of VM suspension, and the additional use of the "deopt" bit, these flags are now more general purpose "condition" flags and protecting updates with the SR_lock is no longer appropriate. Instead the _suspend_flags should be updated atomically using a compare-and-swap operation.
In the past the _suspend_flags contained a number of VM/Java-suspend related flags, and the async-exception flag was also stored there. Hence updates to the _suspend_flags were protected by acquiring the SR_lock (suspend/resume lock). With the demise of VM suspension, and the additional use of the "deopt" bit, these flags are now more general purpose "condition" flags and protecting updates with the SR_lock is no longer appropriate. Instead the _suspend_flags should be updated atomically using a compare-and-swap operation.
- backported by
-
JDK-2171897 _suspend_flags are not atomically updated in all cases
- Closed
-
JDK-2176827 _suspend_flags are not atomically updated in all cases
- Closed
- duplicates
-
JDK-6506653 deopt suspend update can lose other suspension bits
- Closed
- relates to
-
JDK-6463133 Deoptimization should not use code patching
- Resolved