-
Bug
-
Resolution: Fixed
-
P2
-
hs24, hs25
-
b49
-
os_x
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8024563 | 8 | Staffan Larsen | P2 | Closed | Fixed | b107 |
JDK-8034487 | 7u65 | Staffan Larsen | P2 | Resolved | Fixed | b01 |
JDK-8023960 | 7u60 | Staffan Larsen | P2 | Closed | Won't Fix |
That report has a reproducer that causes attach to stop working on OS X. The reason is that the process ends up with a signal mask that blocks SIGQUIT:
- The VM sets the signal mask for all threads (except the internal VMThread) to mask out SIGQUIT using pthread_sigmask(). So the process will still respond to SIGQUIT, but only one thread.
- The verifier code calls setjmp() to save the calling context. On OS X this also saves the signal mask.
- The example code causes a verification error somewhere which causes the verifier to call longjmp().
- longjmp will restore the signal mask using sigprocmask() which sets the signal mask for the _process_.
- Now the process has a signal mask that masks out SIGQUIT and attach stops working.
This only happens on OS X because setjmp/longjmp does not save and restore the signal mask on other platforms. There are functions _setjmp/_longjmp on OS X to skip the signal mask save/restore and I think this is what we need to use in the verifier (also need to check other uses of setjmp/longjmp in the JDK).
- backported by
-
JDK-8034487 (hotspot) setjmp/longjmp changes the process signal mask on OS X
- Resolved
-
JDK-8023960 (hotspot) setjmp/longjmp changes the process signal mask on OS X
- Closed
-
JDK-8023961 (hotspot) setjmp/longjmp changes the process signal mask on OS X
- Closed
-
JDK-8024563 (hotspot) setjmp/longjmp changes the process signal mask on OS X
- Closed
- is cloned by
-
JDK-8023786 (jdk) setjmp/longjmp changes the process signal mask on OS X
- Closed
- relates to
-
JDK-8028571 Need test to cover JDK-8023720
- Closed
-
JDK-8026385 [macosx] (awt) setjmp/longjmp changes the process signal mask on OS X
- Resolved