Closed Bug 1344580 Opened 8 years ago Closed 8 years ago

Crash in audiounit_layout_init

Categories

(Core :: Audio/Video: cubeb, defect, P1)

Unspecified
macOS
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox52 --- unaffected
firefox-esr52 --- unaffected
firefox53 --- unaffected
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: n.nethercote, Assigned: chunmin)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

43 bytes, text/x-github-pull-request
Details | Review
This bug was filed from the Socorro interface and is report bp-87245b40-f1f9-4788-b37a-9770b2170305. ============================================================= This Mac-only crash first appeared in Nightly 20170225030208, though it's infrequent enough that it's possible the cause landed earlier than that. Having said that, it looks likely that the cubeb update in bug 1342363 that landed on Feb 24 is the cause. It's the #2 Mac topcrash in Nightly 20170303030202, but with only 4 crashes... we don't have a lot of Nightly Mac users. Alex, can you please investigate?
Flags: needinfo?(achronop)
There is one thread using cubeb. The report says the reason is EXC_BAD_ACCESS / KERN_INVALID_ADDRESS, which relates to accessing deallocated memory. It crashes at media/libcubeb/src/cubeb_audiounit.cpp:1353[0], where audiounit_get_current_channel_layout is called. In audiounit_get_current_channel_layout, we allocate one memory chunk for |AudioChannelLayout| with malloc. If it's accessed after releasing, it might be the cause. However, there should be no such case. [0] https://hg.mozilla.org/mozilla-central/annotate/eb2364853477/media/libcubeb/src/cubeb_audiounit.cpp#l1353
I see some other Mac crashes in today's build that also have cubeb in them - http://bit.ly/2mtWxf - not sure if they belong in this bug or not: [@ audiounit_setup_stream]
Chun-Min, any idea about Marcia's comment ?
Flags: needinfo?(cchang)
I can't open this link: http://bit.ly/2mtWxf . Is it correct? I guess it might be causes by auto_channel_layout::size()[0]. It returns the size of pointer of AudioChannelLayout instead of the size of AudioChannelLayout array allocated. I'll update a patch to fix it. [0] http://searchfox.org/mozilla-central/rev/1bc7720a434af3c13b68b8d69f92078cae8890c4/media/libcubeb/src/cubeb_audiounit.cpp#175
Assignee: nobody → cchang
Flags: needinfo?(cchang)
Attached file pull on github
I can't reproduce it so I just guess and fix some incorrect code.
Rank: 15
Priority: -- → P1
Flags: needinfo?(mozillamarcia.knous)
Flags: needinfo?(mozillamarcia.knous)
The patch is merged in https://github.com/kinetiknz/cubeb/commit/f1a6eed0ef1829ea3ac589feefa0f46bf594cdaa We could observe for a while to check whether the crash happens again.
Depends on: 1345049
Clear NI based on previous comment
Flags: needinfo?(achronop)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Landed in 55 and 54 with Bug 1345049.
Thanks for the report. I'll try an ASAN build to test it.
Flags: needinfo?(cchang)
Just double checked, it seems that audiounit_layout_init is fixed, but not audiounit_setup_stream.
Blocks: 1358896
i've filed a cloned bug about the [@ audiounit_setup_stream] signature in order to be able to easier track its state.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: