After gdb debugging looks like below Segmentation fault. Is because libxul.so giving problem while dlopen from bionic
if i push libxul.so from another build through adb shell gives version mismatch error in dlopen, any idea -----Original Message----- From: Singh, Arun Kumar Sent: Thursday, September 12, 2013 3:52 PM To: 'Julien Wajsberg' Cc: [email protected] Subject: RE: [b2g] b2g process segmentation fault But there a repo on github for Nexus 7 (https://github.com/vvuk/B2G) which claim it working on this device so I forked my repo from this github repo Its seems failing here while loading xpcom XPCOMGlueLoad > Program received signal SIGSEGV, Segmentation fault. > phdr_table_get_dynamic_section (phdr_table=<optimized out>, > phdr_count=<optimized out>, load_bias=1080033280, dynamic=0x400678f0, > dynamic_count=0xbea509b4) at bionic/linker/linker_phdr.c:560 > 560 if (phdr->p_type != PT_DYNAMIC) { More traces are below -----Original Message----- From: Julien Wajsberg [mailto:[email protected]] Sent: Thursday, September 12, 2013 2:32 PM To: Singh, Arun Kumar Cc: [email protected] Subject: Re: [b2g] b2g process segmentation fault I think we don't support Android 4.2, but only 4.0 and 4.1. That may be the reason :) Le 12/09/2013 07:02, Singh, Arun Kumar a écrit : > Below is more traces from gdb on segmentation fault to get some clue > > Please check line after "Program received signal SIGSEGV, Segmentation fault" > > ****************************** > (gdb) break main > Breakpoint 1 at 0x945c: file > /home/lab2/workspace/b2g-github-repo/b2g-xmm6321/gecko/b2g/app/nsBrowserApp.cpp, > line 168. > (gdb) continue > Continuing. > > Breakpoint 1, main (argc=1, argv=0xbea55af4) at > /home/lab2/workspace/b2g-github-repo/b2g-xmm6321/gecko/b2g/app/nsBrowserApp.cpp:168 > 168 { > (gdb) next > 171 nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); > (gdb) next > 168 { > (gdb) next > 171 nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); > (gdb) next > 177 char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]); > (gdb) next > 178 if (!lastSlash || ((lastSlash - exePath) + sizeof(XPCOM_DLL) + 1 > > MAXPATHLEN)) > (gdb) next > 181 strcpy(++lastSlash, XPCOM_DLL); > (gdb) next > 189 (void)setsid(); > (gdb) next > 195 gotCounters = !getrusage(RUSAGE_SELF, &initialRUsage); > (gdb) next > 202 XPCOMGlueEnablePreload(); > (gdb) next > 204 rv = XPCOMGlueStartup(exePath); > (gdb) next > ^[[A > Program received signal SIGSEGV, Segmentation fault. > phdr_table_get_dynamic_section (phdr_table=<optimized out>, > phdr_count=<optimized out>, load_bias=1080033280, dynamic=0x400678f0, > dynamic_count=0xbea509b4) at bionic/linker/linker_phdr.c:560 > 560 if (phdr->p_type != PT_DYNAMIC) { > (gdb) bt > #0 phdr_table_get_dynamic_section (phdr_table=<optimized out>, > phdr_count=<optimized out>, load_bias=1080033280, > dynamic=0x400678f0, dynamic_count=0xbea509b4) at > bionic/linker/linker_phdr.c:560 > #1 0x40058fb4 in soinfo_link_image (si=0x40067858) at > bionic/linker/linker.cpp:1452 > #2 0x40058f4a in init_library (si=0x40067858) at > bionic/linker/linker.cpp:847 > #3 find_library (name=0xbea51a10 "/system/b2g/libxul.so") at > bionic/linker/linker.cpp:901 > #4 0x4005a0be in dlopen (filename=0xbea51a10 "/system/b2g/libxul.so", > flag=<optimized out>) at bionic/linker/dlfcn.c:59 > #5 0x00019ab4 in ReadDependentCB (aDependentLib=<optimized out>, > do_preload=<optimized out>) > at > /home/lab2/workspace/b2g-github-repo/b2g-xmm6321/gecko/xpcom/glue/stan > dalone/nsGlueLinkingDlopen.cpp:191 > #6 0x0001953e in XPCOMGlueLoadDependentLibs (xpcomDir=0xbea52a30 > "/system/b2g", cb=0x19aad <ReadDependentCB(char const*, bool)>) > at > /home/lab2/workspace/b2g-github-repo/b2g-xmm6321/gecko/xpcom/glue/stan > dalone/nsXPCOMGlue.cpp:106 > #7 0x00019b38 in XPCOMGlueLoad (xpcomFile=0xbea53aa8 > "/system/b2g/libxpcom.so", func=0xbea53a44) > at > /home/lab2/workspace/b2g-github-repo/b2g-xmm6321/gecko/xpcom/glue/stan > dalone/nsGlueLinkingDlopen.cpp:207 > #8 0x0001949e in XPCOMGlueStartup (xpcomFile=<optimized out>) > at > /home/lab2/workspace/b2g-github-repo/b2g-xmm6321/gecko/xpcom/glue/stan > dalone/nsXPCOMGlue.cpp:45 > #9 0x000094d6 in main (argc=1, argv=0xbea55af4) > at > /home/lab2/workspace/b2g-github-repo/b2g-xmm6321/gecko/b2g/app/nsBrows > erApp.cpp:204 > ****************************** > > -Arun > -----Original Message----- > From: dev-b2g > [mailto:[email protected]] > On Behalf Of Singh, Arun Kumar > Sent: Thursday, September 12, 2013 9:23 AM > To: [email protected] > Subject: Re: [b2g] b2g process segmentation fault > > Hi, > > Getting segmentation fault for b2g process on device ported with FFOS > based on JB 4.2.1 > > And in gdb prompt getting below back trace, in anyone have some idea? > > (gdb)backtrace > #0 rtld_db_dlactivity () at bionic/linker/rt.c:35 > #1 0x400444d2 in notify_gdb_of_load (info=0xbedfc9a4) at > bionic/linker/linker.cpp:238 > #2 __dl_$t () at bionic/linker/linker.cpp:1703 > #3 0x4004493c in __linker_init (elfdata=0xbedfcaf0) at > bionic/linker/linker.cpp:2047 Backtrace stopped: previous frame inner > to this frame (corrupt stack?) > > Looks like bionic linker throw segmentation fault for elfdata gives > > -Arun > _______________________________________________ > dev-b2g mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-b2g > _______________________________________________ > dev-b2g mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-b2g _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
