Open derekbruening opened 9 years ago
From bruen...@google.com on May 07, 2014 08:52:39
Solutions:
It seems impractical to figure out just from the thread context that it's waiting, as it can be in the vsyscall or ntdll. We could perhaps walk the callstack and look for DR but that seems fragile.
If we store info about the looping thread: where? DR may not be init so can't use heap. Could have static array or sthg and assume there are never more than a few of these at once. Thread id array perhaps, with atomic inc index into it when adding.
The takeover code iterates until fixed point which is as good as we'll get for handling races w/ new ones coming in. If one comes in after takeover but before fully init, should work fine.
There's still a race though: if a new thread hits the wait loop but hasn't yet put id into array, takeover will take it over and hit this self-interp bug. So it seems that we want a flag combined w/ a context check for being in dynamorio.dll.
From derek.br...@gmail.com on May 07, 2014 11:59:10
This issue was closed by revision r2686 .
Status: Fixed
From bruen...@google.com on May 14, 2014 16:02:57
May need to re-open this: http://build.chromium.org/p/chromium.fyi/builders/Windows%20Browser%20%28DrMemory%20full%29%20%281%29/builds/3967/steps/memory%20test%3A%20browser_tests/logs/stdio
UNINITIALIZED READ: reading register eax
# 0 dynamorio.dll!nt_create_event [e:\b\build\slave\win-builder\drmemory\dynamorio\core\win32\ntdll.c:3716]
# 1 dynamorio.dll!mutex_wait_contended_lock [e:\b\build\slave\win-builder\drmemory\dynamorio\core\win32\os.c:8047]
# 2 dynamorio.dll!mutex_lock [e:\b\build\slave\win-builder\drmemory\dynamorio\core\utils.c:886]
# 3 dynamorio.dll!dynamo_thread_init [e:\b\build\slave\win-builder\drmemory\dynamorio\core\dynamo.c:2024]
# 4 dynamorio.dll!intercept_new_thread [e:\b\build\slave\win-builder\drmemory\dynamorio\core\win32\callback.c:2988]
# 5 dynamorio.dll!intercept_ldr_init [e:\b\build\slave\win-builder\drmemory\dynamorio\core\win32\callback.c:3238]
# 6 dynamorio.dll!interception_code_array
Note: @0:00:07.407 in thread 3888
Note: instruction: test %eax %eax
The report came from the ContentAutofillDriverBrowserTest.TestPageNavigationHidingAutofillPopup
test.
Status: Accepted
From bruen...@google.com on May 14, 2014 16:35:26
My theory is that a thread is pointing right at the start of LdrInitializeThunk which will not be caught by r2686 .
From derek.br...@gmail.com on May 14, 2014 20:25:52
This issue was closed by revision r2690 .
Status: Fixed
From bruen...@google.com on July 17, 2014 21:34:39
Re-opening as it seems there are still instances of this:
This report observed at http://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Browser%20%28DrMemory%20full%29%20%283%29/builds/173 didn't match any suppressions:
Suppression (error hash=#129BAB70584A3771#):
{
UNINITIALIZED READ
name=
This report observed at http://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Browser%20%28DrMemory%20full%29%20%283%29/builds/173 didn't match any suppressions:
Suppression (error hash=#5554065D1FEBA5D6#):
{
UNADDRESSABLE ACCESS
name=
Status: Started
Xref #2904
From bruen...@google.com on May 07, 2014 10:22:48
This is the DR bug causing https://code.google.com/p/drmemory/issues/detail?id=1541 Analyzing the ldmp there: http://build.chromium.org/p/chromium.fyi/builders/Windows%20Browser%20%28DrMemory%20full%29%20%282%29/builds/3534/steps/memory%20test%3A%20browser_tests/logs/stdio UsbApiTest.ZeroLengthTransfer
So enter_fcache returned, and ebp is messed up which messes up esp: enter_fcache(dcontext, fcache_enter, FCACHE_ENTRY_PC(targetf)); ASSERT_NOT_REACHED();
Only 2 threads. Other thread is here -- but wrong syms!:
Here are the real symbols, but they seem suspect as this is not FtpBrowserTest!
the thread start addresses: bad one is in chrome_elf.dll (other is in browser_tests.exe): so not a nudge thread
unable to set thread start address to 681F53B0
why are there so few threads? I thought renderers always had at least a dozen threads (xref issue #130 data). this must be early on, with the process just starting up? also in that issue #130 data: 2nd thread is in base.dll, not chrome_elf.
In a local run of UsbApiTest.ZeroLengthTransfer there are 2 renderer processes: one has --extension-process and the other doesn't. The ldmp is from the extension thread. For that one locally:
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1443