Closed Bug 1149894 Opened 9 years ago Closed 9 years ago

Intermittent test_setVersion_exclusion.html,test_blocked_order.html,test_readonly.html,test_bfcache.html "Assertion failure: mRecursionLevel == 0" [@ PLDHashTable::Search(void const*)] [@ PLDHashTable::Remove(void const*)]

Categories

(Core :: Storage: IndexedDB, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox38 --- unaffected
firefox38.0.5 --- unaffected
firefox39 --- unaffected
firefox40 --- fixed
firefox-esr31 --- unaffected
firefox-esr38 --- unaffected

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

https://treeherder.mozilla.org/logviewer.html#?job_id=8330161&repo=mozilla-inbound
https://treeherder.mozilla.org/logviewer.html#?job_id=8329121&repo=mozilla-inbound

22:30:28 WARNING - PROCESS-CRASH | dom/indexedDB/test/test_blocked_order.html | application crashed [@ PLDHashTable::Search(void const*)]
22:30:28 INFO - Crash dump filename: /tmp/tmpZVV0f3/67b74b17-274c-84bc-775814e9-484a7de2.dmp
22:30:28 INFO - Operating system: Android
22:30:28 INFO - 0.0.0 Linux 3.2.0+ #2 SMP PREEMPT Thu Nov 29 08:06:57 EST 2012 armv7l pandaboard/pandaboard/pandaboard:4.0.4/IMM76I/5:eng/test-keys
22:30:28 INFO - CPU: arm
22:30:28 INFO - 2 CPUs
22:30:28 INFO - Crash reason: SIGSEGV
22:30:28 INFO - Crash address: 0x0
22:30:28 INFO - Thread 53 (crashed)
22:30:28 INFO - 0 libxul.so!PLDHashTable::Search(void const*) [pldhash.cpp:e1083d2b2217 : 579 + 0x14]
22:30:28 INFO - r4 = 0x00000243 r5 = 0x00000000 r6 = 0x700dfea8 r7 = 0x0000ffff
22:30:28 INFO - r8 = 0x00000000 r9 = 0x00000001 r10 = 0x00000001 fp = 0x814ffd77
22:30:28 INFO - sp = 0x814ffbe8 lr = 0x6259b97b pc = 0x6259e316
22:30:28 INFO - Found by: given as instruction pointer in context
22:30:28 INFO - 1 libxul.so!nsClassHashtable<nsCStringHashKey, mozilla::dom::indexedDB::{anonymous}::ConnectionPool::DatabaseInfo>::Get + 0x27
22:30:28 INFO - r4 = 0x6bba3cc8 r5 = 0x700dfea8 r6 = 0x700dfe20 r7 = 0x00000000
22:30:28 INFO - r8 = 0x00000000 r9 = 0x00000001 r10 = 0x00000001 fp = 0x814ffd77
22:30:28 INFO - sp = 0x814ffc00 pc = 0x63229181
22:30:28 INFO - Found by: call frame info
22:30:28 INFO - 2 libxul.so!mozilla::dom::indexedDB::::TransactionDatabaseOperationBase::RunOnConnectionThread [ActorsParent.cpp:e1083d2b2217 : 9346 + 0x3]
22:30:28 INFO - r4 = 0x6bba3ca0 r5 = 0x68c3d940 r6 = 0x700dfe20 r7 = 0x00000000
22:30:28 INFO - r8 = 0x00000000 r9 = 0x00000001 r10 = 0x00000001 fp = 0x814ffd77
22:30:28 INFO - sp = 0x814ffc18 pc = 0x63248753
22:30:28 INFO - Found by: call frame info
22:30:28 INFO - 3 libxul.so!mozilla::dom::indexedDB::::TransactionDatabaseOperationBase::Run [ActorsParent.cpp:e1083d2b2217 : 18922 + 0x7]
22:30:28 INFO - r4 = 0x68c3d940 r5 = 0x6a4b5a00 r6 = 0x6fbbbdc0 r7 = 0x814ffd38
22:30:28 INFO - r8 = 0x814ffd2c r9 = 0x00000001 r10 = 0x00000001 fp = 0x814ffd77
22:30:28 INFO - sp = 0x814ffcf8 pc = 0x6324228d
22:30:28 INFO - Found by: call frame info
22:30:28 INFO - 4 libxul.so!nsThread::ProcessNextEvent(bool, bool*) [nsThread.cpp:e1083d2b2217 : 848 + 0xb]
22:30:28 INFO - r4 = 0x6fbbbe04 r5 = 0x00000000 r6 = 0x6fbbbdc0 r7 = 0x814ffd38
22:30:28 INFO - r8 = 0x814ffd2c r9 = 0x00000001 r10 = 0x00000001 fp = 0x814ffd77
22:30:28 INFO - sp = 0x814ffd08 pc = 0x625891eb
22:30:28 INFO - Found by: call frame info 

Or:

21:36:52 WARNING - PROCESS-CRASH | dom/indexedDB/test/test_setVersion_exclusion.html | application crashed [@ PLDHashTable::Remove(void const*)]
21:36:52 INFO - Crash dump filename: /tmp/tmpg0nhIN/2b181594-63fd-ba5d-4784651b-432a8423.dmp
21:36:52 INFO - Operating system: Android
21:36:52 INFO - 0.0.0 Linux 3.2.0+ #2 SMP PREEMPT Thu Nov 29 08:06:57 EST 2012 armv7l pandaboard/pandaboard/pandaboard:4.0.4/IMM76I/5:eng/test-keys
21:36:52 INFO - CPU: arm
21:36:52 INFO - 2 CPUs
21:36:52 INFO - Crash reason: SIGSEGV
21:36:52 INFO - Crash address: 0x0
21:36:52 INFO - Thread 30 (crashed)
21:36:52 INFO - 0 libxul.so!PLDHashTable::Remove(void const*) [pldhash.cpp:851707bd8630 : 696 + 0x16]
21:36:52 INFO - r4 = 0x6f901ac8 r5 = 0x64a2ee98 r6 = 0x67e74a04 r7 = 0x68e7fdf0
21:36:52 INFO - r8 = 0x6f901ac8 r9 = 0x00000001 r10 = 0x0113f6ee fp = 0x68e7fe2f
21:36:52 INFO - sp = 0x68e7fd58 lr = 0x6259697b pc = 0x62599236
21:36:52 INFO - Found by: given as instruction pointer in context
21:36:52 INFO - 1 libxul.so!mozilla::dom::indexedDB::::ConnectionPool::CloseConnectionRunnable::Run [nsTHashtable.h:851707bd8630 : 178 + 0x5]
21:36:52 INFO - r4 = 0x6f901aa0 r5 = 0x67e74a04 r6 = 0x00000000 r7 = 0x68e7fdf0
21:36:52 INFO - r8 = 0x6f901ac8 r9 = 0x00000001 r10 = 0x0113f6ee fp = 0x68e7fe2f
21:36:52 INFO - sp = 0x68e7fd68 pc = 0x6323fe47
21:36:52 INFO - Found by: call frame info
21:36:52 INFO - 2 libxul.so!nsThread::ProcessNextEvent(bool, bool*) [nsThread.cpp:851707bd8630 : 848 + 0xb]
21:36:52 INFO - r4 = 0x6bf74084 r5 = 0x00000000 r6 = 0x6bf74040 r7 = 0x68e7fdf0
21:36:52 INFO - r8 = 0x68e7fde4 r9 = 0x00000001 r10 = 0x00000001 fp = 0x68e7fe2f
21:36:52 INFO - sp = 0x68e7fdc0 pc = 0x625841eb
21:36:52 INFO - Found by: call frame info
21:36:52 INFO - 3 libxul.so!NS_ProcessNextEvent(nsIThread*, bool) [nsThreadUtils.cpp:851707bd8630 : 265 + 0xd]
21:36:52 INFO - r4 = 0x6bf74040 r5 = 0x00000001 r6 = 0x6b73b058 r7 = 0x6b73b050
21:36:52 INFO - r8 = 0x00000000 r9 = 0x00000000 r10 = 0x6bf74050 fp = 0x00000001
21:36:52 INFO - sp = 0x68e7fe28 pc = 0x62599af9
21:36:52 INFO - Found by: call frame info
This will be fixed in bug 1149888 for real.
Blocks: 1149888
Attached patch Bandaid patch, v1 — — Splinter Review
This just makes sure we lock everywhere for now until the mRecursionLevel stuff gets fixed in bug 1149888. Hopefully it won't be all that much slower.
Assignee: nobody → bent.mozilla
Status: NEW → ASSIGNED
Attachment #8586594 - Flags: review?(Jan.Varga)
Summary: Intermittent debug mochitest assertion failure "Assertion failure: mRecursionLevel == 0" → Intermittent debug mochitest assertion failure "Assertion failure: mRecursionLevel == 0" [@ PLDHashTable::Search(void const*)] [@ PLDHashTable::Remove(void const*)]
Jan, the basic problem is that PLDHashTable has this recursion counter variable which tries to keep you from doing unsafe things like calling Add from within an Enum callback or something. It also sorta guards against thread-unsafe modifications. However, it modifies this count inside readonly methods like Get, so if you have two threads reading at the same time (something that should be safe in terms of threadsafety) you end up risking corruption of the counter.
Comment on attachment 8586594 [details] [diff] [review]
Bandaid patch, v1

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

::: dom/indexedDB/ActorsParent.cpp
@@ +9639,5 @@
>  {
>    AssertIsOnOwningThread();
>    MOZ_ASSERT(mShutdownRequested);
>    MOZ_ASSERT(!mShutdownComplete);
>    MOZ_ASSERT(!mDatabases.Count());

Hm, don't you want to remove |MOZ_ASSERT(!mDatabases.Count());| here ?
Attachment #8586594 - Flags: review?(Jan.Varga) → review+
Comment on attachment 8586594 [details] [diff] [review]
Bandaid patch, v1

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

::: dom/indexedDB/ActorsParent.cpp
@@ +9639,5 @@
>  {
>    AssertIsOnOwningThread();
>    MOZ_ASSERT(mShutdownRequested);
>    MOZ_ASSERT(!mShutdownComplete);
>    MOZ_ASSERT(!mDatabases.Count());

Oops, yeah. I added it in a lock below but forgot to remove it here!
Summary: Intermittent debug mochitest assertion failure "Assertion failure: mRecursionLevel == 0" [@ PLDHashTable::Search(void const*)] [@ PLDHashTable::Remove(void const*)] → Intermittent test_setVersion_exclusion.html,test_blocked_order.html, "Assertion failure: mRecursionLevel == 0" [@ PLDHashTable::Search(void const*)] [@ PLDHashTable::Remove(void const*)]
Summary: Intermittent test_setVersion_exclusion.html,test_blocked_order.html, "Assertion failure: mRecursionLevel == 0" [@ PLDHashTable::Search(void const*)] [@ PLDHashTable::Remove(void const*)] → Intermittent test_setVersion_exclusion.html,test_blocked_order.html,test_readonly.html "Assertion failure: mRecursionLevel == 0" [@ PLDHashTable::Search(void const*)] [@ PLDHashTable::Remove(void const*)]
Summary: Intermittent test_setVersion_exclusion.html,test_blocked_order.html,test_readonly.html "Assertion failure: mRecursionLevel == 0" [@ PLDHashTable::Search(void const*)] [@ PLDHashTable::Remove(void const*)] → Intermittent test_setVersion_exclusion.html,test_blocked_order.html,test_readonly.html,test_bfcache.html "Assertion failure: mRecursionLevel == 0" [@ PLDHashTable::Search(void const*)] [@ PLDHashTable::Remove(void const*)]
With bug 1149888 done, I think this bug can be closed?
Flags: needinfo?(bent.mozilla)
This one, yeah. I need to file a followup to add actual threadsafety assertions to PLDHash...
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(bent.mozilla)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: