Closed
Bug 1005853
Opened 12 years ago
Closed 12 years ago
[Octopus] Pipe error in b2g parent
Categories
(Firefox OS Graveyard :: General, defect)
Firefox OS Graveyard
General
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: octopus.pi168, Unassigned)
References
Details
Attachments
(2 files)
|
100.08 KB,
text/plain
|
Details | |
|
3.66 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140218140359
Steps to reproduce:
B2G on Banana Pi
Actual results:
We can see boot animation but can not enter home screen. Found pipe error in b2g and it seems that there is segmentation fault in content process. The errors messages are as following:
I/Gecko ( 1237): [Parent 1237] WARNING: pipe error (57): Connection reset by peer: file ../../../gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 450
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
W/Gonk ( 1237): Frame delay is 33333 us but decoding took 341410 us
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/nsVolume( 1237): nsVolume: sdcard state Mounted @ '/mnt/sdcard' gen 1 locked 0 fake 0 media 1 sharing 0 formatting 0
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][OnMaybeDequeueOne] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][OnMaybeDequeueOne] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237): [Parent 1237] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file ../../../gecko/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 20
I/Gecko ( 1237): [Parent 1237] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file ../../../gecko/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 20
I/Gecko ( 1237): [Parent 1237] WARNING: pipe error (61): Connection reset by peer: file ../../../gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 450
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237): [Parent 1237] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file ../../../gecko/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 20
I/Gecko ( 1237): [Parent 1237] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file ../../../gecko/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 20
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][OnMaybeDequeueOne] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237):
I/Gecko ( 1237): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv
I/Gecko ( 1237):
I/Gecko ( 1237): [Parent 1237] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file ../../../gecko/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 20
The detailed messages is as the attachment
| Reporter | ||
Comment 1•12 years ago
|
||
Blocks: 1000664
Comment 2•12 years ago
|
||
The pipe errors simply mean the parent process can't talk to the child process. From the attached log, I don't see any messages from the child processes at all. This suggests that they're not getting started.
Can you run 'adb shell b2g-info' or 'adb shell b2g-ps' to see what processes you are getting?
Also, you might get some more information on the console if you manually run b2g:
adb shell
stop b2g
b2g.sh
Comment 3•12 years ago
|
||
The following log's situation typically happen when the peer does not respond to IPC. It say that some problem seems to happen to child side.
> I/Gecko ( 1237): [Parent 1237] WARNING: pipe error (57): Connection reset by peer: file ../../../gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 450
| Reporter | ||
Comment 4•12 years ago
|
||
Ben, Thanks for your information.
Tried to launch b2g manually and got the follow messages:
946685088215 Marionette INFO marionette enabled via build flag and pref
946685088737 Marionette INFO marionette-server.js loaded
946685090256 Marionette INFO B2G emulator: no
946685090263 Marionette INFO Device detected is banana_pi
946685090290 Marionette INFO Listening on port 2828
946685090295 Marionette INFO Marionette server ready
System JS : WARNING resource://gre/modules/Preferences.jsm:378 - mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
[Parent 1651] WARNING: pipe error (58): Connection reset by peer: file ../../../gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 450
[Parent 1651] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file ../../../gecko/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 20
[Parent 1651] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file ../../../gecko/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 20
[Parent 1651] WARNING: pipe error: Broken pipe: file ../../../gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 727
[Parent 1651] WARNING: pipe error: Broken pipe: file ../../../gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 727
###################################### forms.js loaded
############################### browserElementPanning.js loaded
######################## BrowserElementChildPreload.js loaded
*** UTM:SVC TimerManager:registerTimer - id: user-agent-updates-timer
*** UTM:SVC TimerManager:notify - notified @mozilla.org/b2g/webapps-update-timer;1
*** UTM:SVC TimerManager:registerTimer - id: user-agent-updates-timer
$> adb shell b2g-ps
APPLICATION SEC USER PID PPID VSIZE RSS WCHAN PC NAME
b2g 0 root 1651 1 334732 232824 ffffffff 40120ee4 S /system/b2g/b2g
Gecko_IOThread 0 root 1684 1651 0 0 c00532ac 00000000 Z Gecko_IOThread
The log tells the same thing: child process has problem
Per ps results, there is only one zombie child process and no other child process is running.
I also tried "MOZ_DEBUG_CHILD_PROCESS=1 ./run-gdb.sh" for monitoring each child process creation but I got the similar messages in gdb.
I wonder how to trace the child process creation in gdb because I can only attach b2g parent.
Any suggestion is welcome.
| Reporter | ||
Comment 5•12 years ago
|
||
My gdb test results is as follows:
Breakpoint 10, mozilla::ipc::GeckoChildProcessHost::LaunchAndWaitForProcessHandle (this=0x472f11d0, aExtraOpts=...) at ../../../gecko/ipc/glue/GeckoChildProcessHost.cpp:404
404 return mProcessState < PROCESS_ERROR;
(gdb) p mProcessState
$4 = mozilla::ipc::GeckoChildProcessHost::PROCESS_CREATED
(gdb) c
Continuing.
Breakpoint 4, mozilla::dom::ContentParent::ContentParent (this=0x4836b400, aApp=0x0, aIsForBrowser=false, aIsForPreallocated=true, aInitialPriority=mozilla::hal::PROCESS_PRIORITY_BACKGROUND,
aIsNuwaProcess=true) at ../../../gecko/dom/ipc/ContentParent.cpp:1454
1454 Open(mSubprocess->GetChannel(), mSubprocess->GetOwnedChildProcessHandle());
root@android:/ # b2g-ps
APPLICATION SEC USER PID PPID VSIZE RSS WCHAN PC NAME
b2g 0 root 8542 8541 142452 36488 ffffffff 40137104 t /system/b2g/b2g
Gecko_IOThread 0 root 8572 8542 0 0 c00532ac 00000000 Z Gecko_IOThread
It seems that the parent process reports "pipe error" because the child 'Gecko_IOThread' becomes zombei right after the creation. Since I do not find the solution of attaching child process, I will try to add debug log in Gecko_IOThread.
| Reporter | ||
Comment 6•12 years ago
|
||
I perform the same test on flatfish and find that the 1st launched child process is "/system/b2g/plugin-container", instead of Gecko_IOThread. There seems something wrong for b2g to launch "Gecko_IOThread", instead of "plugin-container".
On Flatfish:
root@android:/ # b2g-ps
APPLICATION SEC USER PID PPID VSIZE RSS WCHAN PC NAME
b2g 0 root 3122 3121 117748 33980 ffffffff 41be1aa6 t /system/b2g/b2g
plugin-containe 0 root 3161 3122 75312 12252 ffffffff 40129108 S /system/b2g/plugin-container
On Banana Pi:
root@android:/ # b2g-ps
APPLICATION SEC USER PID PPID VSIZE RSS WCHAN PC NAME
b2g 0 root 8542 8541 142452 36488 ffffffff 40137104 t /system/b2g/b2g
Gecko_IOThread 0 root 8572 8542 0 0 c00532ac 00000000 Z Gecko_IOThread
| Reporter | ||
Comment 7•12 years ago
|
||
Found the root cause of running Gecko_IOThread, it is because a patch of system/core/include/private/android_filesystem_config.h is not applied yet:
static struct fs_path_config android_files[] = {
+ { 00755, AID_ROOT, AID_ROOT, "system/b2g/b2g" },
+ { 00755, AID_ROOT, AID_ROOT, "system/b2g/updater" },
+ { 00755, AID_ROOT, AID_ROOT, "system/b2g/plugin-container" },
{ 00440, AID_ROOT, AID_SHELL, "system/etc/init.goldfish.rc" },
| Reporter | ||
Comment 8•12 years ago
|
||
(In reply to Firefox OS contributor from comment #7)
> Found the root cause of running Gecko_IOThread, it is because a patch of
> system/core/include/private/android_filesystem_config.h is not applied yet:
> static struct fs_path_config android_files[] = {
> + { 00755, AID_ROOT, AID_ROOT, "system/b2g/b2g" },
> + { 00755, AID_ROOT, AID_ROOT, "system/b2g/updater" },
> + { 00755, AID_ROOT, AID_ROOT, "system/b2g/plugin-container" },
> { 00440, AID_ROOT, AID_SHELL, "system/etc/init.goldfish.rc" },
Update the status after applied the above patches, I got segmentation fault in very early steps of b2g main thread(before launch child process) and got the following error messages:
######################## BrowserElementChildPreload.js loaded
*** UTM:SVC TimerManager:registerTimer - id: user-agent-updates-timer
Crash reporter : Can't fetch app.reportCrashes. Exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://b2g/content/shell.js :: shell_reportCrash :: line 147" data: no]
| Reporter | ||
Comment 9•12 years ago
|
||
The root cause of segmentation fault is caused by the null values of LOCAL_GL_VENDOR and LOCAL_GL_RENDER in libGLEGLv2.so. The null values make GLContext::InitWithPrefix return false and failed in GLContext initialization. Trace the function InitWithPrefix() and the function seems trying to do some workaround for some known GPUs via disabling extensions. I not sure whether it is necessary to produce a segmentation fault when the vendor and GPU names are null.
Comment 10•12 years ago
|
||
Is it possible that the flow of InitWithPrefix() missed the condition when an unknown GPU is used and thus cause the seg. fault?
Flags: needinfo?(frlee)
Updated•12 years ago
|
Flags: needinfo?(frlee)
| Reporter | ||
Comment 11•12 years ago
|
||
This patches work on Banana Pi. This idea of this patch is to handle the cases of null string of LOCAL_GL_VENDOR and LOCAL_GL_RENDER in libGLEGLv2.so. We will not return false in GLContext::InitWithPrefix() when getting a null string and disable GLFeature::standard_derivatives, OES_EGL_sync features. Can someone provide suggestions on it?
| Reporter | ||
Updated•12 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•