"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Timo Myyrä <timo.myyra@bittivirhe.fi>
Subject:
Re: Unable to run gotwebd with CF malloc flags
To:
"Omar Polo" <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 20 Oct 2024 19:13:06 +0300

Download raw body.

Thread
On Sun, Oct 20, 2024, at 11:53, Omar Polo wrote:
> Hello,
>
> On 2024/10/19 09:07:44 +0300, Timo Myyrä <timo.myyra@bittivirhe.fi> wrote:
>> Hi,
>> 
>> I'm trying to setup gotwebd hosting on 7.6 release.
>> The gotwebd crashes on startup when I have the malloc options 'CF'
>> enabled.
>> 
>> mars# sysctl vm.malloc_conf=CF
>> vm.malloc_conf:  -> CF
>> mars# gotwebd -d -vvv          
>> gotwebd: gotwebd startup
>> gotwebd: sockets_privinit: initializing unix socket /var/www/run/gotweb.sock
>> gotwebd: config_setfd: Allocating 77 file descriptors
>> sockets: sockets_rlimit: max open files 1024
>> sockets: sockets_rlimit: max open files 1024
>> sockets: config_getserver: server=Gotweb
>> sockets: config_getsock: id=1 af_type=unix socket_path=/var/www/run/gotweb.sock
>> sockets: config_getfd: assigning priv_fd 7
>> sockets: config_getfd: assigning priv_fd 8
>> sockets: config_getserver: server=Gotweb
>> sockets: config_getsock: id=1 af_type=unix socket_path=/var/www/run/gotweb.sock
>> sockets: config_getfd: assigning priv_fd 8
>> sockets: config_getfd: assigning priv_fd 9
>> sockets: config_getfd: assigning priv_fd 10
>> sockets: config_getfd: assigning priv_fd 11
>> sockets: config_getfd: assigning priv_fd 12
>> sockets: sockets_rlimit: max open files 1024
>> sockets: config_getserver: server=Gotweb
>> sockets: config_getsock: id=1 af_type=unix socket_path=/var/www/run/gotweb.sock
>> sockets: config_getfd: assigning priv_fd 9
>> sockets: config_getfd: assigning priv_fd 10
>> sockets: config_getfd: assigning priv_fd 11
>> sockets: config_getfd: assigning priv_fd 12
>> sockets: config_getfd: assigning priv_fd 13
>> gotwebd: imsg_flush: Broken pipe
>> mars#
>> 
>> If I remove the malloc flags gotwebd starts as expected.
>
> Can you please tell us more about your installation?  I tried to
> replicate here but it still seems to work for me.  What version are you
> using?
>
> Also, if you run
>
> 	# mkdir -m 700 /var/crash/gotwebd
> 	# sysctl kern.nosuidcoredump=3
>
> (or just kern.nosuidcoredump=2), can you get a backtrace out of it?
>
>
> Thanks,
> Omar Polo

Seems it occasionally starts ok, I started and stopped the gotwebd for a while and about 3 out of 20 start ups it works and fails for others. This is from recently upgraded 7.6-release on amd64.

Here's the backtrace:

mars# gdb gotwebd /var/crash/gotwebd/24109.core                                                                                                                                                                                                               
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd7.6"...(no debugging symbols found)

Core was generated by `gotwebd'.
Program terminated with signal 11, Segmentation fault.
(no debugging symbols found)
Loaded symbols for /usr/local/sbin/gotwebd
Reading symbols from /usr/lib/libz.so.7.1...done.
Loaded symbols for /usr/lib/libz.so.7.1
Reading symbols from /usr/lib/libutil.so.18.0...done.
Loaded symbols for /usr/lib/libutil.so.18.0
Reading symbols from /usr/lib/libevent.so.4.1...done.
Loaded symbols for /usr/lib/libevent.so.4.1
Reading symbols from /usr/lib/libm.so.10.1...done.
Loaded symbols for /usr/lib/libm.so.10.1
Reading symbols from /usr/lib/libc.so.100.3...done.
Loaded symbols for /usr/lib/libc.so.100.3
Reading symbols from /usr/libexec/ld.so...Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
#0  0x00000a81aaf339fb in config_getfd () from /usr/local/sbin/gotwebd
(gdb) bt
#0  0x00000a81aaf339fb in config_getfd () from /usr/local/sbin/gotwebd
#1  0x00000a81aaf33f7c in sockets_dispatch_main () from /usr/local/sbin/gotwebd
#2  0x00000a83e5586688 in event_base_loop (base=0xa841ac32c00, flags=0) at /usr/src/lib/libevent/event.c:333
#3  0x00000a81aaf33d18 in sockets () from /usr/local/sbin/gotwebd
#4  0x00000a81aaf3567c in main () from /usr/local/sbin/gotwebd
(gdb) 

timo