Red Hat Bugzilla – Bug 154369
Thread exits siliently via __RESTORE_ALL exeception for iret
Last modified: 2007-11-30 17:11:03 EST
Created attachment 112937 [details]
patch for upstream 2.6.12rc2 kernel
+++ This bug was initially created as a clone of Bug #154221 +++
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107
Description of problem:
So related to 152012, I instrumented the kernel to find out how our thread
"disappeared" when running a Java thread test with JRockit. That is the thread
did not complete, but was destroyed by the OS.
The last thing the thread was doing was trying to execute an illegal
instruction, for which we have a signal handler for
Sure enough the thread went through do_exit, but did not originate from the
system call or a signal. After exhausting all other possibilities I instrumented
the one last candidate, entry.S macro __RESTORE_ALL has a kernel exception fix
up (333,666) for a fail iret (will attach patch with instrumentation).
We are basically faced with two problems:
1) __RESTORE_ALL fixup code simply calls "do_exit(11)", causing my thread to
EXIT SILENTLY. This can't be right ? We need some notification/explanation:
warning in syslog, core dump, kernel dump ?!
2) We have no idea why the iret instruction is failing, further more we have no
simple 1 page repro case, currently running a JVM for repro.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run Java thread tests.
2. Start causing general protection faults, via use of an illegal instruction.
Actual Results: Signal stack is completely unused, the thread has exited, and
it's last instruction is 0x6f (outs).
Expected Results: Expecting to catch SIGSEGV in a signal handler, and handle
the illegal instruction.
Patch posted upstream.
Created attachment 113590 [details]
updated patch, was posted upstream.
Created attachment 114275 [details]
FC patch after 2.6.12rc4 rebase
A different partial fix for the underlying issue of iret faults went in
upstream in 2.6.12rc4. Since current rawhide has rebased to that, the fix for
the exec-shield bug now has to look different.
All good in FC4.