Last Comment Bug 679783 - crash [@ mozilla::net::WebSocketChannel::OnInputStreamReady]
: crash [@ mozilla::net::WebSocketChannel::OnInputStreamReady]
: crash, verified-aurora, verified-beta
Product: Core
Classification: Components
Component: Networking: WebSockets (show other bugs)
: Trunk
: x86 Windows 7
-- critical (vote)
: mozilla9
Assigned To: Patrick McManus [:mcmanus]
: Patrick McManus [:mcmanus]
Depends on:
  Show dependency treegraph
Reported: 2011-08-17 10:38 PDT by Martijn Wargers [:mwargers]
Modified: 2011-09-14 11:10 PDT (History)
8 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch 1 (1.06 KB, patch)
2011-08-17 12:54 PDT, Patrick McManus [:mcmanus]
jduell.mcbugs: review+
asa: approval‑mozilla‑aurora+
asa: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description User image Martijn Wargers [:mwargers] 2011-08-17 10:38:30 PDT
This bug was filed from the Socorro interface and is 
report bp-b60f8316-99ec-4a39-99fa-fa5742110817 .
0 	xul.dll 	mozilla::net::WebSocketChannel::OnInputStreamReady 	netwerk/protocol/websocket/WebSocketChannel.cpp:2416
1 	xul.dll 	nsInputStreamReadyEvent::Run 	xpcom/io/nsStreamUtils.cpp:114
2 	xul.dll 	nsThread::ProcessNextEvent 	xpcom/threads/nsThread.cpp:631
3 	xul.dll 	nsSocketTransportService::DoPollIteration 	netwerk/base/src/nsSocketTransportService2.cpp:770
4 	xul.dll 	nsSocketTransportService::Run 	netwerk/base/src/nsSocketTransportService2.cpp:638
5 	xul.dll 	nsThread::ProcessNextEvent 	xpcom/threads/nsThread.cpp:631
6 	xul.dll 	nsRunnable::Release 	obj-firefox/xpcom/build/nsThreadUtils.cpp:55
7 	nspr4.dll 	_PR_NativeRunThread 	nsprpub/pr/src/threads/combined/pruthr.c:426
8 	nspr4.dll 	pr_root 	nsprpub/pr/src/md/windows/w95thred.c:122
9 	mozcrt19.dll 	_callthreadstartex 	obj-firefox/memory/jemalloc/crtsrc/threadex.c:348
10 	mozcrt19.dll 	_threadstartex 	obj-firefox/memory/jemalloc/crtsrc/threadex.c:326
11 	kernel32.dll 	BaseThreadInitThunk 	
12 	ntdll.dll 	__RtlUserThreadStart 	
13 	ntdll.dll 	_RtlUserThreadStart 	

While doing some testing with Websockets, I got this crash.
Sorry, I don't really have a testcase at hand.
Comment 1 User image Patrick McManus [:mcmanus] 2011-08-17 11:19:08 PDT
crud. It appears that an input event was queued, the websocket channel socket closed down, and then the input event was run which deref'd the channel socket.

Easy enough to fix at least. After it lands we can figure out if it applies to aurora/beta (probly does).
Comment 2 User image Patrick McManus [:mcmanus] 2011-08-17 12:54:23 PDT
Created attachment 553876 [details] [diff] [review]
patch 1
Comment 3 User image Mozilla RelEng Bot 2011-08-17 20:40:43 PDT
Try run for 14c2617c6cd7 is complete.
Detailed breakdown of the results available here:
Results (out of 2 total builds):
    success: 2
Builds available at
Comment 4 User image Jason Duell [:jduell] (needinfo me) 2011-08-26 12:07:49 PDT
Comment 5 User image Jason Duell [:jduell] (needinfo me) 2011-08-26 12:08:43 PDT
Comment on attachment 553876 [details] [diff] [review]
patch 1

one-line nullcheck avoids crashes, does no harm...
Comment 6 User image Marco Bonardo [::mak] 2011-08-27 01:48:18 PDT
Comment 7 User image Scoobidiver (away) 2011-08-27 03:30:37 PDT
It is #26 top browser crasher in 7.0b1 and #31 in 8.0a2.
Comment 9 User image Ioana (away) 2011-08-30 04:07:40 PDT
Can anyone please help me with a test case, STR or guidelines I can use to verify this fix?

Thank you
Comment 10 User image Martijn Wargers [:mwargers] 2011-08-30 04:44:42 PDT
I can't reproduce it anymore, using: 9.0a1 (2011-08-29)
Comment 11 User image Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-09-09 14:55:41 PDT
QA tracking, needs verification on Firefox 7 and 8 by checking crashstats.
Comment 12 User image Scoobidiver (away) 2011-09-10 03:02:09 PDT
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #11)
> QA tracking, needs verification on Firefox 7 and 8 by checking crashstats.
No crashes from 7.0b3 and 8.0a2/20110830:*%29
Comment 13 User image Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-09-14 11:10:32 PDT
Adding verified-flags based on comment 12.

Note You need to log in before you can comment on or make changes to this bug.