Skip to content
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

CRASH ui_tests WorkerFileSystemTest.Temporary "Early thread failure, no dcontext" #442

Closed
derekbruening opened this issue Nov 28, 2014 · 2 comments

Comments

@derekbruening
Copy link
Contributor

From bruen...@google.com on June 03, 2011 15:14:50

full drmem on ui_tests WorkerFileSystemTest.Temporary

=>

"Early thread failure, no dcontext"

but stack's CONTEXT and ExcptRec seem corrupted: pExcptRec on stack isn't
even 4-aligned, CONTEXT is mostly zeroes.

still not sure what's going on.

Original issue: http://code.google.com/p/drmemory/issues/detail?id=442

@derekbruening
Copy link
Contributor Author

From bruen...@google.com on August 04, 2011 14:39:55

the confusion in debugging was b/c ended up on initstack b/c thread was exiting.
I located the original stack and found the crash:

00 159a9d10 10007b34 dynamorio!dr_get_thread_id+0x4 [e:\src\dr\git\src\core\x86\instrument.c @ 3223]
01 159a9d70 70d5aa19 drmemorylib!event_thread_exit+0x1f4 [e:\src\drmemory\git\src\drmemory\drmemory.c @ 411]
02 159a9d98 70cf800f dynamorio!instrument_thread_exit_event+0x99 [e:\src\dr\git\src\core\x86\instrument.c @ 1097]
03 159a9db8 70cf8157 dynamorio!dynamo_thread_exit_common+0xbf [e:\src\dr\git\src\core\dynamo.c @ 2299]
04 159a9dc8 70cd1146 dynamorio!dynamo_thread_exit+0x17 [e:\src\dr\git\src\core\dynamo.c @ 2401]
05 159a9dd8 1550ca80 dynamorio!cleanup_and_terminate+0x55

it's ASSERT calling dr_get_current_drcontext()
that's easy to fix: but the ASSERT is b/c can't find TEB:

WARNING: get_TEB_from_tid tid=2268 failed 0xc0000022
ASSERT FAILURE (thread 0): ..\src\drmemory\drmemory.c:411: teb != NULL (invalid param)

0:005> kb =0x2002f9cc 0x2002f9b8 0x772f0086
ChildEBP RetAddr Args to Child
2002f9b4 7732d5d1 00000000 00000000 00000002 ntdll!ZwTerminateThread+0x12
2002f9cc 77331b09 00000000 30382703 00000000 ntdll!RtlExitUserThread+0x39
2002fb28 7514339a 00469d78 2002fb74 77309ed2 ntdll!TppWorkerThread+0x856
2002fb34 77309ed2 00469d78 3038275f 00000000 kernel32!BaseThreadInitThunk+0xe
2002fb74 77309ea5 77316679 00469d78 00000000 ntdll!__RtlUserThreadStart+0x70
2002fb8c 00000000 77316679 00469d78 00000000 ntdll!_RtlUserThreadStart+0x1b

so it's a thread pool thread who's refusing us access.

solution: cache TEB from when running as that thread.

xref issue #538 w/ same thread type

@derekbruening
Copy link
Contributor Author

From derek.br...@gmail.com on August 05, 2011 07:08:12

This issue was closed by revision r456 .

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant