GSAD service not starting - SIGSEGV - 22.4.3

Hi folks, followed the guide https://greenbone.github.io/docs/latest/22.4/source-build/index.html on how to build it from source on Debian.
Apart of some minor troubles coming (package conflict yarn vs yarnpkg etc…) I’ve encountered troubled starting gsad service:
pid file was not created, folder /run/gsad not present.
Found the location using strace. Tried to fix that using (maybe not the best approach):
$ sudo mkdir /run/gsad
$ sudo touch /run/gsad/gsad.pid
$ sudo chmod 666 /run/gsad/gsad.pid

I was able to run the service command with success as a test, but not as a service:
$ /usr/local/sbin/gsad --foreground --listen=127.0.0.1 --port=9392 --http-only

When running
$ systemctl start gsad
$ systemctl status gsad

it results in

$ sudo systemctl status gsad
● gsad.service - Greenbone Security Assistant daemon (gsad)
Loaded: loaded (/etc/systemd/system/gsad.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Fri 2023-02-10 11:33:18 CET; 4s ago
Docs: man:gsad(8)
https://www.greenbone.net
Process: 6840 ExecStart=/usr/local/sbin/gsad --foreground --listen=127.0.0.1 --port=9392 --http-only (code=killed, signal=SEGV)
Main PID: 6840 (code=killed, signal=SEGV)
CPU: 29ms

Feb 10 11:33:18 ap1.localdomain systemd[1]: gsad.service: Scheduled restart job, restart counter is at 5.
Feb 10 11:33:18 ap1.localdomain systemd[1]: Stopped Greenbone Security Assistant daemon (gsad).
Feb 10 11:33:18 ap1.localdomain systemd[1]: gsad.service: Start request repeated too quickly.
Feb 10 11:33:18 ap1.localdomain systemd[1]: gsad.service: Failed with result ‘signal’.
Feb 10 11:33:18 ap1.localdomain systemd[1]: Failed to start Greenbone Security Assistant daemon (gsad).

also, found this, from previous start attempt:

[Fri Feb 10 11:33:16 2023] traps: gsad[6835] general protection fault ip:7f808f62bd76 sp:7ffdc5f22758 error:0 in libc-2.31.so[7f808f5b3000+15a000]
[Fri Feb 10 11:33:17 2023] traps: gsad[6836] general protection fault ip:7fb8d7623d76 sp:7ffda4f02de8 error:0 in libc-2.31.so[7fb8d75ab000+15a000]
[Fri Feb 10 11:33:17 2023] traps: gsad[6837] general protection fault ip:7fd3ef92bd76 sp:7ffe6e8c9f18 error:0 in libc-2.31.so[7fd3ef8b3000+15a000]
[Fri Feb 10 11:33:17 2023] traps: gsad[6839] general protection fault ip:7f56edc1bd76 sp:7ffcafcee968 error:0 in libc-2.31.so[7f56edba3000+15a000]
[Fri Feb 10 11:33:17 2023] traps: gsad[6840] general protection fault ip:7f193c733d76 sp:7ffe09ef6358 error:0 in libc-2.31.so[7f193c6bb000+15a000]

strace
openat(AT_FDCWD, “/usr/share/zoneinfo/utc 0”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access(“/etc/gvm/gsad_log.conf”, F_OK) = 0
openat(AT_FDCWD, “/usr/share/locale/locale.alias”, O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2996, …}) = 0
read(3, “# Locale name alias data base.\n#”…, 4096) = 2996
read(3, “”, 4096) = 0
close(3) = 0
futex(0x7f3935a4ef38, FUTEX_WAKE_PRIVATE, 2147483647) = 0
openat(AT_FDCWD, “/etc/gvm/gsad_log.conf”, O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=757, …}) = 0
read(3, "# GSA logging configuration\n#\n# "…, 4096) = 757
read(3, “”, 4096) = 0
futex(0x7f3935a4ef38, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f3935a4ef38, FUTEX_WAKE_PRIVATE, 2147483647) = 0
close(3) = 0
openat(AT_FDCWD, “/var/log/gvm/gsad.log”, O_WRONLY|O_CREAT|O_APPEND, 0666) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=0, …}) = 0
openat(AT_FDCWD, “/var/log/gvm/gsad.log”, O_WRONLY|O_CREAT|O_APPEND, 0666) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=0, …}) = 0
openat(AT_FDCWD, “/var/log/gvm/gsad.log”, O_WRONLY|O_CREAT|O_APPEND, 0666) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=0, …}) = 0
openat(AT_FDCWD, “/var/log/gvm/gsad.log”, O_WRONLY|O_CREAT|O_APPEND, 0666) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=0, …}) = 0
openat(AT_FDCWD, “/var/log/gvm/gsad.log”, O_WRONLY|O_CREAT|O_APPEND, 0666) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=0, …}) = 0
getpid() = 7307
— SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=NULL} —
+++ killed by SIGSEGV +++
Segmentation fault

important edit
the log file /var/log/gvm/gsad.log is present but empty.

This was fixed in the last gvm-libs version 22.4.4.

3 Likes

confirming the fix. many thanks.


just why i was so dumb and installed 22.4.3 :frowning:

Because we just released the new version with the fix yesterday

2 Likes