• aarch64 build

    From deon@1:103/705 to Digital Man on Tue Jan 21 19:31:25 2025
    Howdy,

    So I thought I'd try kick off my aarch64 build of SBBS again (knowing you were working on a MAC version) - but I'm on a Pi.

    I was super pleased to see it build and complete successfully :)

    Wasnt pleased when it core dumped when I started it.

    Is it too early for a Pi version?

    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1". Core was generated by `sbbs'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0 0x0000ffff9dc35fe0 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /opt/sbbs/exec/libsbbs.so
    [Current thread is 1 (Thread 0xffff837fe1c0 (LWP 72))]

    (gdb) bt
    #0 0x0000ffff9dc35fe0 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /opt/sbbs/exec/libsbbs.so
    #1 0x0000ffff9dbff710 in js_NewFunction(JSContext*, JSObject*, int (*)(JSContext*, unsigned int, js::Value*), unsigned int, unsigned int, JSObject*, JSAtom*) ()
    from /opt/sbbs/exec/libsbbs.so
    #2 0x0000ffff9dc02194 in js_DefineFunction(JSContext*, JSObject*, long, int (*)(JSContext*, unsigned int, js::Value*), unsigned int, unsigned int) () from /opt/sbbs/exec/libsbbs.so
    #3 0x0000ffff9dbb0dc4 in JS_DefineFunctions () from /opt/sbbs/exec/libsbbs.so #4 0x0000ffff9dc38b60 in js::DefineConstructorAndPrototype(JSContext*, JSObject*, JSProtoKey, JSAtom*, JSObject*, js::Class*, int (*)(JSContext*, unsigned int, js::Value*), unsigned int, JSPropertySpec*, JSFunctionSpec*, JSPropertySpec*, JSFunctionSpec*) () from /opt/sbbs/exec/libsbbs.so
    #5 0x0000ffff9dc39790 in js_InitClass(JSContext*, JSObject*, JSObject*, js::Class*, int (*)(JSContext*, unsigned int, js::Value*), unsigned int, JSPropertySpec*, JSFunctionSpec*, JSPropertySpec*, JSFunctionSpec*) () from /opt/sbbs/exec/libsbbs.so
    #6 0x0000ffff9dbffe4c in js_InitFunctionClass(JSContext*, JSObject*) () from /opt/sbbs/exec/libsbbs.so
    #7 0x0000ffff9dbb0b9c in js_InitFunctionAndObjectClasses(JSContext*, JSObject*) () from /opt/sbbs/exec/libsbbs.so
    #8 0x0000ffff9dbb0c38 in JS_InitStandardClasses () from /opt/sbbs/exec/libsbbs.so
    #9 0x0000ffff9dac7294 in js_CreateGlobalObject () from /opt/sbbs/exec/libsbbs.so
    #10 0x0000ffff9d84ae14 in js_initcx () from /opt/sbbs/exec/libservices.so
    #11 0x0000ffff9d84c094 in js_static_service_thread () from /opt/sbbs/exec/libservices.so
    #12 0x0000ffff9d817648 in start_thread (arg=0xffff837fdac0) at pthread_create.c:477
    #13 0x0000ffff9d76dc9c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78


    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Tue Jan 21 00:53:47 2025
    Re: aarch64 build
    By: deon to Digital Man on Tue Jan 21 2025 07:31 pm

    Howdy,

    So I thought I'd try kick off my aarch64 build of SBBS again (knowing you were working on a MAC version) - but I'm on a Pi.

    I was super pleased to see it build and complete successfully :)

    Wasnt pleased when it core dumped when I started it.

    Is it too early for a Pi version?

    No, there's a lot of sysop running on rPis.

    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1". Core was generated by `sbbs'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0 0x0000ffff9dc35fe0 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /opt/sbbs/exec/libsbbs.so [Current thread is 1 (Thread 0xffff837fe1c0 (LWP 72))]

    I think you just got unlucky in your timing of cloning the git repo. That bug was pretty quickly reverted today. Try again.
    --
    digital man (rob)

    This Is Spinal Tap quote #31:
    Viv Savage: Quite exciting, this computer magic!
    Norco, CA WX: 51.9°F, 14.0% humidity, 1 mph NE wind, 0.01 inches rain/24hrs
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Tue Jan 21 22:00:01 2025
    Re: aarch64 build
    By: Digital Man to deon on Tue Jan 21 2025 12:53 am

    Howdy,

    Is it too early for a Pi version?

    No, there's a lot of sysop running on rPis.

    On aarch64 with a 64bit build? Running 32bit SBBS on aarch64 worked for me before, but not 64 bit.

    Anyway, I recompiled and confirmed I'm running master/d84a380bf, but the same segfault.

    I'll recompile a DEBUG build for a proper backtrace...


    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Tue Jan 21 23:23:35 2025
    Re: aarch64 build
    By: deon to Digital Man on Tue Jan 21 2025 10:00 pm

    Howdy,

    I'll recompile a DEBUG build for a proper backtrace...

    Here is a backtrace

    Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1". [7/4929]
    Core was generated by `sbbs'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0 0x0000ffffb57ba258 in JSObject::getClass (this=0x7fffa9e04100) at jsobj.h:427
    427 jsobj.h: No such file or directory.
    [Current thread is 1 (Thread 0xffffaaffd1c0 (LWP 541))]
    (gdb) bt full
    #0 0x0000ffffb57ba258 in JSObject::getClass (this=0x7fffa9e04100) at jsobj.h:427
    No locals.
    #1 0x0000ffffb57baed0 in JSObject::isFunction (this=0x7fffa9e04100) at jsfun.h:312
    No locals.
    #2 0x0000ffffb588c67c in js::IsFunctionObject (v=...) at jsfun.h:342
    No locals.
    #3 js::FindClassPrototype (cx=0xffff8c018240, scopeobj=0xffffa9e03048, protoKey=JSProto_Function, protop=0xffffaaff9c80, clasp=0xffffb5c39b28 <js_FunctionClass>) at jsobj.cpp:6168
    v = {data = {asBits = 18445618172357787904, debugView = {payload47 = 140736043434240, tag = JSVAL_TAG_OBJECT}, s = {payload = {i32 = -1444921088, u32 = 2850046208,
    why = 2850046208, word = 18445618172357787904}}, asDouble = -nan(0xbffffa9e04100), asPtr = 0xfffbffffa9e04100}}
    #4 0x0000ffffb588c8e0 in js_GetClassPrototype (cx=0xffff8c018240, scopeobj=0xffffa9e03048, protoKey=JSProto_Function, protop=0xffffaaff9c80, clasp=0xffffb5c39b28 <js_FunctionClass>)
    at jsobj.cpp:6212
    No locals.
    #5 0x0000ffffb5827d78 in js::FindProto (proto=0xffffaaff9c80, parent=0xffffa9e04080, clasp=0xffffb5c39b28 <js_FunctionClass>, cx=0xffff8c018240) at jsobjinlines.h:1053
    protoKey = JSProto_Function
    #6 js::detail::NewObject<false, true> (kind=js::gc::FINALIZE_OBJECT2, parent=0xffffa9e04080, proto=0x0, clasp=0xffffb5c39b28 <js_FunctionClass>, cx=0xffff8c018240)
    at jsobjinlines.h:1070
    obj = 0xffffb6a11150
    #7 js::NewFunction (parent=0xffffa9e04080, cx=0xffff8c018240) at jsobjinlines.h:1114
    No locals.
    #8 js_NewFunction (cx=0xffff8c018240, funobj=0x0, native=0xffffb5825954 <fun_toSource(JSContext*, uintN, js::Value*)>, nargs=0, flags=0, parent=0xffffa9e04080, atom=0xffffa9e01640)
    at jsfun.cpp:2729
    fun = 0xffffa9e04080
    #9 0x0000ffffb5828630 in js_DefineFunction (cx=0xffff8c018240, obj=0xffffa9e04080, id=281473531778624, native=0xffffb5825954 <fun_toSource(JSContext*, uintN, js::Value*)>, nargs=0,
    attrs=0) at jsfun.cpp:2960
    gop = 0xffffb57b05e8 <JS_PropertyStub(JSContext*, JSObject*, jsid, jsval*)>
    sop = 0xffffb57b0608 <JS_StrictPropertyStub(JSContext*, JSObject*, jsid, JSBool, jsval*)>
    fun = 0x8
    wasDelegate = true

    My build command was:
    make -f install-sbbs.mk DEBUG=1 SBBSDIR=/opt/sbbs


    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Tue Jan 21 11:58:21 2025
    Re: aarch64 build
    By: deon to Digital Man on Tue Jan 21 2025 10:00 pm

    Is it too early for a Pi version?

    No, there's a lot of sysop running on rPis.

    On aarch64 with a 64bit build? Running 32bit SBBS on aarch64 worked for me before, but not 64 bit.

    I *thought* so at least. Are you using the libmozjs from the sbbs git repo or a package for your platform/OS?

    Anyway, I recompiled and confirmed I'm running master/d84a380bf, but the same segfault.

    Okay, I guess it's a different issue. Filing an issue at gitlab.synchro.net or discussing in #synchronet at irc.synchro.net will get a solution quicker if you're interest.
    --
    digital man (rob)

    Sling Blade quote #5:
    Karl Childers (to father): You ought not killed my little brother...
    Norco, CA WX: 68.9°F, 7.0% humidity, 1 mph E wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Tue Jan 21 12:02:01 2025
    Re: aarch64 build
    By: deon to Digital Man on Tue Jan 21 2025 11:23 pm

    Re: aarch64 build
    By: deon to Digital Man on Tue Jan 21 2025 10:00 pm

    Howdy,

    I'll recompile a DEBUG build for a proper backtrace...

    Here is a backtrace

    Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1". [7/4929]
    Core was generated by `sbbs'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0 0x0000ffffb57ba258 in JSObject::getClass (this=0x7fffa9e04100) at jsobj.h:427
    427 jsobj.h: No such file or directory.
    [Current thread is 1 (Thread 0xffffaaffd1c0 (LWP 541))]
    (gdb) bt full
    #0 0x0000ffffb57ba258 in JSObject::getClass (this=0x7fffa9e04100) at jsobj.h:427
    No locals.
    #1 0x0000ffffb57baed0 in JSObject::isFunction (this=0x7fffa9e04100) at jsfun.h:312
    No locals.
    #2 0x0000ffffb588c67c in js::IsFunctionObject (v=...) at jsfun.h:342
    No locals.
    #3 js::FindClassPrototype (cx=0xffff8c018240, scopeobj=0xffffa9e03048, protoKey=JSProto_Function, protop=0xffffaaff9c80, clasp=0xffffb5c39b28 <js_FunctionClass>) at jsobj.cpp:6168
    v = {data = {asBits = 18445618172357787904, debugView = {payload47 = 140736043434240, tag = JSVAL_TAG_OBJECT}, s = {payload = {i32 = -1444921088, u32 = 2850046208,
    why = 2850046208, word = 18445618172357787904}}, asDouble = -nan(0xbffffa9e04100), asPtr = 0xfffbffffa9e04100}}
    #4 0x0000ffffb588c8e0 in js_GetClassPrototype (cx=0xffff8c018240, scopeobj=0xffffa9e03048, protoKey=JSProto_Function, protop=0xffffaaff9c80, clasp=0xffffb5c39b28 <js_FunctionClass>)
    at jsobj.cpp:6212
    No locals.
    #5 0x0000ffffb5827d78 in js::FindProto (proto=0xffffaaff9c80, parent=0xffffa9e04080, clasp=0xffffb5c39b28 <js_FunctionClass>, cx=0xffff8c018240) at jsobjinlines.h:1053
    protoKey = JSProto_Function
    #6 js::detail::NewObject<false, true> (kind=js::gc::FINALIZE_OBJECT2, parent=0xffffa9e04080, proto=0x0, clasp=0xffffb5c39b28 <js_FunctionClass>, cx=0xffff8c018240)
    at jsobjinlines.h:1070
    obj = 0xffffb6a11150
    #7 js::NewFunction (parent=0xffffa9e04080, cx=0xffff8c018240) at jsobjinlines.h:1114
    No locals.
    #8 js_NewFunction (cx=0xffff8c018240, funobj=0x0, native=0xffffb5825954 <fun_toSource(JSContext*, uintN, js::Value*)>, nargs=0, flags=0, parent=0xffffa9e04080, atom=0xffffa9e01640)
    at jsfun.cpp:2729
    fun = 0xffffa9e04080
    #9 0x0000ffffb5828630 in js_DefineFunction (cx=0xffff8c018240, obj=0xffffa9e04080, id=281473531778624, native=0xffffb5825954 <fun_toSource(JSContext*, uintN, js::Value*)>, nargs=0,
    attrs=0) at jsfun.cpp:2960
    gop = 0xffffb57b05e8 <JS_PropertyStub(JSContext*, JSObject*, jsid, jsval*)>
    sop = 0xffffb57b0608 <JS_StrictPropertyStub(JSContext*, JSObject*, jsid, JSBool, jsval*)>
    fun = 0x8
    wasDelegate = true

    My build command was:
    make -f install-sbbs.mk DEBUG=1 SBBSDIR=/opt/sbbs

    So that would build/use the libmozjs from the sbbs repo. One thing to try would be to install/use the libmozjs package for your OS/platform (or similar), instead:
    https://wiki.synchro.net/howto:raspbian_install

    Those instructions previously included teh JSINCLUDE and JSLIB options to point to the installed/system libs and header files for libmozjs.
    --
    digital man (rob)

    Sling Blade quote #25:
    Karl: they seen fit to put me in here and here I've been a great long while. Norco, CA WX: 68.9°F, 7.0% humidity, 1 mph E wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Wed Jan 22 07:42:37 2025
    Re: aarch64 build
    By: Digital Man to deon on Tue Jan 21 2025 12:02 pm

    Howdy,

    So that would build/use the libmozjs from the sbbs repo. One thing to try would be to install/use the libmozjs package for your OS/platform (or similar), instead:
    https://wiki.synchro.net/howto:raspbian_install

    Those instructions previously included teh JSINCLUDE and JSLIB options to point to the installed/system libs and header files for libmozjs.

    Been here (many) times before.

    That just ultimately fails (libffi if I recall) not knowing what to do on aarch64...


    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)