Closed Bug 1194180 Opened 11 years ago Closed 9 years ago

Nuwa: MOZ_ALWAYS_TRUE(NS_SUCCEEDED(NS_DispatchToMainThread(runnable)));

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gwagner, Assigned: cyu)

References

Details

Attachments

(4 files, 2 obsolete files)

Attached file gdb bt —
Seen on current trunk on aries with debug gecko and monkey testing.
Flags: needinfo?(cyu)
Can you get a backtrace for the main thread too?
Flags: needinfo?(anygregor)
Attached file main thread —
Flags: needinfo?(anygregor)
Hm thats interesting. 2 PA processes: root@aries:/ # b2g-ps APPLICATION SEC USER PID PPID VSIZE RSS WCHAN PC NAME b2g 0 root 5131 1 340116 131532 ffffffff b6ea72d4 t /system/b2g/b2g (Nuwa) 0 root 5138 5131 116028 26012 ffffffff b6ea6a60 S /system/b2g/b2g Homescreen 2 u0_a5468 5468 5138 148500 51608 ffffffff b6ea6894 S /system/b2g/b2g OperatorVariant 2 u0_a5498 5498 5138 131180 39240 ffffffff b6ea6894 S /system/b2g/b2g Built-in Keyboa 2 u0_a5645 5645 5138 139600 44812 ffffffff b6ea6894 S /system/b2g/b2g Usage 2 u0_a6313 6313 5138 133480 42136 ffffffff b6ea6894 S /system/b2g/b2g Find My Device 2 u0_a7362 7362 5138 130904 40420 ffffffff b6ea6894 S /system/b2g/b2g Browser 2 u0_a7709 7709 5138 136116 43668 ffffffff b6ea6894 S /system/b2g/b2g (Preallocated a 0 u0_a8226 8226 5138 119248 15760 ffffffff b6ea6a60 S /system/b2g/b2g (Preallocated a 0 u0_a8248 8248 5138 119248 15588 ffffffff b6ea6a60 S /system/b2g/b2g root@aries:/ #
Probably not related but I see a bunch of those messages in logcat: W/Nuwa ( 5703): Threads remaining at exit: W/Nuwa ( 5703): Chrome_ChildThr (origNativeThreadID=5225 recreatedNativeThreadID=5704) W/Nuwa ( 5703): ImageBridgeChil (origNativeThreadID=5276 recreatedNativeThreadID=5720) W/Nuwa ( 5703): BufferMgrChild (origNativeThreadID=5277 recreatedNativeThreadID=5721) W/Nuwa ( 5703): total: 3 outstanding threads. Please fix them so they're destroyed before this point! W/Nuwa ( 5703): note: sThreadCount=3, sThreadFreezeCount=18
One more find in logcat from when we hit the assertion: F/MOZ_Assert( 5131): Assertion failure: get() (dereferencing a UniquePtr containing nullptr), at ../../dist/include/mozilla/UniquePtr.h:286
Blocks: 1155547
Assignee: nobody → cyu
Flags: needinfo?(cyu)
(In reply to Cervantes Yu [:cyu] [:cervantes] from comment #10) > https://treeherder.mozilla.org/#/jobs?repo=try&revision=6a361b0d4268 It turns out that using namespace base; in NuwaParent.cpp pollutes CrashReporterParent.cpp and the make windows compiler complain ambiguous usage of vsnprintf() with base::vsnprintf(). Hopefully this should build on Windows.
Attachment #8647998 - Attachment is obsolete: true
Attachment #8647998 - Flags: review?(khuey)
Attachment #8649222 - Flags: review?(khuey)
Update: fix the build failure on windows.
Attachment #8649222 - Attachment is obsolete: true
Attachment #8649222 - Flags: review?(khuey)
Attachment #8649822 - Flags: review?(khuey)
Are you sure that we're actually failing to dispatch to the main thread? That should only fail very very late in shutdown.
Flags: needinfo?(cyu)
From attachment 8647468 [details], the main thread is still running. I don't think it should ever fail dispatching to the main thread. On a closer look I found a race when 2 consecutive NuwaParent::RecvAddNewProcess() messages comes in, but it still doesn't explain the crash in MOZ_ALWAYS_TRUE().
Flags: needinfo?(cyu)
This simulates that when 2 fork requests (one async, one sync) are on the fly. There is a race to trigger a crash in using mNewProcessFds. I am not sure if this is the same crash, but this needs to be fixed.
So ... should I actually review this patch?
Flags: needinfo?(cyu)
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #17) > So ... should I actually review this patch? No. I'll focus on fixing the race first and request review if there is proof that the crash is in dispatching the runnable.
Flags: needinfo?(cyu)
Attachment #8649822 - Flags: review?(khuey)
Nuwa is gone after bug 1284674.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: