Closed Bug 494721 Opened 16 years ago Closed 16 years ago

Crash in XPCJSRuntime::WatchdogMain

Categories

(Core :: XPConnect, defect)

ARM
Windows CE
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 494973

People

(Reporter: hiro, Unassigned)

References

Details

This crash is very weird. It is occurred in unloaded module, so I can not get stack traces with valid symbols. As far as I investigate the first address of the following traces, it seems to be http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/src/xpcjsruntime.cpp#807 Stack trace: 0x7a092fd0 0x7820c108 0x78205308 0x78209b54 0x03f6732c Unfortunately, there is no symbols since these addresses (at least top four addresses) seem to be functions in xul.dll. But xul.dll is already unloaded. The last log is: Unload module: xpcom.dll Unload module: softokn3.dll nsStringStats => mAllocCount: 13354 => mReallocCount: 2151 => mFreeCount: 12264 -- LEAKED 1090 !!! => mShareCount: 14363 => mAdoptCount: 1150 => mAdoptFreeCount: 1148 -- LEAKED 2 !!! Unload module: xul.dll Unload module: sqlite3.dll Unload module: js3250.dll Unload module: smime3.dll Unload module: ssl3.dll Prefetch Abort: Thread=9fc01000 Proc=80096ec0 'fennec.exe' Unload module: nss3.dll AKY=00001001 PC=7a092fd0(???+0x7a092fd0) RA=7820c108(nspr4.dll+0x0003c108) BVA=7a092fd0 FSR=00000407 Unload module: nssutil3.dll Unload module: plc4.dll Unhandled exception at 0x7a092fd0 in fennec.exe: 0xC0000005: Access violation reading location 0x7a092fd0.
This crash happens when I terminate Fennec by task manager. I guess the reason of the crash is that the destructor of XPCJSRuntime is not called while exiting Fennec. The destructor of XPCJRuntime is not called too on Linux, but there is no crash. Maybe watchdog thread is cleaned implicitly.
wait, terminate by task manager? does that mean it goes through some strange event loop triggered thing? again, the problem is that the signal used to tell the thread to die isn't being sent. please use a debugger to get the stack trace for FreeLibrary.
Assignee: jhpedemonte → nobody
Component: Java to XPCOM Bridge → XPConnect
QA Contact: xpcom-bridge → xpconnect
(In reply to comment #2) > wait, terminate by task manager? Yes. Fennec on WinCE does not have the function for application exit. It can not be terminated without task manager. > again, the problem is that the signal used to tell the thread to die isn't > being sent. > > please use a debugger to get the stack trace for FreeLibrary. IIRC, the library which was unloaded while crashing is not the same all time.
Unload module: smime3.dll Prefetch Abort: Thread=9dc79b38 Proc=80096ec0 'fennec.exe' Unload module: ssl3.dll AKY=00001001 PC=7a092fe4(???+0x7a092fe4) RA=7820c108(nspr4.dll+0x0003c108) BVA=7a092fe4 FSR=00000407 Unload module: nss3.dll Unload module: nssutil3.dll Unhandled exception at 0x7a092fe4 in fennec.exe: 0xC0000005: Access violation reading location 0x7a092fe4. This time the crash was happened after nssutil3.dll was unloaded. According to the trace in comment #0, the next module which should be unloaded is plc4.dll.
(In reply to comment #1) > The destructor of XPCJRuntime is not called too on Linux, but there is no > crash. Maybe watchdog thread is cleaned implicitly. On Linux, I terminate Fennec by "close button" at the top left of window so Fennec should terminate harmlessly.
i don't care. heck, get me stack traces for *each* FreeLibrary call.
Unfortunately, I can not get stack traces in xul.dll since FreeLibrary in XPCOMGlueUnload seems to be not called when application is terminated by task manager. I use Visual Studio 2008 and set a break point at the call of FreeLibrary, but can not be stopped at there. And debug print with wprintf does not output anything. Do you have any idea to get stack traces correctly?
Depends on: 494973
Mark, thank you very much! I confirmed the crash has gone after this changeset. http://hg.mozilla.org/mobile-browser/rev/627870ff78ab
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.