Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: www/firefox build error on macppc



On 03/24/15 12:30, Martin Husemann wrote:
But if you want to try debugging firefox, please see this article how
to start:

	https://wiki.netbsd.org/tutorials/pkgsrc/debugging_firefox/


Ok, did that.

I'm getting SIGILL when started w/o debugger, and SIGSEGV when started with debugger.




[muc-twinppc:/usr/pkgsrc/www/firefox/work.powerpc/build/dist/bin]$ ./run-mozilla.sh ./firefox

(process:6931): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Illegal instruction
[muc-twinppc:/usr/pkgsrc/www/firefox/work.powerpc/build/dist/bin]$ ./run-mozilla.sh -g ./firefox
MOZILLA_FIVE_HOME=.
  LD_LIBRARY_PATH=.:./plugins:.
DISPLAY=blasi:0.0
DYLD_LIBRARY_PATH=.:.
     LIBRARY_PATH=
       SHLIB_PATH=.:.
          LIBPATH=.:.
       ADDON_PATH=
      MOZ_PROGRAM=./firefox
      MOZ_TOOLKIT=
        moz_debug=1
     moz_debugger=
moz_debugger_args=
/usr/bin/gdb  --args ./firefox
GNU gdb (GDB) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./firefox...done.
(gdb) r
Starting program: /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/build/dist/bin/firefox

(process:17646): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1]
nsXPCComponents::SetReturnCode (this=<optimized out>, aCx=0xffffbd28, aCode=<error reading variable: Cannot access memory at address 0xffffffe6>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/xpconnect/src/XPCComponents.cpp:3708
3708    {
(gdb) x/3i $pc
=> 0xf8882bb0 <nsXPCComponents::SetReturnCode(JSContext*, JS::Handle<JS::Value>)+52>: lwz r29,0(r5) 0xf8882bb4 <nsXPCComponents::SetReturnCode(JSContext*, JS::Handle<JS::Value>)+56>: bl 0xfa5f30d0 <00008000.got2.plt_pic32._Z26JS_GetSecondContextPrivateP9JSContext+16> 0xf8882bb8 <nsXPCComponents::SetReturnCode(JSContext*, JS::Handle<JS::Value>)+60>: mr. r28,r3
(gdb) inf reg r5
r5             0xffffffe6       4294967270
(gdb) bt
#0 nsXPCComponents::SetReturnCode (this=<optimized out>, aCx=0xffffbd28, aCode=<error reading variable: Cannot access memory at address 0xffffffe6>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/xpconnect/src/XPCComponents.cpp:3708 #1 0xf82bba34 in NS_InvokeByIndex () at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_netbsd.s:86 #2 0xf88c2054 in Invoke (this=0xffffbcf8) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/xpconnect/src/XPCWrappedNative.cpp:2395 #3 Call (this=0xffffbcf8) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/xpconnect/src/XPCWrappedNative.cpp:1747 #4 XPCWrappedNative::CallMethod (ccx=..., mode=mode@entry=XPCWrappedNative::CALL_GETTER) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/xpconnect/src/XPCWrappedNative.cpp:1714 #5 0xf88c69f0 in GetAttribute (ccx=...) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/xpconnect/src/xpcprivate.h:2145 #6 XPC_WN_GetterSetter (cx=cx@entry=0xfdbbc0e0, argc=0, vp=0xffffc220) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:1280 #7 0xfd805be0 in CallJSNative (args=..., native=0xf88c67b4 <XPC_WN_GetterSetter(JSContext*, unsigned int, JS::Value*)>, cx=0xfdbbc0e0) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/jscntxtinlines.h:231 #8 js::Invoke (cx=cx@entry=0xfdbbc0e0, args=<error reading variable: Cannot access memory at address 0x1>, construct=construct@entry=js::NO_CONSTRUCT) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/Interpreter.cpp:484 #9 0xfd80825c in js::Invoke (cx=cx@entry=0xfdbbc0e0, thisv=..., fval=..., argc=argc@entry=0, argv=argv@entry=0x0, rval=<error reading variable: value has been optimized out>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/Interpreter.cpp:540 #10 0xfd80b46c in js::InvokeGetterOrSetter (cx=0xfdbbc0e0, obj=0xf3949120, fval=..., argc=argc@entry=0, argv=argv@entry=0x0, rval=...) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/Interpreter.cpp:613 #11 0xfd94e1d8 in js::Shape::get (this=<optimized out>, cx=<optimized out>, receiver=..., obj=<optimized out>, pobj=<optimized out>, vp=...) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/Shape-inl.h:44 #12 0xfd838618 in NativeGetInline<(js::AllowGC)1> (vp=..., shape=..., pobj=..., receiver=..., obj=..., cx=0xfdbbc0e0) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/NativeObject.cpp:1653 #13 GetPropertyHelperInline<(js::AllowGC)1> (vp=..., id=..., receiver=..., obj=..., cx=0xfdbbc0e0) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/NativeObject.cpp:1891 #14 js::baseops::GetProperty (cx=0xfdbbc0e0, obj=..., receiver=..., id=..., vp=...) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/NativeObject.cpp:1901 #15 0xfd8dade0 in JSObject::getGeneric (cx=<optimized out>, obj=<error reading variable: value has been optimized out>, receiver=<error reading variable: value has been optimized out>, id=<error reading variable: value has been optimized out>, vp=<error reading variable: value has been optimized out>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/NativeObject.h:1405 #16 0xfd7fbab8 in GetPropertyOperation (vp=..., lval=..., pc=<optimized out>, script=..., fp=<optimized out>, cx=<optimized out>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/Interpreter.cpp:253 #17 Interpret (cx=0xfdbbc0e0, state=...) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/Interpreter.cpp:2359 #18 0xfd80583c in js::RunScript (cx=cx@entry=0xfdbbc0e0, state=...) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/Interpreter.cpp:434 #19 0xfd80c7c8 in js::ExecuteKernel (cx=cx@entry=0xfdbbc0e0, script=..., scopeChainArg=..., thisv=..., type=type@entry=js::EXECUTE_GLOBAL, evalInFrame=..., result=result@entry=0x0) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/Interpreter.cpp:643 #20 0xfd80e224 in js::Execute (cx=cx@entry=0xfdbbc0e0, script=..., scopeChainArg=..., rval=rval@entry=0x0) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/vm/Interpreter.cpp:680 #21 0xfd6fcf04 in ExecuteScript (cx=cx@entry=0xfdbbc0e0, obj=<error reading variable: value has been optimized out>, scriptArg=<error reading variable: value has been optimized out>, rval=rval@entry=0x0) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/jsapi.cpp:4711 #22 0xfd6fcfd0 in JS_ExecuteScript (cx=cx@entry=0xfdbbc0e0, obj=<error reading variable: value has been optimized out>, scriptArg=<error reading variable: value has been optimized out>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/src/jsapi.cpp:4733 #23 0xf8875548 in mozJSComponentLoader::ObjectForLocation (this=this@entry=0xf3806c00, aInfo=..., aComponentFile=aComponentFile@entry=0xfdb03f80, aObject=..., aTableScript=..., aLocation=aLocation@entry=0xf38d3460, aPropagateExceptions=aPropagateExceptions@entry=false, aException=...) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/xpconnect/loader/mozJSComponentLoader.cpp:946 #24 0xf8876300 in mozJSComponentLoader::LoadModule (this=0xf3806c00, aFile=...) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/xpconnect/loader/mozJSComponentLoader.cpp:362 #25 0xf82a44e4 in nsComponentManagerImpl::KnownModule::Load (this=0xfdba6420) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/xpcom/components/nsComponentManager.cpp:849 #26 0xf82a4e4c in nsFactoryEntry::GetFactory (this=0xf581d340) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/xpcom/components/nsComponentManager.cpp:1915 #27 0xf82a56ec in nsComponentManagerImpl::CreateInstanceByContractID (this=0xfdb6c130, aContractID=0xf38b7940 "@mozilla.org/dom/identity/service;1", aDelegate=0x0, aIID=..., aResult=aResult@entry=0xffffce08) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/xpcom/components/nsComponentManager.cpp:1196 #28 0xf82cb458 in CallCreateInstance (aResult=0xffffce08, aIID=..., aDelegate=<optimized out>, aContractID=<optimized out>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/xpcom/glue/nsComponentManagerUtils.cpp:151 #29 nsCreateInstanceByContractID::operator() (this=0xffffce8c, aIID=..., aInstancePtr=0xffffce08) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/xpcom/glue/nsComponentManagerUtils.cpp:197 #30 0xf82c70c4 in nsCOMPtr_base::assign_from_helper (this=0xffffceac, aHelper=..., aIID=...) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/xpcom/glue/nsCOMPtr.cpp:125 #31 0xf9f4f654 in operator= (aRhs=..., this=0xffffceac) at ../../../dist/include/nsCOMPtr.h:915 #32 nsAppStartupNotifier::Observe (this=<optimized out>, aSubject=<optimized out>, aTopic=0xfa8c5b88 "app-startup", someData=<optimized out>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/embedding/components/appstartup/nsAppStartupNotifier.cpp:64 #33 0xfa15c8e4 in XREMain::XRE_mainRun (this=this@entry=0xffffd048) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/toolkit/xre/nsAppRunner.cpp:4059 #34 0xfa15d47c in XREMain::XRE_main (this=this@entry=0xffffd048, argc=argc@entry=1, argv=argv@entry=0xffffd664, aAppData=aAppData@entry=0xffffd178) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/toolkit/xre/nsAppRunner.cpp:4309 #35 0xfa15d6cc in XRE_main (argc=1, argv=0xffffd664, aAppData=0xffffd178, aFlags=<optimized out>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/toolkit/xre/nsAppRunner.cpp:4529 #36 0x01818418 in do_main (xreDirectory=0xfdb020c0, argv=0xffffd664, argc=1) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/browser/app/nsBrowserApp.cpp:294 #37 main (argc=<optimized out>, argv=<optimized out>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/browser/app/nsBrowserApp.cpp:663
(gdb) up
#1 0xf82bba34 in NS_InvokeByIndex () at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_netbsd.s:86
86              blrl                                    # call method
(gdb) disas
Dump of assembler code for function NS_InvokeByIndex:
   0xf82bb978 <+0>:     stwu    r1,-32(r1)
   0xf82bb97c <+4>:     mflr    r0
   0xf82bb980 <+8>:     stw     r3,8(r1)
   0xf82bb984 <+12>:    stw     r4,12(r1)
   0xf82bb988 <+16>:    stw     r30,16(r1)
   0xf82bb98c <+20>:    stw     r31,20(r1)
   0xf82bb990 <+24>:    stw     r0,36(r1)
   0xf82bb994 <+28>:    mr      r31,r1
   0xf82bb998 <+32>:    rlwinm  r10,r5,3,0,27
   0xf82bb99c <+36>:    addi    r0,r10,96
   0xf82bb9a0 <+40>:    lwz     r9,0(r1)
   0xf82bb9a4 <+44>:    neg     r0,r0
   0xf82bb9a8 <+48>:    stwux   r9,r1,r0
   0xf82bb9ac <+52>:    addi    r3,r1,8
   0xf82bb9b0 <+56>:    mr      r4,r5
   0xf82bb9b4 <+60>:    mr      r5,r6
   0xf82bb9b8 <+64>:    add     r6,r3,r10
   0xf82bb9bc <+68>:    mr      r30,r6
   0xf82bb9c0 <+72>:    addi    r7,r6,32
0xf82bb9c4 <+76>: bl 0xf82bac00 <invoke_copy_to_stack(__uint32_t*, __uint32_t, nsXPTCVariant*, __uint32_t*, double*)>
   0xf82bb9c8 <+80>:    lfd     f1,32(r30)
   0xf82bb9cc <+84>:    lfd     f2,40(r30)
   0xf82bb9d0 <+88>:    lfd     f3,48(r30)
   0xf82bb9d4 <+92>:    lfd     f4,56(r30)
   0xf82bb9d8 <+96>:    lfd     f5,64(r30)
   0xf82bb9dc <+100>:   lfd     f6,72(r30)
   0xf82bb9e0 <+104>:   lfd     f7,80(r30)
   0xf82bb9e4 <+108>:   lfd     f8,88(r30)
   0xf82bb9e8 <+112>:   lwz     r3,8(r31)
   0xf82bb9ec <+116>:   lwz     r4,12(r31)
   0xf82bb9f0 <+120>:   lwz     r5,0(r3)
   0xf82bb9f4 <+124>:   rlwinm  r4,r4,3,0,28
   0xf82bb9f8 <+128>:   addi    r4,r4,8
   0xf82bb9fc <+132>:   add     r4,r4,r5
   0xf82bba00 <+136>:   lhz     r0,0(r4)
   0xf82bba04 <+140>:   extsh   r0,r0
   0xf82bba08 <+144>:   add     r3,r3,r0
   0xf82bba0c <+148>:   lwz     r0,4(r4)
   0xf82bba10 <+152>:   lwz     r4,4(r30)
   0xf82bba14 <+156>:   lwz     r5,8(r30)
   0xf82bba18 <+160>:   lwz     r6,12(r30)
   0xf82bba1c <+164>:   lwz     r7,16(r30)
   0xf82bba20 <+168>:   lwz     r8,20(r30)
   0xf82bba24 <+172>:   lwz     r9,24(r30)
   0xf82bba28 <+176>:   lwz     r10,28(r30)
   0xf82bba2c <+180>:   mtlr    r0
   0xf82bba30 <+184>:   blrl
=> 0xf82bba34 <+188>:   lwz     r30,16(r31)
   0xf82bba38 <+192>:   lwz     r31,20(r31)
   0xf82bba3c <+196>:   lwz     r11,0(r1)
   0xf82bba40 <+200>:   lwz     r0,4(r11)
   0xf82bba44 <+204>:   mtlr    r0
   0xf82bba48 <+208>:   mr      r1,r11
   0xf82bba4c <+212>:   blr
End of assembler dump.
(gdb) inf thr
[New LWP 12]
[New LWP 11]
[New LWP 10]
[New LWP 9]
[New LWP 8]
[New LWP 7]
[New LWP 6]
[New LWP 5]
[New LWP 4]
[New LWP 3]
[New LWP 2]
  Id   Target Id         Frame
12 LWP 2 0xfdc77e9c in _sys___kevent50 () from /usr/lib/libc.so.12
  11   LWP 3             0xfdc77dec in poll () from /usr/lib/libc.so.12
10 LWP 4 0xfdcf4d70 in ___lwp_park60 () from /usr/lib/libc.so.12 9 LWP 5 0xfdcf4d70 in ___lwp_park60 () from /usr/lib/libc.so.12 8 LWP 6 0xfdcf4d70 in ___lwp_park60 () from /usr/lib/libc.so.12 7 LWP 7 0xfdcf4d70 in ___lwp_park60 () from /usr/lib/libc.so.12 6 LWP 8 0xfdcf4d70 in ___lwp_park60 () from /usr/lib/libc.so.12 5 LWP 9 0xfdcf4d70 in ___lwp_park60 () from /usr/lib/libc.so.12 4 LWP 10 0xfdcf4d70 in ___lwp_park60 () from /usr/lib/libc.so.12 3 LWP 11 0xfdcf4d70 in ___lwp_park60 () from /usr/lib/libc.so.12 2 LWP 12 0xfdcf4d70 in ___lwp_park60 () from /usr/lib/libc.so.12 * 1 LWP 1 nsXPCComponents::SetReturnCode (this=<optimized out>, aCx=0xffffbd28, aCode=<error reading variable: Cannot access memory at address 0xffffffe6>) at /local/netbsd-src/pkgsrc/www/firefox/work.powerpc/mozilla-release/js/xpconnect/src/XPCComponents.cpp:3708
(gdb)



I did some more research, and if I read the code correctly, 'NS_InvokeByIndex' is supposed to copy the function parameters (described in 'params' and 'paramCount') to the stack ('invoke_copy_to_stack'), load the parameters from the stack to the registers and chain to the desired function.

Now in the failing case, 'paramCount' is one, athough the requested function 'nsXPCComponents::SetReturnCode' expects two parameters (or three with 'this', I don't know if it's counted in 'paramCount').

regards,
chris



Home | Main Index | Thread Index | Old Index