Closed Bug 980372 Opened 6 years ago Closed 6 years ago

Intermittent test_fs_get.html | application crashed [@ mozilla::dom::GetFileOrDirectoryTask::~GetFileOrDirectoryTask()] from "Assertion failure: NS_IsMainThread() (Only call on main thread!)"

Categories

(Core :: DOM: Device Interfaces, defect)

29 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla30
Tracking Status
firefox28 --- unaffected
firefox29 --- unaffected
firefox30 --- fixed
firefox-esr24 --- unaffected

People

(Reporter: RyanVM, Assigned: xyuan)

References

Details

(Keywords: assertion, crash, intermittent-failure)

Attachments

(1 file, 1 obsolete file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=35727450&tree=Fx-Team

Rev4 MacOSX Snow Leopard 10.6 fx-team debug test mochitest-2 on 2014-03-06 08:22:16 PST for push bb950168dbda
slave: talos-r4-snow-083

08:26:33     INFO -  714 INFO TEST-START | /tests/dom/devicestorage/test/test_fs_get.html
08:26:33     INFO -  ++DOMWINDOW == 37 (0x133467c30) [pid = 956] [serial = 834] [outer = 0x12924ef90]
08:26:33     INFO -  Assertion failure: NS_IsMainThread() (Only call on main thread!), at /builds/slave/fx-team-osx64-d-00000000000000/build/dom/filesystem/GetFileOrDirectoryTask.cpp:56
08:26:35  WARNING -  TEST-UNEXPECTED-FAIL | /tests/dom/devicestorage/test/test_fs_get.html | application terminated with exit code 1
08:26:35     INFO -  INFO | runtests.py | Application ran for: 0:02:49.336357
08:26:35     INFO -  INFO | zombiecheck | Reading PID log: /var/folders/Q4/Q4S-KK7bFlOu3AnO9tF50k+++-k/-Tmp-/tmpYAk0ytpidlog
08:26:55  WARNING -  PROCESS-CRASH | /tests/dom/devicestorage/test/test_fs_get.html | application crashed [@ mozilla::dom::GetFileOrDirectoryTask::~GetFileOrDirectoryTask()]
08:26:55     INFO -  Crash dump filename: /var/folders/Q4/Q4S-KK7bFlOu3AnO9tF50k+++-k/-Tmp-/tmpdTXT3c/minidumps/37FA9FED-1E0E-4735-913B-A765DC0CDD14.dmp
08:26:55     INFO -  Operating system: Mac OS X
08:26:55     INFO -                    10.6.8 10K549
08:26:55     INFO -  CPU: amd64
08:26:55     INFO -       family 6 model 23 stepping 10
08:26:55     INFO -       2 CPUs
08:26:55     INFO -  Crash reason:  EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
08:26:55     INFO -  Crash address: 0x0
08:26:55     INFO -  Thread 54 (crashed)
08:26:55     INFO -   0  XUL!mozilla::dom::GetFileOrDirectoryTask::~GetFileOrDirectoryTask() [GetFileOrDirectoryTask.cpp:bb950168dbda : 56 + 0x0]
08:26:55     INFO -      rbx = 0x00007fff7016a2f8   r12 = 0x0000000000007500
08:26:55     INFO -      r13 = 0x00000001097b4c48   r14 = 0x0000000109a4c340
08:26:55     INFO -      r15 = 0x00000001097b4c20   rip = 0x00000001022da693
08:26:55     INFO -      rsp = 0x000000012a5c4c20   rbp = 0x000000012a5c4c30
08:26:55     INFO -      Found by: given as instruction pointer in context
08:26:55     INFO -   1  XUL!mozilla::dom::GetFileOrDirectoryTask::~GetFileOrDirectoryTask() [GetFileOrDirectoryTask.cpp:bb950168dbda : 55 + 0x4]
08:26:55     INFO -      rbx = 0x0000000109a4c340   r12 = 0x0000000000007500
08:26:55     INFO -      r13 = 0x00000001097b4c48   r14 = 0x0000000109a4c340
08:26:55     INFO -      r15 = 0x00000001097b4c20   rip = 0x00000001022da58e
08:26:55     INFO -      rsp = 0x000000012a5c4c40   rbp = 0x000000012a5c4c50
08:26:55     INFO -      Found by: call frame info
08:26:55     INFO -   2  XUL!nsRunnable::Release() [nsThreadUtils.cpp:bb950168dbda : 32 + 0x8]
08:26:55     INFO -      rbx = 0x0000000000000000   r12 = 0x0000000000007500
08:26:55     INFO -      r13 = 0x00000001097b4c48   r14 = 0x0000000109a4c340
08:26:55     INFO -      r15 = 0x00000001097b4c20   rip = 0x000000010101a4c9
08:26:55     INFO -      rsp = 0x000000012a5c4c60   rbp = 0x000000012a5c4c70
08:26:55     INFO -      Found by: call frame info
08:26:55     INFO -   3  XUL!nsThreadPool::Run() [nsCOMPtr.h:bb950168dbda : 507 + 0x5]
08:26:55     INFO -      rbx = 0x0000000000000000   r12 = 0x0000000000007500
08:26:55     INFO -      r13 = 0x00000001097b4c48   r14 = 0x000000012a5c4ca0
08:26:55     INFO -      r15 = 0x00000001097b4c20   rip = 0x00000001010aa0f9
08:26:55     INFO -      rsp = 0x000000012a5c4c80   rbp = 0x000000012a5c4ce0
08:26:55     INFO -      Found by: call frame info
08:26:55     INFO -   4  XUL!_ZThn8_N12nsThreadPool3RunEv [Unified_cpp_xpcom_threads0.cpp:bb950168dbda : 225 + 0x8]
08:26:55     INFO -      rbx = 0x0000000000000001   r12 = 0x00000001097676a0
08:26:55     INFO -      r13 = 0x000000013374c980   r14 = 0x0000000000000001
08:26:55     INFO -      r15 = 0x000000013374c9c0   rip = 0x00000001010aa1cd
08:26:55     INFO -      rsp = 0x000000012a5c4cf0   rbp = 0x000000012a5c4cf0
08:26:55     INFO -      Found by: call frame info
Thanks.

The mainthread assertion in the dtor of GetFileOrDirectoryTask is not necessary and should be removed. We allow GetFileOrDirectoryTask to be released and destroyed on worker thread.

I will make a patch tomorrow.
Assignee: nobody → xyuan
Status: NEW → ASSIGNED
See Also: → 980449
Attached patch dtor-crash.patch (obsolete) — Splinter Review
Remove mainthread assertion in the dtor of GetFileOrDirectoryTask and CreateDirectoryTask, as we my release XXXTask instance from the worker thread.
Attachment #8387334 - Flags: review?(dhylands)
Duplicate of this bug: 980449
Attached patch dtor-crash.patchSplinter Review
The mPromise member of XXXTask is not thread safe. Ensure we only create and release mPromise on the main thread.
Attachment #8387334 - Attachment is obsolete: true
Attachment #8387334 - Flags: review?(dhylands)
Attachment #8387361 - Flags: review?(dhylands)
Blocks: 910412
Comment on attachment 8387361 [details] [diff] [review]
dtor-crash.patch

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

Looks reasonable to me
Attachment #8387361 - Flags: review?(dhylands) → review+
https://hg.mozilla.org/mozilla-central/rev/e8afab50c7fe
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Looks like we need the same (or similar) fix in FileSystemTaskBase.cpp?
Flags: needinfo?(xyuan)
Yes, that's right and we have bug 981145 for that. :-)
Depends on: 981145
Flags: needinfo?(xyuan)
Backed out along with bug 910412 and other dependencies for ongoing crashes.
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b9e23e1aa85
You need to log in before you can comment on or make changes to this bug.