-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APP CRASH post-detach after re-attach #2175
Labels
Comments
derekbruening
assigned Carrotman42 and derekbruening and unassigned derekbruening and Carrotman42
Feb 21, 2018
I can no longer reproduce this. @Carrotman42 put in some re-attach fixes over the past few months which perhaps fixed this: not going to take the time to do a binary search. Closing. |
To add more details: I ran burst_threads 500x on 2 different machines including the one where before it reproduced every couple of runs. |
derekbruening
added a commit
that referenced
this issue
Feb 21, 2018
Instate 4 re-attach iters in the burst_threads and burst_thread*filter tests. Add "firstglob" support to runmulti to post-process only one of the 4 re-attach traces to keep the tests simpler and faster. Add testing of the thread filter callback being reset across re-attach by passing in a specific user param. Issue: #2175, #2820
derekbruening
added a commit
that referenced
this issue
Feb 22, 2018
Resets callback functions at exit to better support re-attach. Adds re-attach testing to the burst_threads and burst_thread*filter tests. Adds "firstglob" support to runmulti to post-process only one of the 4 re-attach traces to keep the tests simpler and faster. Adds testing of the thread filter callback being reset across re-attach by passing in a specific user param. Issue: #2175, #2820
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My #2157 re-attach tree tries to add a re-attach loop to the burst_threads
test, but it sometimes fails for 32-bit:
I can repro this manually every couple of attempts:
There are only 2 threads (there's no synch stopping the other app threads
from exiting while I attach the debugger, so it's expected):
So the app thread is in do_some_work() calling sin() presumably in the code
cache.
Yet here's another one -- it's at a native PC but eax seems to be messed up:
OK I got the bad PC again with more info now:
So it did a ret to get to the bad PC.
Except the stack frame is bigger than 0x3c! It's 0x64, as shown below. ?!?!
Running in DR -loglevel 3 in a single thread: the next OP_ret after
entering __subsin is that 0x60-frame ret.
Another one, this one with an even smaller frame shift:
Look at ebp as well, for both: it's very different from esp, when __dubsin
does not write or even read it.
Here's another bad-ebp one, once again pointing into a library code
section, but this one has the bad ebp value in the xl8:
Removing the re-attach loop: I cannot repro any crashes in 200+ runs.
With re-attach: I can get a crash just about every other time.
Yet the detach context, etc. should all be per-thread: there's no global
state here, right?
Is it corruption from some other thread?
Or is it some sigreturn thing?
1 thread instead of 8: 200 iters w/ no crashes.
Check out this one: I added an extra re-attach, and on the final detach, we
only have 3 other threads, and 2 of them both end up crashing, one with a
bad PC and one with a bad eax which it sets itself:
The bad PC one was sent to a DR address?!?
Xref self-interp #2161. Doesn't that require an app timer signal, though?
Would SIGCHLD trigger it? Isn't SIGCHLD only going to the parent?
At this point I'm adding the re-attach best-effort code I have and
disabling this test, to make progress, and filing this as a bug to fix
separately.
The text was updated successfully, but these errors were encountered: