Closed Bug 829309 Opened 7 years ago Closed 7 years ago

Assertion re-entering a hashtable in nsAudioChannelService

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21
blocking-basecamp +
Tracking Status
firefox19 --- wontfix
firefox20 --- wontfix
firefox21 --- fixed
b2g18 --- fixed

People

(Reporter: mrbkap, Assigned: baku)

Details

(Keywords: assertion)

Attachments

(1 file)

I got this running a debug build:

(STR: Start b2g, swipe to unlock, click on the lock to unlock. See the assertion)

    aMsg=0x7fffffffabe0 "###!!! ASSERTION: op == PL_DHASH_LOOKUP || RECURSION_LEVEL(table) == 0: 'op == Pne 575") at /home/mrbkap/work/main/mozilla/xpcom/base/nsDebugImpl.cpp:547
#2  0x00007ffff289c07b in NS_DebugBreak_P (aSeverity=1, 
    aStr=0x7ffff3ed2e38 "op == PL_DHASH_LOOKUP || RECURSION_LEVEL(table) == 0", 
    aExpr=0x7ffff3ed2e38 "op == PL_DHASH_LOOKUP || RECURSION_LEVEL(table) == 0", 
    aFile=0x7ffff3ed2cb8 "/home/mrbkap/work/main/b2g/xpcom/build/pldhash.cpp", aLine=575)
    at /home/mrbkap/work/main/mozilla/xpcom/base/nsDebugImpl.cpp:414
#3  0x00007ffff281b83e in PL_DHashTableOperate (table=0x7fffd11dce98, key=0x7fffdc5762b0, 
    op=PL_DHASH_ADD) at /home/mrbkap/work/main/b2g/xpcom/build/pldhash.cpp:574
#4  0x00007ffff19d70d9 in nsTHashtable<nsBaseHashtableET<nsPtrHashKey<mozilla::dom::AudioChannelAgent>, m
    0x7fffdc5762b0) at ../../dist/include/nsTHashtable.h:184
#5  0x00007ffff19d6df9 in nsTHashtable<nsBaseHashtableET<nsPtrHashKey<mozilla::dom::AudioChannelAgent>, m
    aKey=0x7fffdc5762b0) at ../../dist/include/nsTHashtable.h:170
#6  0x00007ffff19d6971 in nsBaseHashtable<nsPtrHashKey<mozilla::dom::AudioChannelAgent>, mozilla::dom::Au
    (this=0x7fffd11dce98, aKey=0x7fffdc5762b0, aData=...) at ../../dist/include/nsBaseHashtable.h:147
#7  0x00007ffff19d6698 in nsBaseHashtable<nsPtrHashKey<mozilla::dom::AudioChannelAgent>, mozilla::dom::Au
    (this=0x7fffd11dce98, aKey=0x7fffdc5762b0, aData=...) at ../../dist/include/nsBaseHashtable.h:141
#8  0x00007ffff19d5b92 in mozilla::dom::AudioChannelService::GetMuted (this=0x7fffd11dce80, 
    aAgent=0x7fffdc5762b0, aElementHidden=false)
    at /home/mrbkap/work/main/mozilla/dom/audiochannel/AudioChannelService.cpp:156
#9  0x00007ffff19d8035 in mozilla::dom::AudioChannelAgent::NotifyAudioChannelStateChanged (
    this=0x7fffdc5762b0) at /home/mrbkap/work/main/mozilla/dom/audiochannel/AudioChannelAgent.cpp:111
#10 0x00007ffff19d6062 in mozilla::dom::AudioChannelService::NotifyEnumerator (aAgent=0x7fffdc5762b0, 
    aData=..., aUnused=0x0)
    at /home/mrbkap/work/main/mozilla/dom/audiochannel/AudioChannelService.cpp:283
#11 0x00007ffff19d6b31 in nsBaseHashtable<nsPtrHashKey<mozilla::dom::AudioChannelAgent>, mozilla::dom::AuReadStub (table=0x7fffd11dce98, hdr=0x7fffdc31c778, number=0, arg=0x7fffffffb2f0)
    at ../../dist/include/nsBaseHashtable.h:400
#12 0x00007ffff281be6b in PL_DHashTableEnumerate (table=0x7fffd11dce98, 
    etor=0x7ffff19d6ad6 <nsBaseHashtable<nsPtrHashKey<mozilla::dom::AudioChannelAgent>, mozilla::dom::AudeadStub(PLDHashTable*, PLDHashEntryHdr*, unsigned int, void*)>, arg=0x7fffffffb2f0)
    at /home/mrbkap/work/main/b2g/xpcom/build/pldhash.cpp:717
#13 0x00007ffff19d67d5 in nsBaseHashtable<nsPtrHashKey<mozilla::dom::AudioChannelAgent>, mozilla::dom::AuateRead (this=0x7fffd11dce98, 
    enumFunc=0x7ffff19d6008 <mozilla::dom::AudioChannelService::NotifyEnumerator(mozilla::dom::AudioChann
    at ../../dist/include/nsBaseHashtable.h:190
#14 0x00007ffff19d60e0 in mozilla::dom::AudioChannelService::Notify (this=0x7fffd11dce80)
    at /home/mrbkap/work/main/mozilla/dom/audiochannel/AudioChannelService.cpp:293
#15 0x00007ffff19d5a06 in mozilla::dom::AudioChannelService::RegisterType (this=0x7fffd11dce80, 
    aType=mozilla::dom::AUDIO_CHANNEL_NORMAL, aChildID=18446744073709551615)
    at /home/mrbkap/work/main/mozilla/dom/audiochannel/AudioChannelService.cpp:107
#16 0x00007ffff19d598e in mozilla::dom::AudioChannelService::RegisterAudioChannelAgent (

We aren't allowed to modify a hashtable in the middle of enumerating it. Andrea is on the case (and has a patch).
Attached patch patchSplinter Review
Attachment #700689 - Flags: review?(mrbkap)
Comment on attachment 700689 [details] [diff] [review]
patch

Review of attachment 700689 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Thanks.
Attachment #700689 - Flags: review?(mrbkap) → review+
Blocking, please land ASAP.
blocking-basecamp: ? → +
Marking fixed.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.