Closed Bug 1477446 Opened 7 years ago Closed 2 years ago

Intermittent Assertion failure: false (MOZ_ASSERT_UNREACHABLE: leaking stream event), at /builds/worker/workspace/build/src/xpcom/io/nsStreamUtils.cpp:75

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: intermittent-failure, Whiteboard: [necko-triaged][stockwell unknown])

Crash Data

Filed by: nerli [at] mozilla.com https://treeherder.mozilla.org/logviewer.html#?job_id=189286900&repo=mozilla-inbound https://queue.taskcluster.net/v1/task/EfFou1f-SDyx2_clz5v9oQ/runs/0/artifacts/public/logs/live_backing.log [task 2018-07-21T01:22:11.471Z] 01:22:11 INFO - GECKO(3867) | [Parent 3867, Main Thread] WARNING: NS_ENSURE_TRUE(maybeContext) failed: file /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp, line 909 [task 2018-07-21T01:22:11.495Z] 01:22:11 INFO - GECKO(3867) | [Parent 3867, Main Thread] WARNING: Setting user pref after profile shutdown.: file /builds/worker/workspace/build/src/modules/libpref/Preferences.cpp, line 3246 [task 2018-07-21T01:22:11.503Z] 01:22:11 INFO - GECKO(3867) | [Parent 3867, StreamTrans #15] WARNING: 'NS_FAILED(rv)', file /builds/worker/workspace/build/src/modules/libjar/nsJARChannel.cpp, line 417 [task 2018-07-21T01:22:11.504Z] 01:22:11 INFO - GECKO(3867) | [Parent 3867, Main Thread] WARNING: Dispatch failed: file /builds/worker/workspace/build/src/xpcom/io/nsStreamUtils.cpp, line 91 [task 2018-07-21T01:22:11.506Z] 01:22:11 INFO - GECKO(3867) | [Parent 3867, Main Thread] WARNING: Dispatch failed: file /builds/worker/workspace/build/src/xpcom/io/nsStreamUtils.cpp, line 91 [task 2018-07-21T01:22:11.507Z] 01:22:11 INFO - GECKO(3867) | Assertion failure: false (MOZ_ASSERT_UNREACHABLE: leaking stream event), at /builds/worker/workspace/build/src/xpcom/io/nsStreamUtils.cpp:75 [task 2018-07-21T01:22:11.508Z] 01:22:11 INFO - GECKO(3867) | #01: nsInputStreamReadyEvent::~nsInputStreamReadyEvent() [xpcom/io/nsStreamUtils.cpp:81] [task 2018-07-21T01:22:11.509Z] 01:22:11 INFO - [task 2018-07-21T01:22:11.510Z] 01:22:11 INFO - GECKO(3867) | #02: mozilla::Runnable::Release() [xpcom/threads/nsThreadUtils.cpp:50] [task 2018-07-21T01:22:11.511Z] 01:22:11 INFO - [task 2018-07-21T01:22:11.513Z] 01:22:11 INFO - GECKO(3867) | #03: nsTArray_Impl<nsPipeEvents::InputEntry, nsTArrayInfallibleAllocator>::ClearAndRetainStorage() [xpcom/io/nsPipe3.cpp:90] [task 2018-07-21T01:22:11.514Z] 01:22:11 INFO - [task 2018-07-21T01:22:11.515Z] 01:22:11 INFO - GECKO(3867) | #04: nsPipeEvents::~nsPipeEvents() [xpcom/ds/nsTArray.h:2093]
Summary: Intermittent Last test finished | application terminated with exit code 11 after Assertion failure: false (MOZ_ASSERT_UNREACHABLE: leaking stream event), at /builds/worker/workspace/build/src/xpcom/io/nsStreamUtils.cpp → Intermittent Assertion failure: false (MOZ_ASSERT_UNREACHABLE: leaking stream event), at /builds/worker/workspace/build/src/xpcom/io/nsStreamUtils.cpp:75
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE

Since this bug was reopened, 6 days ago, there are 74 failures.

They occur on linux32, linux64, osx-10-10 and windows7-32. The affected build type is debug.

Recent failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=224749928&repo=autoland&lineNumber=19606

[Child 11657, Main Thread] WARNING: Dispatch failed: file /builds/worker/workspace/build/src/xpcom/io/nsStreamUtils.cpp, line 81
[task 2019-01-29T17:01:04.018Z] 17:01:04 INFO - PID 9966 | [Child 11657, Main Thread] WARNING: Dispatch failed: file /builds/worker/workspace/build/src/xpcom/io/nsStreamUtils.cpp, line 81
[task 2019-01-29T17:01:04.018Z] 17:01:04 INFO - PID 9966 | Assertion failure: false (MOZ_ASSERT_UNREACHABLE: leaking stream event), at /builds/worker/workspace/build/src/xpcom/io/nsStreamUtils.cpp:67
[task 2019-01-29T17:01:04.103Z] 17:01:04 INFO - mozcrash .
[task 2019-01-29T17:01:04.103Z] 17:01:04 INFO - mozcrash Copy/paste: /builds/worker/workspace/build/linux64-minidump_stackwalk /tmp/tmpeoTTfH.mozrunner/minidumps/2a49401a-b52a-43f5-d2a3-5d6fbca78a50.dmp /builds/worker/workspace/build/symbols
[task 2019-01-29T17:01:25.170Z] 17:01:25 INFO - mozcrash Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/2a49401a-b52a-43f5-d2a3-5d6fbca78a50.dmp
[task 2019-01-29T17:01:25.206Z] 17:01:25 INFO - mozcrash Saved app info as /builds/worker/workspace/build/blobber_upload_dir/2a49401a-b52a-43f5-d2a3-5d6fbca78a50.extra
[task 2019-01-29T17:01:25.291Z] 17:01:25 INFO - PROCESS-CRASH | /fetch/api/basic/stream-response.any.worker.html | application crashed [@ nsInputStreamReadyEvent::~nsInputStreamReadyEvent()]
[task 2019-01-29T17:01:25.291Z] 17:01:25 INFO - Crash dump filename: /tmp/tmpeoTTfH.mozrunner/minidumps/2a49401a-b52a-43f5-d2a3-5d6fbca78a50.dmp
[task 2019-01-29T17:01:25.292Z] 17:01:25 INFO - Operating system: Linux
[task 2019-01-29T17:01:25.292Z] 17:01:25 INFO - 0.0.0 Linux 4.4.0-1014-aws #14taskcluster1-Ubuntu SMP Tue Apr 3 10:27:00 UTC 2018 x86_64
[task 2019-01-29T17:01:25.293Z] 17:01:25 INFO - CPU: x86
[task 2019-01-29T17:01:25.294Z] 17:01:25 INFO - GenuineIntel family 6 model 62 stepping 4
[task 2019-01-29T17:01:25.294Z] 17:01:25 INFO - 4 CPUs
[task 2019-01-29T17:01:25.296Z] 17:01:25 INFO -
[task 2019-01-29T17:01:25.297Z] 17:01:25 INFO - GPU: UNKNOWN
[task 2019-01-29T17:01:25.298Z] 17:01:25 INFO -
[task 2019-01-29T17:01:25.300Z] 17:01:25 INFO - Crash reason: SIGSEGV /SEGV_MAPERR
[task 2019-01-29T17:01:25.301Z] 17:01:25 INFO - Crash address: 0x0
[task 2019-01-29T17:01:25.302Z] 17:01:25 INFO - Process uptime: not available
[task 2019-01-29T17:01:25.304Z] 17:01:25 INFO -
[task 2019-01-29T17:01:25.305Z] 17:01:25 INFO - Thread 0 (crashed)
[task 2019-01-29T17:01:25.307Z] 17:01:25 INFO - 0 libxul.so!nsInputStreamReadyEvent::~nsInputStreamReadyEvent() [nsStreamUtils.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 67 + 0x0]
[task 2019-01-29T17:01:25.307Z] 17:01:25 INFO - eip = 0xed0da738 esp = 0xffd6efc0 ebp = 0xffd6eff8 ebx = 0xf5411000
[task 2019-01-29T17:01:25.308Z] 17:01:25 INFO - esi = 0x00000043 edi = 0xe730d210 eax = 0xf286205d ecx = 0x565cc51c
[task 2019-01-29T17:01:25.310Z] 17:01:25 INFO - edx = 0x00000000 efl = 0x00210282
[task 2019-01-29T17:01:25.311Z] 17:01:25 INFO - Found by: given as instruction pointer in context
[task 2019-01-29T17:01:25.312Z] 17:01:25 INFO - 1 libxul.so!<name omitted> [nsStreamUtils.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 47 + 0x8]
[task 2019-01-29T17:01:25.312Z] 17:01:25 INFO - eip = 0xed0da763 esp = 0xffd6f000 ebp = 0xffd6f018 ebx = 0xf5411000
[task 2019-01-29T17:01:25.313Z] 17:01:25 INFO - esi = 0xe730d1f0 edi = 0xe730d1f0
[task 2019-01-29T17:01:25.313Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.313Z] 17:01:25 INFO - 2 libxul.so!mozilla::Runnable::Release() [nsThreadUtils.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 49 + 0x8]
[task 2019-01-29T17:01:25.314Z] 17:01:25 INFO - eip = 0xed10e8fc esp = 0xffd6f020 ebp = 0xffd6f038 ebx = 0xf5411000
[task 2019-01-29T17:01:25.315Z] 17:01:25 INFO - esi = 0x00000000 edi = 0xe730d1f0
[task 2019-01-29T17:01:25.315Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.315Z] 17:01:25 INFO - 3 libxul.so!non-virtual thunk to nsInputStreamReadyEvent::Release() [nsStreamUtils.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 109 + 0x8]
[task 2019-01-29T17:01:25.316Z] 17:01:25 INFO - eip = 0xed0d6c8d esp = 0xffd6f040 ebp = 0xffd6f048 ebx = 0xf5411000
[task 2019-01-29T17:01:25.317Z] 17:01:25 INFO - esi = 0xe733d43c edi = 0xe733d43c
[task 2019-01-29T17:01:25.317Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.318Z] 17:01:25 INFO - 4 libxul.so!nsCOMPtr<nsIInputStreamCallback>::~nsCOMPtr() [nsCOMPtr.h:22ec021f1f92a342023765975e0ab9cffa85baef : 441 + 0x8]
[task 2019-01-29T17:01:25.319Z] 17:01:25 INFO - eip = 0xed0b7391 esp = 0xffd6f050 ebp = 0xffd6f068 ebx = 0xf5411000
[task 2019-01-29T17:01:25.319Z] 17:01:25 INFO - esi = 0xe733d43c edi = 0xe733d43c
[task 2019-01-29T17:01:25.320Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.320Z] 17:01:25 INFO - 5 libxul.so!nsTArray_Impl<nsPipeEvents::InputEntry, nsTArrayInfallibleAllocator>::DestructRange(unsigned int, unsigned int) [nsPipe3.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 79 + 0x11]
[task 2019-01-29T17:01:25.320Z] 17:01:25 INFO - eip = 0xed0dbb33 esp = 0xffd6f070 ebp = 0xffd6f088 ebx = 0xf5411000
[task 2019-01-29T17:01:25.321Z] 17:01:25 INFO - esi = 0x00000008 edi = 0xe733d43c
[task 2019-01-29T17:01:25.322Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.322Z] 17:01:25 INFO - 6 libxul.so!nsTArray_Impl<nsPipeEvents::InputEntry, nsTArrayInfallibleAllocator>::Clear() [nsTArray.h:22ec021f1f92a342023765975e0ab9cffa85baef : 1296 + 0xe]
[task 2019-01-29T17:01:25.323Z] 17:01:25 INFO - eip = 0xed0d16e6 esp = 0xffd6f090 ebp = 0xffd6f0b8 ebx = 0xf5411000
[task 2019-01-29T17:01:25.323Z] 17:01:25 INFO - esi = 0xffd6f118 edi = 0x00000000
[task 2019-01-29T17:01:25.324Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.324Z] 17:01:25 INFO - 7 libxul.so!nsPipeEvents::~nsPipeEvents() [nsPipe3.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 1132 + 0x8]
[task 2019-01-29T17:01:25.325Z] 17:01:25 INFO - eip = 0xed0d1613 esp = 0xffd6f0c0 ebp = 0xffd6f0d8 ebx = 0xf5411000
[task 2019-01-29T17:01:25.325Z] 17:01:25 INFO - esi = 0xffd6f118 edi = 0x00000001
[task 2019-01-29T17:01:25.326Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.327Z] 17:01:25 INFO - 8 libxul.so!nsPipe::OnPipeException(nsresult, bool) [nsPipe3.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 963 + 0xb]
[task 2019-01-29T17:01:25.328Z] 17:01:25 INFO - eip = 0xed0d109b esp = 0xffd6f0e0 ebp = 0xffd6f138 ebx = 0xf5411000
[task 2019-01-29T17:01:25.329Z] 17:01:25 INFO - esi = 0xe73eb600 edi = 0x00000000
[task 2019-01-29T17:01:25.329Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.330Z] 17:01:25 INFO - 9 libxul.so!nsPipeOutputStream::CloseWithStatus(nsresult) [nsPipe3.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 1621 + 0xe]
[task 2019-01-29T17:01:25.330Z] 17:01:25 INFO - eip = 0xed0d36e0 esp = 0xffd6f140 ebp = 0xffd6f168 ebx = 0xf5411000
[task 2019-01-29T17:01:25.331Z] 17:01:25 INFO - esi = 0xe73eb60c edi = 0x804b0002
[task 2019-01-29T17:01:25.332Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.333Z] 17:01:25 INFO - 10 libxul.so!mozilla::dom::FetchDriver::OnStopRequest(nsIRequest*, nsISupports*, nsresult) [FetchDriver.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 1183 + 0x7]
[task 2019-01-29T17:01:25.333Z] 17:01:25 INFO - eip = 0xef06d63d esp = 0xffd6f170 ebp = 0xffd6f208 ebx = 0xf5411000
[task 2019-01-29T17:01:25.333Z] 17:01:25 INFO - esi = 0xf51c5a98 edi = 0xffd6f198
[task 2019-01-29T17:01:25.333Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.333Z] 17:01:25 INFO - 11 libxul.so!nsCORSListenerProxy::OnStopRequest(nsIRequest*, nsISupports*, nsresult) [nsCORSListenerProxy.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 615 + 0x1d]
[task 2019-01-29T17:01:25.333Z] 17:01:25 INFO - eip = 0xed4e8922 esp = 0xffd6f210 ebp = 0xffd6f258 ebx = 0xf5411000
[task 2019-01-29T17:01:25.334Z] 17:01:25 INFO - esi = 0xffd6f244 edi = 0xe7234d60
[task 2019-01-29T17:01:25.334Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.335Z] 17:01:25 INFO - 12 libxul.so!mozilla::net::HttpChannelChild::DoOnStopRequest(nsIRequest*, nsresult, nsISupports*) [HttpChannelChild.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 1219 + 0xb]
[task 2019-01-29T17:01:25.335Z] 17:01:25 INFO - eip = 0xed4b2865 esp = 0xffd6f260 ebp = 0xffd6f2c8 ebx = 0xf5411000
[task 2019-01-29T17:01:25.335Z] 17:01:25 INFO - esi = 0x00000000 edi = 0xe7361800
[task 2019-01-29T17:01:25.335Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.336Z] 17:01:25 INFO - 13 libxul.so!mozilla::net::HttpChannelChild::OnStopRequest(nsresult const&, mozilla::net::ResourceTimingStruct const&, mozilla::net::nsHttpHeaderArray const&) [HttpChannelChild.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 1102 + 0xf]
[task 2019-01-29T17:01:25.336Z] 17:01:25 INFO - eip = 0xed4b789e esp = 0xffd6f2d0 ebp = 0xffd6f338 ebx = 0xf5411000
[task 2019-01-29T17:01:25.337Z] 17:01:25 INFO - esi = 0xe738dac8 edi = 0xe7361800
[task 2019-01-29T17:01:25.338Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.338Z] 17:01:25 INFO - 14 libxul.so!mozilla::net::StopRequestEvent::Run() [HttpChannelChild.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 980 + 0xb]
[task 2019-01-29T17:01:25.338Z] 17:01:25 INFO - eip = 0xed4f2047 esp = 0xffd6f340 ebp = 0xffd6f358 ebx = 0xf5411000
[task 2019-01-29T17:01:25.339Z] 17:01:25 INFO - esi = 0xe738db58 edi = 0xe7262f9c
[task 2019-01-29T17:01:25.340Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.341Z] 17:01:25 INFO - 15 libxul.so!mozilla::net::ChannelEventQueue::FlushQueue() [ChannelEventQueue.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 90 + 0x8]
[task 2019-01-29T17:01:25.342Z] 17:01:25 INFO - eip = 0xed5986bd esp = 0xffd6f360 ebp = 0xffd6f3c8 ebx = 0xf5411000
[task 2019-01-29T17:01:25.343Z] 17:01:25 INFO - esi = 0xffd6f3b0 edi = 0xe7262f9c
[task 2019-01-29T17:01:25.344Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.344Z] 17:01:25 INFO - 16 libxul.so!mozilla::net::ChannelEventQueue::MaybeFlushQueue() [ChannelEventQueue.h:22ec021f1f92a342023765975e0ab9cffa85baef : 314 + 0x8]
[task 2019-01-29T17:01:25.345Z] 17:01:25 INFO - eip = 0xed45aeab esp = 0xffd6f3d0 ebp = 0xffd6f3f8 ebx = 0xf5411000
[task 2019-01-29T17:01:25.345Z] 17:01:25 INFO - esi = 0xe7262f80 edi = 0xffd6f3d8
[task 2019-01-29T17:01:25.346Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.346Z] 17:01:25 INFO - 17 libxul.so!mozilla::net::ChannelEventQueue::ResumeInternal()::CompleteResumeRunnable::Run() [ChannelEventQueue.h:22ec021f1f92a342023765975e0ab9cffa85baef : 293 + 0x8]
[task 2019-01-29T17:01:25.347Z] 17:01:25 INFO - eip = 0xed5a15b4 esp = 0xffd6f400 ebp = 0xffd6f428 ebx = 0xf5411000
[task 2019-01-29T17:01:25.347Z] 17:01:25 INFO - esi = 0xe7262f80 edi = 0xffd6f408
[task 2019-01-29T17:01:25.348Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.348Z] 17:01:25 INFO - 18 libxul.so!nsThread::ProcessNextEvent(bool, bool*) [nsThread.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 1161 + 0x8]
[task 2019-01-29T17:01:25.349Z] 17:01:25 INFO - eip = 0xed108fc6 esp = 0xffd6f430 ebp = 0xffd6f918 ebx = 0xf5411000
[task 2019-01-29T17:01:25.349Z] 17:01:25 INFO - esi = 0xffd6f4a0 edi = 0xf705ca80
[task 2019-01-29T17:01:25.350Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.350Z] 17:01:25 INFO - 19 libxul.so!NS_ProcessNextEvent(nsIThread*, bool) [nsThreadUtils.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 474 + 0x11]
[task 2019-01-29T17:01:25.351Z] 17:01:25 INFO - eip = 0xed10b6d6 esp = 0xffd6f920 ebp = 0xffd6f948 ebx = 0xf5411000
[task 2019-01-29T17:01:25.351Z] 17:01:25 INFO - esi = 0xffd6f93b edi = 0xffd6fb30
[task 2019-01-29T17:01:25.352Z] 17:01:25 INFO - Found by: call frame info
[task 2019-01-29T17:01:25.352Z] 17:01:25 INFO - 20 libxul.so!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [MessagePump.cpp:22ec021f1f92a342023765975e0ab9cffa85baef : 88 + 0x13]
[task 2019-01-29T17:01:25.352Z] 17:01:25 INFO - eip = 0xed661bf7 esp = 0xffd6f950 ebp = 0xffd6f988 ebx = 0xf5411000
[task 2019-01-29T17:01:25.353Z] 17:01:25 INFO - esi = 0xf706ff20 edi = 0xffd6fb30
[task 2019-01-29T17:01:25.353Z] 17:01:25 INFO - Found by: call frame info

jgraham: Hi, Could this be caused by https://bugzilla.mozilla.org/show_bug.cgi?id=1515043 ? Thanks for checking.

Flags: needinfo?(james)
Whiteboard: [stockwell needswork]

I mean I'm sure that the test changes are what's exposing the bug here. On the other hand the test changes themselves aren't the bug. So we should either get the crash fixed (ideal) or disable the test /fetch/api/basic/stream-response.any.worker.html (very much not ideal).

Ideally this would have been a new bug report, but since it isn't I guess we'll reuse this one.

Component: XPCOM → DOM: Networking
Flags: needinfo?(james)
Priority: P5 → --

Nathan, would it be reasonable to make this assertion non-fatal? There's WPT infrastructure to ignore leaks but not crashes. I haven't seen this one before so maybe just disabling the test is reasonable.

Flags: needinfo?(nfroyd)

(In reply to Andrew McCreight [:mccr8] (PTO 2-1 to 2-4) from comment #24)

Nathan, would it be reasonable to make this assertion non-fatal? There's WPT infrastructure to ignore leaks but not crashes. I haven't seen this one before so maybe just disabling the test is reasonable.

Even just removing the assert here would be reasonable; we'll yell when this reaches the leak checker, right? I guess the assert is useful for knowing where the leak occurs, but one would hope that our leak checking framework would be strong enough to help people figure where the leak occurs in the first place...

Flags: needinfo?(nfroyd)

Looks like the intention is to:

  • remove the assertion that causes a crash
  • leave this up to existing leak checkers
  • re-enable any tests disabled because of this (of there are any)
Component: DOM: Networking → Networking
Priority: -- → P3
Whiteboard: [stockwell disable-recommended] → [stockwell disable-recommended][necko-triaged]
Whiteboard: [stockwell disable-recommended][necko-triaged] → [stockwell needswork:owner][necko-triaged]

bug 1583280 is old, but it has a test case in comment 0, so that might be worth looking at if somebody is going to investigate this.

This still hits pretty regularly on ESR91, but the failures appear to have stopped elsewhere around the middle of July of last year. Kershaw, do you have any idea what might have resolved this?

Flags: needinfo?(kershaw)

I wonder if something changed with fetch around then. These always seem to happen in the fetch/api/basic web-platform tests.

(In reply to Ryan VanderMeulen [:RyanVM] from comment #102)

This still hits pretty regularly on ESR91, but the failures appear to have stopped elsewhere around the middle of July of last year. Kershaw, do you have any idea what might have resolved this?

Probably bug 1683062?
I just checked the commit history, but I really have no idea.

Flags: needinfo?(kershaw)

Looking in to the log, the reason that we hit this assertion is that we failed to dispatch an event.

Nika, do you probably have an idea about how to debug this? Perhaps this is some kind of an edge case happens during shutdown?
Thanks.

[task 2022-01-07T18:07:17.771Z] 18:07:17     INFO - PID 2756 | [Child 7812, Main Thread] WARNING: Dispatch failed: file /builds/worker/checkouts/gecko/xpcom/io/nsStreamUtils.cpp:84
[task 2022-01-07T18:07:17.772Z] 18:07:17     INFO - PID 2756 | [Child 7812, Main Thread] WARNING: Dispatch failed: file /builds/worker/checkouts/gecko/xpcom/io/nsStreamUtils.cpp:84
[task 2022-01-07T18:07:17.772Z] 18:07:17     INFO - PID 2756 | Assertion failure: false (MOZ_ASSERT_UNREACHABLE: leaking stream event), at /builds/worker/checkouts/gecko/xpcom/io/nsStreamUtils.cpp:70
Flags: needinfo?(nika)

We can see from the logs that the dispatch fails twice before we hit the assertion. This is because the first dispatch failed when we were supposed to fire the input stream ready event, and then the second dispatch failed during the destructor. Normally we'd only see one failure here, as dispatching a runnable to a thread silently leaks the runnable when it fails, but whatever event target is being dispatched to in this case does not leak the runnables dispatched to it in this scenario.

Off the top of my head, I remember that TaskQueue runnables will sometimes release the associated event when dispatch fails, though I imagine there are other examples which do this as well. IIRC the assertion failure here is inevitable if dispatch fails and the runnable is released, whereas if dispatch fails and the runnable is not released it will be leaked silently.

This assertion is fairly harmless, as it's generally just a memory leak, so I'm not sure it's worth fixing if this intermittent is only impacting ESR91.

Flags: needinfo?(nika)
Crash Signature: [@ nsInputStreamReadyEvent::~nsInputStreamReadyEvent()]
Severity: normal → S3
Crash Signature: [@ nsInputStreamReadyEvent::~nsInputStreamReadyEvent()] → [@ nsInputStreamReadyEvent::~nsInputStreamReadyEvent]
Status: REOPENED → RESOLVED
Closed: 6 years ago2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.