Closed Bug 242532 Opened 22 years ago Closed 8 years ago

Shutdown crash in xpcshell [@ nsTimerImpl::Shutdown] because PR_LOG_TEST expects the caller to make sure the log module is non null

Categories

(Core :: XPCOM, defect, P5)

x86
Windows XP
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: timeless, Unassigned)

Details

(Keywords: crash)

Crash Data

This crash has been encountered before, see bug 124958 comment 5. This bug is based on code which isn't in cvs. compiler is msvc7.0. it's a change wtc requested, which I dislike. That said, I'm not sure I disagree with portions of his request, and in fact, I think I dislike the xpcom code more than I dislike his requested change. The request is from bug 237326 comment 8: ... if multiple callers call PR_NewLogModule("test"), only one should succeed; the others [should] fail rather than return a handle to the existing log module. I'm running with that patch to test my dynamic logging module (I wanted to make sure that I could implement wtc's style and still do what I needed before I posted the nspr portion of the patch). R:\mozilla\all-i586-pc-msvc\dist\bin>xpcshell.exe Type Manifest File: R:\mozilla\all-i586-pc-msvc\dist\bin\components\xpti.dat +++ JavaScript debugging hooks installed. nsNativeComponentLoader: autoregistering begins. *** Registering embedcomponents components (all right -- a generic module!) nsNativeComponentLoader: autoregistering succeeded nNCL: registering deferred (0) js> l=Components.classes["@mozilla.org/embedcomp/prlog-service;1"].getService(Components.interfaces.nsIPRLoggingService) [xpconnect wrapped nsIPRLoggingService @ 0xff6c38] js> l.setLogLevel("nsComponentManager",5) js> l.logFile="WinDebug" WinDebug js> Components.classes["@mozilla.org/file/local;1"].createInstance() [xpconnect wrapped nsISupports @ 0xff80f8] js> quit() WARNING: nsExceptionService ignoring thread destruction after shutdown, file r:/mozilla/xpcom/base/nsExceptionService.cp p, line 191 +++ JavaScript debugging hooks removed. > xpcom.dll!nsTimerImpl::Shutdown() Line 192 + 0x5 C++ xpcom.dll!NS_ShutdownXPCOM(nsIServiceManager * servMgr=0x00000000) Line 771 C++ xpcshell.exe!main(int argc=0x00000000, char * * argv=0x00367ba4, char * * envp=0x003630d0) Line 1379 + 0x8 C++ xpcshell.exe!mainCRTStartup() Line 400 + 0x11 C kernel32.dll!GetCurrentDirectoryW() + 0x44 void nsTimerImpl::Shutdown() { 0047C0E0 push ebp 0047C0E1 mov ebp,esp 0047C0E3 sub esp,10h #ifdef DEBUG_TIMERS if (PR_LOG_TEST(gTimerLog, PR_LOG_DEBUG)) { 0047C0E6 mov eax,dword ptr [gTimerLog (51C128h)] ; we are here 0047C0EB cmp dword ptr [eax+4],4 0047C0EF jl nsTimerImpl::Shutdown+0E0h (47C1C0h) PR_LOG_DEBUG 0x00000004 int + gTimerLog 0x00000000 {name=??? level=??? next=??? } PRLogModuleInfo * From the log you can see that I didn't try to create any timers. I believe that what happened is two logging modules were created for gTimerLog, one for TimerThread.cpp and one for nsTimerImpl.cpp, I happened to be playing with (dynamic) nspr logging in this session, but I believe this isn't my fault. I'm a bit confused by it though... as I can't reproduce this with a simple xpcshell launch... even with the same build and same commands.
Severity: normal → critical
Keywords: crash
I propose that we resolve this bug invalid. I don't think we need to require that NSPR log modules have unique names. (See bug 237326 comment 12.) Without that requirement, the crash described in this bug won't occur.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Assignee: dougt → nobody
QA Contact: xpcom
Crash Signature: [@ nsTimerImpl::Shutdown]
Closing because no crash reported since 12 weeks.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.