Closed Bug 1640668 Opened 4 months ago Closed 4 months ago

Crash in mdns_service_start

Categories

(Core :: WebRTC: Networking, defect, P2)

78 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: dminor, Assigned: dminor)

Details

Attachments

(1 file)

See https://crash-stats.mozilla.org/report/index/780868df-764f-4c9c-aca2-744960200518.

I think this might be the problem:
let addrs: Vec<std::net::Ipv4Addr> =
ifaddrs.split(';').filter_map(|x| x.parse().ok()).collect();

The intention was to collect everything that was ok(), but if ok() fails, we get a panic instead.

ok() should convert a Result to an Option, so that should be fine.

There is a bad unwrap in the crash stack [1]. The only call to unwrap that isn't in test code is here [2] so I'm going to guess that is the problem. Too bad the stack is not more conclusive.

[1] https://github.com/rust-lang/rust/blob/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libcore/result.rs#L1003
[2] https://searchfox.org/mozilla-central/rev/501eb4718d73870892d28f31a99b46f4783efaa0/media/mtransport/mdns_service/src/lib.rs

Unwrap asserts if there is an error, ? will propogate it back to the caller
which is what we want.

Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/414588ead7bc
Remove unwrap() call from MDNSService start; r=mjf
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.