DynamoRIO / drmemory

Memory Debugger for Windows, Linux, Mac, and Android
Other
2.45k stars 263 forks source link

Internal crash when debugging Pidgin (Windows 1.9.0-RC1) #1768

Open EionRobb opened 9 years ago

EionRobb commented 9 years ago
---------------------------
Dr. Memory Notice: C:\Program Files (x86)\Pidgin\pidgin.exe(10580)
---------------------------
Application C:\Program Files (x86)\Pidgin\pidgin.exe (10580).  Dr. Memory internal crash at PC 0x73861b9f.  Please report this at http://drmemory.org/issues.  Program aborted.
0xc0000005 0x00000000 0x73861b9f 0x73861b9f 0x00000000 0x0464a20c
Base: 0x70060000
Registers: eax=0x0464a211 ebx=0x28fc5508 ecx=0x00000000 edx=0xffffffff
    esi=0x28f895fc edi=0x00000000 esp=0x2564e6cc ebp=0x0464a200
    eflags=0x000
1.9.0-0-(Aug 28 2015 22:56:18) win100
-no_dynamic_options -disasm_mask 8 -logdir 'C:\Users\Eion Robb\AppData\Roaming\Dr. Memory\dynamorio' -client_lib 'C:\Program Files (x86)\Dr. Memory\bin\release\drmemorylib.dll;0;-logdir `C:\Users\Eion Robb\AppData\Roaming\Dr. Memory` -symcache_dir `C:\Users\Eion Robb\AppData\Roaming\Dr. Memory\symcache` -lib_blacklist `C
C:\Program Files (x86)\Dr. Memory\bin\release\drmemorylib.dll=0x73800000
C:\Program Files (x86)\Dr. Memory\bin\release/dbghelp.dll=0x02530000
C:\WINDOWS/system32/msvcrt.dll=0x00d10000
C:\WINDOWS/system32/kernel32.dll=0x02650000
C:\WINDOWS/system32/KERNELBASE.dll=0x02740000

What steps will reproduce the problem?

  1. Install a plugin compiled without ggdb, eg the Facebook Pidgin plugin, eg https://github.com/jgeboski/purple-facebook/releases/tag/565fbae05259
  2. path\to\drmemory.exe -- path\to\pidgin.exe --debug
  3. Last debug message will show a plugin has crashed drmemory, eg:
(14:11:24) plugins: probing C:\Program Files (x86)\Pidgin\plugins\libfacebook (8).dll
<Application C:\Program Files (x86)\Pidgin\pidgin.exe (7880).  Dr. Memory internal crash at PC 0x73861b9f.  Please report this at http://drmemory.org/issues.  Program aborted.

What is the expected output? What do you see instead?

Hoping that it will skip over that particular plugin and continue, rather than crash

What version of the product are you using? On what operating system?

DrMemory 1.9.0-RC1 on Windows 10

Does the problem go away when running in light mode (pass "-light" to Dr. Memory)? What about when running with the options "-leaks_only -no_count_leaks -no_track_allocs"?

"-light" does work mostly. It'll output

~~4108~~ WARNING: application is missing line number information.
~~4108~~ Re-compile with the -ggdb flag to include DWARF2 line numbers.

for the first plugin that isn't compiled with gdb, but it will still crash upon the next plugin without it comes across Running with "-leaks_only -no_count_leaks -no_track_allocs" does not work, same crash Also crashes with "-no_count_leaks" and "-leaks_only -no_count_leaks" (as per narrowing down the source

Does the problem go away when using the most recent build from http://build.chromium.org/p/client.drmemory/builds/?

Unsure, will try later

Try the debug version of Dr. Memory and of its underlying engine DynamoRIO by passing "-debug -dr_debug -pause_at_assert" to drmemory.exe. Are any messages reported?

Unsure, will try later

Please provide any additional information below. Please also see the "Narrowing Down the Source of the Problem" section of https://github.com/DynamoRIO/drmemory/wiki/Debugging.

I imagine it's something to do with handling one block of non-ggdb compiled code, but not mixed dll's, some with and some without? Wild guess though :)

EionRobb commented 9 years ago

After looking into the global.log file, the sporadic nature of it came down to libbonjour.dll that ships with Pidgin spawning a thread and causing a crash later on during other plugin loads, eg


module load event: "libbonjour.dll" 0x522b0000-0x522cd000 modid: 128 C:\Program Files (x86)\Pidgin\plugins\libbonjour.dll
new thread #5 id=7576

module load event: "libjson-glib-1.0.dll" 0x68900000-0x6898a000 modid: 129 C:\Program Files (x86)\Pidgin\libjson-glib-1.0.dll

module load event: "libfacebook.dll" 0x52210000-0x522a6000 modid: 130 C:\Program Files (x86)\Pidgin\plugins\libfacebook (8).dll
WARNING: unable to load symbols for C:\WINDOWS\SYSTEM32\RPCRT4.dll
WARNING: unable to load symbols for C:\WINDOWS\SYSTEM32\sechost.dll
WARNING: unable to load symbols for C:\Windows\SysWOW64\logoncli.dll
WARNING: unable to load symbols for C:\Program Files (x86)\Pidgin\plugins\libbonjour.dll
WARNING: unable to load symbols for C:\WINDOWS\SYSTEM32\KERNEL32.DLL
WARNING: unable to load symbols for C:\Program Files (x86)\Pidgin\pidgin.dll
WARNING: unable to load symbols for C:\Program Files (x86)\Pidgin\pidgin.exe

NEW THREAD: thread id 7576 created here:

Which makes it appear as if it's the facebook.dll causing the crash. So now I'm a bit lost as to what it could be causing the 0x73861b9f crash :)

derekbruening commented 9 years ago

% bin/symquery.exe -e bin/release/drmemorylib.dll -f -a 0x61b9f drsym_pecoff_sort_symbols+0x2f d:\drmemory_package\dynamorio\ext\drsyms\drsyms_pecoff.c:402+0x0

EionRobb commented 9 years ago

I'm taking a guess that you're wanting me to execute that?

C:\Program Files (x86)\Dr. Memory>bin\symquery.exe -e bin\release\drmemorylib.dll -f -a 0x61b9f drsym_pecoff_sort_symbols+0x2f d:\drmemory_package\dynamorio\ext\drsyms\drsyms_pecoff.c:402+0x0
drsym_pecoff_sort_symbols+0x2f
d:\drmemory_package\dynamorio\ext\drsyms\drsyms_pecoff.c:402+0x0
handle_make_mem_defined_if_addressable+0xfffff00d
??:0
handle_make_mem_defined_if_addressable+0xfffff00d
??:0
derekbruening commented 9 years ago

No, sorry, was just pasting info on the crash address.