syncterm: Crash on OpenBSD
Syncterm seems to crash in ssh_input_thread
when running under OpenBSD 7.4 x86_64. I get the following when connecting to e.g. Agency BBS:
Program received signal SIGABRT, Aborted.
[Switching to thread 276170]
thrkill () at /tmp/-:3
3 /tmp/-: No such file or directory.
in /tmp/-
Current language: auto; currently asm
(gdb) where
#0 thrkill () at /tmp/-:3
#1 0x18ff757db4dc9362 in ?? ()
#2 0x00000bf6b4546992 in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51
#3 0x00000bf6b455230f in _rthread_mutex_timedlock (mutexp=Variable "mutexp" is not available.
) at /usr/src/lib/libc/thread/rthread_mutex.c:117
#4 0x00000bf49aa43b1d in ssh_input_thread (args=0x0) at ssh.c:131
#5 0x00000bf6f482bcd5 in _rthread_start (v=Unhandled dwarf expression opcode 0xa3
) at /usr/src/lib/librthread/rthread.c:96
#6 0x00000bf6b4531f0a in __tfork_thread () at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:86
#7 0x00000bf6b4531f0a in __tfork_thread () at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:86
Previous frame identical to this frame (corrupt stack?)
Curiously, lldb
gives a different stack trace (GDB seems confused):
: experimental; lldb ./clang.openbsd.amd64.exe.debug/syncterm
(lldb) target create "./clang.openbsd.amd64.exe.debug/syncterm"
Current executable set to '/home/cross/unix/ports/sbbs/src/syncterm/clang.openbsd.amd64.exe.debug/syncterm' (x86_64).
(lldb) run
Process 74034 launched: '/home/cross/unix/ports/sbbs/src/syncterm/clang.openbsd.amd64.exe.debug/syncterm' (x86_64)
This version of LLDB has no plugin for the language "assembler". Inspection of frame variables will be limited.
Process 74034 stopped
* thread #1, stop reason = signal SIGABRT
frame #0: 0x00000eb8882cbd7b libc.so.97.1`_thread_sys_nanosleep at -:3(lldb) bt all
* thread #1, stop reason = signal SIGABRT
* frame #0: 0x00000eb8882cbd7b libc.so.97.1`_thread_sys_nanosleep at -:3
frame #1: 0x00000eb8883210d2 libc.so.97.1`_libc_nanosleep_cancel(timeout=<unavailable>, remainder=<unavailable>) at w_nanosleep.c:27:8
frame #2: 0x00000eb6863c989c syncterm`doterm(bbs=0x00000eb68671a930) at term.c:4597:4
frame #3: 0x00000eb6863d9ec7 syncterm`main(argc=1, argv=0x000076d9eb78f128) at syncterm.c:1924:8
frame #4: 0x00000eb6863954d2 syncterm`__start + 338
(lldb)
Telnet seems unaffected; the crash seems localized to using ssh.