Closed Bug 1799439 Opened 3 years ago Closed 3 years ago

Crash in [@ mozilla::dom::RTCRtpTransceiver::ApplyCodecStats::<T>::operator()]

Categories

(Core :: WebRTC, defect, P2)

Unspecified
Windows 10
defect

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox107 --- wontfix
firefox108 --- fixed

People

(Reporter: gsvelto, Assigned: bwc)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/fef6a2a8-0043-4f67-9d24-a91b90221105

MOZ_CRASH Reason: MOZ_CRASH(Unexpected reject)

Top 10 frames of crashing thread:

0  xul.dll  mozilla::dom::RTCRtpTransceiver::ApplyCodecStats::<lambda_121>::operator const  dom/media/webrtc/jsapi/RTCRtpTransceiver.cpp:1072
0  xul.dll  mozilla::MozPromise<CopyableTArray<mozilla::UniquePtr<mozilla::dom::RTCStatsCollection, mozilla::DefaultDelete<mozilla::dom::RTCStatsCollection> > >, nsresult, 1>::InvokeMethod  xpcom/threads/MozPromise.h:637
0  xul.dll  mozilla::MozPromise<CopyableTArray<mozilla::UniquePtr<mozilla::dom::RTCStatsCollection, mozilla::DefaultDelete<mozilla::dom::RTCStatsCollection> > >, nsresult, 1>::InvokeCallbackMethod  xpcom/threads/MozPromise.h:646
0  xul.dll  mozilla::MozPromise<CopyableTArray<mozilla::UniquePtr<mozilla::dom::RTCStatsCollection, mozilla::DefaultDelete<mozilla::dom::RTCStatsCollection> > >, nsresult, 1>::ThenValue<`lambda at /builds/worker/checkouts/gecko/dom/media/webrtc/jsapi/RTCRtpTransceiver.cpp:1002:17', `lambda at /builds/worker/checkouts/gecko/dom/media/webrtc/jsapi/RTCRtpTransceiver.cpp:1071:17'>::DoResolveOrRejectInternal  xpcom/threads/MozPromise.h:845
1  xul.dll  mozilla::MozPromise<nsTArray<mozilla::net::HttpRetParams>, mozilla::ipc::ResponseRejectReason, 1>::ThenValueBase::ResolveOrRejectRunnable::Run  xpcom/threads/MozPromise.h:487
2  xul.dll  mozilla::RunnableTask::Run  xpcom/threads/TaskController.cpp:538
2  xul.dll  mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal  xpcom/threads/TaskController.cpp:851
3  xul.dll  mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal  xpcom/threads/TaskController.cpp:683
3  xul.dll  mozilla::TaskController::ProcessPendingMTTask  xpcom/threads/TaskController.cpp:461
3  xul.dll  mozilla::TaskController::InitializeInternal::<lambda_4>::operator const  xpcom/threads/TaskController.cpp:187

I found this while triaging nightly builds but it appears to be an existing issue.

I am not sure how we're ending up in the promise rejection code when we're starting from here: https://hg.mozilla.org/releases/mozilla-release/file/eecea05aff4d09b70d13842a8e07160f04ac0349/xpcom/threads/MozPromise.h#l845

I think the line number must be incorrect here.

Additionally, I don't see any way for this Promise chain to reject here:
https://hg.mozilla.org/releases/mozilla-release/file/eecea05aff4d09b70d13842a8e07160f04ac0349/dom/media/webrtc/jsapi/RTCRtpTransceiver.cpp#l1070

... especially considering that we did not reject in the previous promise in the chain here:
https://hg.mozilla.org/releases/mozilla-release/file/eecea05aff4d09b70d13842a8e07160f04ac0349/dom/media/webrtc/jsapi/RTCRtpTransceiver.cpp#l994

Severity: -- → S2
Priority: -- → P2

Maybe we should not be rejecting here?

https://searchfox.org/mozilla-central/source/dom/media/webrtc/jsapi/MediaTransportHandlerIPC.cpp#351-354

Also, I'm not sure what happens here when mInitPromise rejects, since there's no reject function:

https://searchfox.org/mozilla-central/source/dom/media/webrtc/jsapi/MediaTransportHandler.cpp#1278

We probably want to modify both of these to resolve with an empty RTCStatsCollection on rejection.

Assignee: nobody → docfaraday

Try looks normal.

Attachment #9302931 - Attachment description: WIP: Bug 1799439: Don't reject in GetIceStats. → Bug 1799439: Don't reject in GetIceStats. r?mjf

We don't have repro steps, and are therefore not sure this will fix the issue, so marking leave-open. We'll have to keep an eye on crash-stats to see if this resolves after landing.

Keywords: leave-open

The crashes on nightly seem to have stopped.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: