mbrubeck / agate

Very simple server for the Gemini hypertext protocol
Apache License 2.0
579 stars 37 forks source link

core dumps on openbsd when running the binary (built from source) #294

Open HappyGoFishing opened 11 months ago

Johann150 commented 11 months ago

Please be a bit more descriptive. See the contributing guidelines.

What did you do immediately before agate crashes? What command line arguments are you passing? What is the content of your configuration files (if any)?

mgazeel commented 2 weeks ago

I can confirm that this still happens, there is no immediate action before agate crashing it just seems to do it randomly, and the logs do not show anything. (some kind of memory pool exhaustion or allocator issue?)

I am using agate version 3.3.8 The invokation command is: agate --content /usr/gemini/ --addr 0.0.0.0:1965 --lang pl-PL --log-ip --certs [CERT DIR] No configuration files are used.

I've enabled coredump generation the next time it happens I'll look through it and maybe find exactly where it fails.

Repro:

OpenBSD 7.5 on x86:

  1. cargo install agate
  2. cp /home/whatever/.cargo/bin/agate /usr/

Add the following service to /etc/rc.d/agated:

#!/bin/ksh
#

daemon="/usr/agate"
daemon_user="someuser"
daemon_logger="daemon.info"
daemon_flags="--content /whatever/ --addr 0.0.0.0:1965 --lang pl-PL --log-ip --certs /whetever/"

. /etc/rc.d/rc.subr

rc_reload=NO
rc_bg=YES

rc_cmd $1
  1. rcctl start agated