community/eg25-manager: Segfault on startup with libgpiod-1.6.4-r2
Package Information
- Package name: eg25-manager
- Package version: 0.4.6-r2
- Alpine version: 3.20.0_alpha20240329
- Alpine architecture: aarch64
Summary
After updating libgpiod to 1.6.4-r2 (part of the big rebuild for Python 3.12 in 71a773b0, no change to APKBUILD except pkgrel
) eg25-manager segfaults during startup, after reading config files. GDB backtrace below. Downgrading libgpiod to 1.6.4-r1 fixes the issue (at least for eg25-manager).
** Message: 12:56:05.136: Opening config file: /usr/share/eg25-manager/pine64,pinephone-1.2.toml
** Message: 12:56:05.147: Opening config file: /etc/eg25-manager/pine64,pinephone-1.2.toml
Program received signal SIGSEGV, Segmentation fault.
0x0000fffff7f9aedc in memchr (src=src@entry=0xfffffffff77eb585, c=c@entry=0,
n=n@entry=2147483647) at src/string/memchr.c:16
warning: 16 src/string/memchr.c: No such file or directory
(gdb) bt
#0 0x0000fffff7f9aedc in memchr (src=src@entry=0xfffffffff77eb585,
c=c@entry=0, n=n@entry=2147483647) at src/string/memchr.c:16
#1 0x0000fffff7f9bde0 in strnlen (
s=s@entry=0xfffffffff77eb585 <error: Cannot access memory at address 0xfffffffff77eb585>, n=n@entry=2147483647) at src/string/strnlen.c:5
#2 0x0000fffff7f968ac in printf_core (f=f@entry=0xfffffffff5f8,
fmt=fmt@entry=0xfffff7d1ca9c "/sys/bus/gpio/devices/%s/dev",
ap=ap@entry=0xfffffffff468, nl_arg=nl_arg@entry=0xfffffffff500,
nl_type=nl_type@entry=0xfffffffff488) at src/stdio/vfprintf.c:600
#3 0x0000fffff7f96c9c in vfprintf (f=f@entry=0xfffffffff5f8,
fmt=0xfffff7d1ca9c "/sys/bus/gpio/devices/%s/dev",
ap=<error reading variable: Cannot access memory at address 0x7fffffff>)
at src/stdio/vfprintf.c:690
#4 0x0000fffff7f997d8 in vsnprintf (s=s@entry=0x0, n=n@entry=0,
fmt=fmt@entry=0xfffff7d1ca9c "/sys/bus/gpio/devices/%s/dev",
ap=<error reading variable: Cannot access memory at address 0xfffffffff77eb585>) at src/stdio/vsnprintf.c:49
#5 0x0000fffff7f94b00 in vasprintf (s=0xfffffffff860,
fmt=0xfffff7d1ca9c "/sys/bus/gpio/devices/%s/dev", ap=...)
at src/stdio/vasprintf.c:10
#6 0x0000fffff7f90aac in asprintf (s=<optimized out>, fmt=<optimized out>)
at src/stdio/asprintf.c:10
#7 0x0000fffff7d19ea4 in gpiod_chip_open () from /usr/lib/libgpiod.so.2
#8 0x0000fffff7d1be7c in gpiod_chip_open_by_name ()
from /usr/lib/libgpiod.so.2
#9 0x0000fffff7d1c7f4 in gpiod_chip_iter_new () from /usr/lib/libgpiod.so.2
#10 0x0000fffff7d1bf68 in gpiod_chip_open_by_label ()
from /usr/lib/libgpiod.so.2
#11 0x0000aaaaaaaa68e4 in ?? ()
#12 0x0000aaaaaaaa52c4 in ?? ()
#13 0x0000fffff7f5d5c4 in libc_start_main_stage2 (main=0xaaaaaaaa5000, argc=1,
argv=0xfffffffffd08) at src/env/__libc_start_main.c:95
#14 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Steps to reproduce
Run /usr/bin/eg25-manager
, or restart the service and see it fail.