https://gitlab.synchro.net/main/sbbs/-/issues/685#note_8158
@Deuce I'm having a problem with aarch64 which DM thought might be related to this thread.
I'm currently running SBBS in Proxmox on a CM5 in an LXC container running docker. (I've always run SBBS in docker, built using `bullseye-slim` as a base.)
Since docker under LXC is problematic, I thought I'd shift it to a Proxmox VM/QEMU (on the same CM5). I built a VM host running alpine.
The same container image (built a couple of months ago) that I was running in LXC, I used on the QEMU/VM segfaults upon startup.
I built a new debug image (as of git yesterday f28ef09d0) to get a backtrace - and started it, using default data (not my data, all initial defaults - thus a "new" SBBS BBS) and this is the backtrace:
```
[Current thread is 1 (Thread 0xfff32bfff1c0 (LWP 431))]
(gdb) bt
#0 0x0000fff34fbe1670 in JSObject::getClass (this=0x7ff32a804100) at jsobj.h:427
#1 0x0000fff34fbe22e8 in JSObject::isFunction (this=0x7ff32a804100) at jsfun.h:312
#2 0x0000fff34fcb3a94 in js::IsFunctionObject (v=...) at jsfun.h:342
#3 js::FindClassPrototype (cx=0xfff3240193e0, scopeobj=0xfff32a803048, protoKey=JSProto_Function, protop=0xfff32bff9e70, clasp=0xfff3500681e0 <js_FunctionClass>) at jsobj.cpp:6168
#4 0x0000fff34fcb3cf8 in js_GetClassPrototype (cx=0xfff3240193e0, scopeobj=0xfff32a803048, protoKey=JSProto_Function, protop=0xfff32bff9e70, clasp=0xfff3500681e0 <js_FunctionClass>)
at jsobj.cpp:6212
#5 0x0000fff34fc4f190 in js::FindProto (proto=0xfff32bff9e70, parent=0xfff32a804080, clasp=0xfff3500681e0 <js_FunctionClass>, cx=0xfff3240193e0) at jsobjinlines.h:1053
#6 js::detail::NewObject<false, true> (kind=js::gc::FINALIZE_OBJECT2, parent=0xfff32a804080, proto=0x0, clasp=0xfff3500681e0 <js_FunctionClass>, cx=0xfff3240193e0)
at jsobjinlines.h:1070
#7 js::NewFunction (parent=0xfff32a804080, cx=0xfff3240193e0) at jsobjinlines.h:1114
#8 js_NewFunction (cx=0xfff3240193e0, funobj=0x0, native=0xfff34fc4cd6c <fun_toSource(JSContext*, uintN, js::Value*)>, nargs=0, flags=0, parent=0xfff32a804080, atom=0xfff32a801640)
at jsfun.cpp:2729
#9 0x0000fff34fc4fa48 in js_DefineFunction (cx=0xfff3240193e0, obj=0xfff32a804080, id=281419855173184, native=0xfff34fc4cd6c <fun_toSource(JSContext*, uintN, js::Value*)>, nargs=0,
attrs=0) at jsfun.cpp:2960
#10 0x0000fff34fbdcff8 in JS_DefineFunction (cx=0xfff3240193e0, obj=0xfff32a804080, name=0xfff34ff14038 <js_toSource_str> "toSource",
call=0xfff34fc4cd6c <fun_toSource(JSContext*, uintN, js::Value*)>, nargs=0, attrs=4096) at jsapi.cpp:4477
#11 0x0000fff34fbdcf18 in JS_DefineFunctions (cx=0xfff3240193e0, obj=0xfff32a804080, fs=0xfff350068308 <function_methods>) at jsapi.cpp:4460
#12 0x0000fff34fcab43c in js::DefineConstructorAndPrototype (cx=0xfff3240193e0, obj=0xfff32a803048, key=JSProto_Function, atom=0xfff32a800380, protoProto=0x0,
clasp=0xfff3500681e0 <js_FunctionClass>, constructor=0xfff34fc4e070 <Function(JSContext*, uintN, js::Value*)>, nargs=1, ps=0x0, fs=0xfff350068308 <function_methods>, static_ps=0x0,
static_fs=0x0) at jsobj.cpp:3925
#13 0x0000fff34fcab7d0 in js_InitClass (cx=0xfff3240193e0, obj=0xfff32a803048, protoProto=0x0, clasp=0xfff3500681e0 <js_FunctionClass>,
constructor=0xfff34fc4e070 <Function(JSContext*, uintN, js::Value*)>, nargs=1, ps=0x0, fs=0xfff350068308 <function_methods>, static_ps=0x0, static_fs=0x0) at jsobj.cpp:4009
#14 0x0000fff34fc4ef10 in js_InitFunctionClass (cx=0xfff3240193e0, obj=0xfff32a803048) at jsfun.cpp:2683
#15 0x0000fff34fbd5c24 in js_InitFunctionAndObjectClasses (cx=0xfff3240193e0, obj=0xfff32a803048) at jsapi.cpp:1541
#16 0x0000fff34fbd5ea4 in JS_InitStandardClasses (cx=0xfff3240193e0, obj=0xfff32a803048) at jsapi.cpp:1596
#17 0x0000fff34faaa728 in js_CreateGlobalObject (cx=0xfff3240193e0, cfg=0xfff33c076958, methods=0xfff350064788 <js_global_functions>, startup=0xaaad3b44aba8 <bbs_startup+11800>,
glob=0xfff33c080860) at js_global.cpp:5459
#18 0x0000fff34fb103a0 in js_CreateCommonObjects (js_cx=0xfff3240193e0, cfg=0xfff350071dc8 <scfg>, node_cfg=0xfff33c076958, methods=0xfff350064788 <js_global_functions>,
uptime=1768991628, host_name=0xfff33c077b7f "mybbs.com", socklib_desc=0x0, cb=0xfff33c080880, js_startup=0xaaad3b44aba8 <bbs_startup+11800>, user=0xfff33c0819e8, client=0x0,
client_socket=-1, session=-1, props=0xfff350bb3920 <js_server_props>, glob=0xfff33c080860, mqtt=0xfff35007b810 <mqtt>) at main.cpp:1562
#19 0x0000fff34fb0ff94 in sbbs_t::js_init (this=0xfff33c0764f0, runtime=0xfff33c080850, glob=0xfff33c080860, desc=0xfff34ff030d8 "event") at main.cpp:1445
#20 0x0000fff34fb153a8 in event_thread (arg=0xfff33c0764f0) at main.cpp:2888 #21 0x0000fff34f7ad648 in start_thread (arg=0xfff32bffeac0) at pthread_create.c:477
#22 0x0000fff34f703c9c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
```
I've even tried running the container `privileged` and running sbbs as root to ensure there are no permission issues.
(Oh, if it is relevant, it started successfully using `NO_EVENTS`, and didnt segfault. I also tried the setarch thing but it still segfaulted.)
So there are two key differences here:
* Alpine host kernel (in QEMU/Docker) vs PVE/Debian host kernel (in LXC/Docker) * QEMU vs LXC
Any thoughts on how I can fix this? Happy to try things...
--- SBBSecho 3.35-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)