Crash in [@ NS_InputStreamIsBuffered]
Categories
(Core :: Networking, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox145 | --- | wontfix |
| firefox146 | + | fixed |
| firefox147 | + | fixed |
| firefox148 | + | fixed |
People
(Reporter: valentin, Assigned: kershaw)
References
(Depends on 1 open bug)
Details
(Keywords: crash, Whiteboard: [necko-triaged] [necko-priority-queue])
Crash Data
Attachments
(3 external files)
Crash report: https://crash-stats.mozilla.org/report/index/f61604ae-0d6b-4cfe-ba73-f31bd0250821
Reason:
EXCEPTION_ACCESS_VIOLATION_READ
Top 10 frames:
0 xul.dll NS_InputStreamIsBuffered(nsIInputStream*) xpcom/io/nsStreamUtils.cpp:732
1 xul.dll mozilla::nsMultiplexInputStream::StreamData::Initialize(nsIInputStream*) xpcom/io/nsMultiplexInputStream.h:77
2 xul.dll mozilla::nsMultiplexInputStream::AppendStream(nsIInputStream*) xpcom/io/nsMultiplexInputStream.cpp:114
3 xul.dll mozilla::nsMultiplexInputStream::Clone(nsIInputStream**) xpcom/io/nsMultiplexInputStream.cpp:1054
4 xul.dll mozilla::dom::StreamBlobImpl::CreateInputStream(nsIInputStream**, mozilla::Er... dom/file/StreamBlobImpl.cpp:137
5 xul.dll mozilla::dom::BlobImpl::GetSendInfo(nsIInputStream**, unsigned long long*, ns... dom/file/BlobImpl.cpp:72
6 xul.dll mozilla::dom::XMLHttpRequestMainThread::SendInternal(mozilla::dom::BodyExtrac... dom/xhr/XMLHttpRequestMainThread.cpp:3166
7 xul.dll mozilla::dom::BodyExtractor<const mozilla::dom::URLSearchParams>::BodyExtract... dom/fetch/BodyExtractor.h:33
7 xul.dll mozilla::dom::XMLHttpRequestMainThread::Send(mozilla::dom::Nullable<mozilla::... dom/xhr/XMLHttpRequestMainThread.cpp:3061
8 xul.dll mozilla::dom::SendRunnable::RunOnMainThread(mozilla::ErrorResult&) dom/xhr/XMLHttpRequestWorker.cpp:1329
I was looking at bug 1879917 and noticed it started spiking about a month ago.
| Reporter | ||
Comment 1•1 year ago
|
||
Looking at the dump in https://crash-stats.mozilla.org/report/index/625afa62-029e-4962-a417-036180251102
in nsInputStreamPump::CreateBufferedStreamIfNeeded
mAsyncStream NULL nsCOMPtr<nsIAsyncInputStream>
[Raw View] {mRawPtr=0x0000000000000000 <NULL> } nsCOMPtr<nsIAsyncInputStream>
this 0x000001e8e54801f0 {mRefCnt={mValue=2 } mState=4 mLoadGroup=NULL ...} nsInputStreamPump *
nsIInputStreamPump {...} nsIInputStreamPump
nsIInputStreamCallback {...} nsIInputStreamCallback
nsIThreadRetargetableRequest {...} nsIThreadRetargetableRequest
mRefCnt {mValue=2 } mozilla::ThreadSafeAutoRefCnt
mState 4 unsigned int
mLoadGroup NULL nsCOMPtr<nsILoadGroup>
mListener NULL nsCOMPtr<nsIStreamListener>
mTargetThread NULL nsCOMPtr<nsISerialEventTarget>
mLabeledMainThreadTarget NULL nsCOMPtr<nsISerialEventTarget>
mStream NULL nsCOMPtr<nsIInputStream>
mAsyncStream NULL nsCOMPtr<nsIAsyncInputStream>
mStreamOffset 0 unsigned __int64
mStreamLength 0 unsigned __int64
mSegSize 0 unsigned int
mSegCount 0 unsigned int
mStatus NS_BINDING_ABORTED (2152398850) nsresult
mSuspendCount 0 unsigned int
mLoadFlags 0 unsigned int
mIsPending false bool
mProcessingCallbacks false bool
mWaitingForInputStreamReady false bool
mCloseWhenDone false bool
mRetargeting false bool
mAsyncStreamIsBuffered false bool
mOffMainThread false const bool
mMutex {mMutex=0x000001e8e5480288 {0xffffffffffffffff, 0x00000001fffffffe, 0x0000000000002974, 0x0000000000000000, ...} } mozilla::RecursiveMutex
mState == 4 means it's in nsInputStreamPump::STATE_DEAD
Updated•1 year ago
|
Updated•1 year ago
|
Comment 2•1 year ago
|
||
The bug is marked as tracked for firefox146 (beta). We have limited time to fix this, the soft freeze is in 13 days. However, the bug still isn't assigned.
:jimm, could you please find an assignee for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.
For more information, please visit BugBot documentation.
Comment 3•11 months ago
|
||
This is a reminder regarding comment #2!
The bug is marked as tracked for firefox146 (beta). We have limited time to fix this, the soft freeze is in 7 days. However, the bug still isn't assigned.
Comment 4•11 months ago
|
||
This is a reminder regarding comment #2!
The bug is marked as tracked for firefox146 (beta). We have limited time to fix this, the soft freeze is in a day. However, the bug still isn't assigned.
Updated•11 months ago
|
Comment 5•11 months ago
|
||
This looks like a network-related API rather than media. I am going to move the component to network
Updated•11 months ago
|
| Assignee | ||
Comment 6•11 months ago
|
||
The stacktrace from the recent crashes:
0 libxul.so NS_InputStreamIsBuffered(nsIInputStream*) /usr/src/debug/firefox/firefox-145.0/xpcom/io/nsStreamUtils.cpp:732 context
1 libxul.so nsInputStreamPump::CreateBufferedStreamIfNeeded() /usr/src/debug/firefox/firefox-145.0/netwerk/base/nsInputStreamPump.cpp:744 cfi
2 libxul.so nsInputStreamPump::PeekStream(void (*)(void*, unsigned char const*, unsigned int), void*) /usr/src/debug/firefox/firefox-145.0/netwerk/base/nsInputStreamPump.cpp:78 inlined
2 libxul.so mozilla::net::nsHttpChannel::CallOnStartRequest() /usr/src/debug/firefox/firefox-145.0/netwerk/protocol/http/nsHttpChannel.cpp:2390 cfi
3 libxul.so mozilla::net::nsHttpChannel::ContinueOnStartRequest3(nsresult) /usr/src/debug/firefox/firefox-145.0/netwerk/protocol/http/nsHttpChannel.cpp:9106 inlined
3 libxul.so mozilla::net::nsHttpChannel::ContinueOnStartRequest2(nsresult) /usr/src/debug/firefox/firefox-145.0/netwerk/protocol/http/nsHttpChannel.cpp:9095 inlined
3 libxul.so mozilla::net::nsHttpChannel::ContinueOnStartRequest1(nsresult) /usr/src/debug/firefox/firefox-145.0/netwerk/protocol/http/nsHttpChannel.cpp:9068 cfi
4 libxul.so mozilla::net::nsHttpChannel::OnStartRequest(nsIRequest*) /usr/src/debug/firefox/firefox-145.0/netwerk/protocol/http/nsHttpChannel.cpp:8930 cfi
5 libxul.so nsInputStreamPump::OnStateStart() /usr/src/debug/firefox/firefox-145.0/netwerk/base/nsInputStreamPump.cpp:524 inlined
5 libxul.so nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*) /usr/src/debug/firefox/firefox-145.0/netwerk/base/nsInputStreamPump.cpp:426
The above trace shows PeekStream is called from CallOnStartRequest here, which implies mTransactionPump is non-null. What’s puzzling is that the stack also shows ContinueOnStartRequest1, which only runs when the channel already has an error status (otherwise we’d enter the other branch and call ProcessResponse).
Anyways, the crash report indicates mAsyncStream is null, but the root cause isn’t clear yet. I’ll add a null check and some diagnostic assertions to try to catch where this is happening.
| Assignee | ||
Comment 7•11 months ago
|
||
Updated•11 months ago
|
| Assignee | ||
Comment 8•11 months ago
|
||
The crash count spikes in Firefox 145, which lines up with the large nsHttpChannel changes for the compression dictionary work.
Randell, could this be related to one of the compression-dictionary patches?
Comment 10•11 months ago
|
||
| bugherder | ||
| Assignee | ||
Comment 11•11 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D275427
Updated•11 months ago
|
Comment 12•11 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Possible crash
- Code covered by automated testing: no
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: This patch only adds a null check
- String changes made/needed: None
- Is Android affected?: yes
Comment 13•11 months ago
|
||
The date for the beginning of "new" crashes from this appears to match up with the Compression Dictionary landing on 2025/10/8 (first crash appears to be buildid 10/9, though there are a handful of much older crashes). I'll look into why this is happening
Updated•11 months ago
|
Updated•11 months ago
|
Comment 14•11 months ago
|
||
| uplift | ||
Comment 15•11 months ago
|
||
:kershaw do you want to uplift this for the 146 dot release this week?
| Assignee | ||
Comment 16•11 months ago
|
||
(In reply to Dianna Smith [:diannaS] from comment #15)
:kershaw do you want to uplift this for the 146 dot release this week?
Yeah, I think it's no harm to uplift this. Thanks.
| Assignee | ||
Comment 17•11 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D275427
Updated•11 months ago
|
Comment 18•11 months ago
|
||
firefox-release Uplift Approval Request
- User impact if declined: Possible crash
- Code covered by automated testing: no
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: N/A
- Risk associated with taking this patch: low
- Explanation of risk level: This patch only adds a null check.
- String changes made/needed: N/A
- Is Android affected?: yes
Updated•11 months ago
|
Updated•11 months ago
|
Comment 19•11 months ago
|
||
| uplift | ||
Description
•