JDK-8183925 : Decouple crash protection from watcher thread
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-07-06
  • Updated: 2024-09-11
  • Resolved: 2017-07-07
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 10 Other
10 b21Fixed openjdk8u262Fixed
Related Reports
Relates :  
Relates :  
Description
Upcomming changes in tracing backend no longer rely on watcher thread.
Crash protection needs to be decoupled from watcher thread.
Comments
Sorry Robbin, I must have misread something.
19-08-2017

URL: http://hg.openjdk.java.net/jdk10/jdk10/hotspot/rev/786437c6344b User: jwilhelm Date: 2017-08-18 18:01:35 +0000
18-08-2017

David, static bool is_crash_protected(Thread* thr) { return _crash_protection != NULL && _protected_thread == thr; } The _protected_thread can never be NULL if _crash_protection is none NULL. Which this assert protected against: assert(_protected_thread != NULL, "Cannot crash protect a NULL thread"); So if we are in early startup and current thread is NULL, it can never be crash protected. Thus we either have a different thread crash protected e.g. _crash_protection != NULL is true, but _protected_thread == thr will be false, so is_crash_protected will return false. Or _crash_protection != NULL is false and we will return false.
18-08-2017

Robbin, This assertion looks wrong to me: + assert(!os::ThreadCrashProtection::is_crash_protected(Thread::current_or_null()), + "malloc() not allowed when crash protection is set"); If the current thread is NULL, due to call through early os::malloc, and crash protection is not set, is_crash_protected will incorrectly report true because NULL==NULL. The assertion will then fire when it should not.
31-07-2017

URL: http://hg.openjdk.java.net/jdk10/hs/hotspot/rev/786437c6344b User: rehn Date: 2017-07-07 23:01:49 +0000
07-07-2017