Closed Bug 1883481 Opened 2 years ago Closed 2 years ago

Crash in [@ <wgpu_core::device::DeviceLostClosureC as core::ops::drop::Drop>::drop]

Categories

(Core :: Graphics: WebGPU, defect, P2)

defect

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox124 --- disabled
firefox125 --- disabled
firefox126 --- fixed

People

(Reporter: ryanvm, Assigned: bradwerth)

References

Details

(Keywords: crash)

Crash Data

Looks like the same crash as bug 1877046, but still happening after that was marked as fixed.

Crash report: https://crash-stats.mozilla.org/report/index/32ec8301-5a31-4d19-aa1b-b239c0240303

MOZ_CRASH Reason: DeviceLostClosureC must be consumed before it is dropped.

Top 10 frames of crashing thread:

0  libxul.so  MOZ_Crash  mfbt/Assertions.h:301
0  libxul.so  RustMozCrash  mozglue/static/rust/wrappers.cpp:18
1  libxul.so  mozglue_static::panic_hook  mozglue/static/rust/lib.rs:96
2  libxul.so  core::ops::function::Fn::call  library/core/src/ops/function.rs:79
3  libxul.so  <alloc::boxed::Box<F, A> as core::ops::function::Fn<Args>>::call  library/alloc/src/boxed.rs:2029
3  libxul.so  std::panicking::rust_panic_with_hook  library/std/src/panicking.rs:783
4  libxul.so  std::panicking::begin_panic_handler::{{closure}}  library/std/src/panicking.rs:649
5  libxul.so  std::sys_common::backtrace::__rust_end_short_backtrace  library/std/src/sys_common/backtrace.rs:171
6  libxul.so  rust_begin_unwind  library/std/src/panicking.rs:645
7  libxul.so  core::panicking::panic_fmt  library/core/src/panicking.rs:72

I'll figure this out.

Assignee: nobody → bwerth
Severity: -- → S3
Priority: -- → P3

This is happening because device_set_device_lost_closure only consumes the provided DeviceLostClosure if the device is still valid. If not, then it drops the closure on the floor, never called, which triggers this panic. This will need an upstream fix in wgpu.

This is being worked upstream in https://github.com/gfx-rs/wgpu/pull/5358.

Status: NEW → ASSIGNED
Priority: P3 → P2
No longer blocks: webgpu-triage

Upstream https://github.com/gfx-rs/wgpu/pull/5358 has landed; I'll add as a blocker the appropriate webgpu vendoring Bug when it is filed.

Upstream fix will be brought in by landing of Bug 1887909.

Depends on: 1887909

Re-vendoring of upstream complete. This is fixed.

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