Closed Bug 179166 Opened 23 years ago Closed 23 years ago

A null event queue crashes necko app; need eventQueue check for Proxy release in nsRequestObserverProxy destructor

Categories

(Core :: Networking, defect)

x86
Windows NT
defect
Not set
critical

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: depman1, Assigned: darin.moz)

References

()

Details

(Keywords: crash)

Attachments

(1 file, 1 obsolete file)

Mozilla 1.2b Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2b) Gecko/20021106 1. cd to /mozilla/dist/bin. 2. TestSocketTransport Result: crash with "memory could not be read". unhandled exception. Causes proxy init to fail. In nsRequestObserverProxy.cpp, nsRequestObserverProxy::~nsRequestObserverProxy(), need: if(mEventQ) ProxyRelease(mEventQ, obs); else ... In TestSocketTransport.cpp (TestConnection::Run), add code for eventQService handling. Need to get a real event queue. Call stack: ProxyRelease(nsIEventQueue * 0x00000000, nsIRequestObserver * 0x00d920c4) line 87 + 7 bytes nsRequestObserverProxy::~nsRequestObserverProxy() line 229 + 21 bytes nsRequestObserverProxy::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsRequestObserverProxy::Release(nsRequestObserverProxy * const 0x00da4480) line 239 + 147 bytes nsStreamListenerProxy::~nsStreamListenerProxy() line 92 + 27 bytes nsStreamListenerProxy::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsStreamListenerProxy::Release(nsStreamListenerProxy * const 0x00da4aa0) line 227 + 147 bytes nsCOMPtr<nsIStreamListenerProxy>::~nsCOMPtr<nsIStreamListenerProxy>() line 491 NS_NewStreamListenerProxy(nsIStreamListener * * 0x017afee8, nsIStreamListener * 0x00d920c4, nsIEventQueue * 0x00000000, unsigned int 2048, unsigned int 8192) line 528 + 26 bytes nsSocketTransport::AsyncRead(nsSocketTransport * const 0x00dfbae0, nsIStreamListener * 0x00d920c4, nsISupports * 0x00dfbae0, unsigned int 0, unsigned int 4294967295, unsigned int 0, nsIRequest * * 0x00d920ec) line 1755 + 55 bytes TestConnection::Run(TestConnection * const 0x00d920c0) line 391 + 86 bytes nsThread::Main(void * 0x00dfcbc0) line 120 + 26 bytes _PR_NativeRunThread(void * 0x00dfc9a0) line 433 + 13 bytes _threadstartex(void * 0x00dfc7f0) line 212 + 13 bytes KERNEL3
Keywords: crash
QA Contact: benc → depstein
This patch works around the problem in nsRequestObserverProxy where a crash will occur if there is NO event queue for the thread... -- rick
Attachment #108949 - Flags: superreview?(darin)
Attachment #108949 - Flags: review?(dougt)
Comment on attachment 108949 [details] [diff] [review] Make TestSocketTransport create an event queue for each helper thread. instead of createThreadEventQueue use createMonitoredThreadEventQueue.
Attachment #108949 - Flags: review?(dougt) → review+
Comment on attachment 108949 [details] [diff] [review] Make TestSocketTransport create an event queue for each helper thread. sr=darin
Attachment #108949 - Flags: superreview?(darin)
Attachment #108949 - Flags: superreview+
Attachment #108949 - Flags: review?(dougt)
Attachment #108949 - Flags: review+
Attachment #108949 - Attachment is obsolete: true
I've checked in the most recent patch for TestSocketTransport. -- rick
darin, can you fix the problem in nsRequestObserverProxy.cpp where a crash occurs if the eventQ is null? you can reproduce this crash by running TestSocketTransport without the patch i just checked in :-) thanks, -- rick
Assignee: rpotts → darin
rick: hmm.. from reading the code it looks like the crash will occur if nsRequestObserverProxy::Init is not called. it is trivial to make it null check mEventQ, but i wonder why Init is not being called.
By the definitions on <http://bugzilla.mozilla.org/bug_status.html#severity> and <http://bugzilla.mozilla.org/enter_bug.cgi?format=guided>, crashing and dataloss bugs are of critical or possibly higher severity. Only changing open bugs to minimize unnecessary spam. Keywords to trigger this would be crash, topcrash, topcrash+, zt4newcrash, dataloss.
Severity: normal → critical
QA Contact: depstein → carosendahl
Attachment #108949 - Flags: review?(dougt)
TestSocketTransport was rewritten for the async-io landing... it currently uses CreateMonitoredThreadEventQueue, so bug is WFM ;-)
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
v
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: