Hey Laurent,

I have been using s6 for some time now to bring up and monitor services in a custom embedded system. The system is built using buildroot and (due to customer requirements) built with glibc 2.26.


When using buildroot 2017.08 (containing s6-rc 0.2.0.1, skalibs 2.5.1.1 and s6 2.6.0.0), I ran into the problem that one of my one-shot services was _occasionally_ not successfully started. The "up" script looked like this:

/bin/sh -c "
ko=/lib/modules/$(uname -r)/extra/co80.ko
echo insmod $ko
insmod $ko
echo Done!
"

I noticed in the kernel log that the module was in fact correctly loaded, but s6 was stuck waiting for something (I noticed this process when doing a "ps"):

1213 root s6-ipcserverd -1 -- s6-ipcserver-access -v0 -E -l0 -i data/rules -- s6-sudod -t 2000 -- /usr/libexec/s6-rc-oneshot-run -l ../.. --

Around 1/10 boots, it got stuck here, the rest of them booted up just fine.


When buildroot 2017.11 was released, I was thrilled to see new versions of s6 in it (s6-rc 0.3.0.0, skalibs 2.6.0.1 and s6 2.6.1.1), but when booting up I immediately got a SIGFPE in s6-rc-init,... I ran it through strace and the result can be seen here: http://steffe.net/s6-sigfpe.txt

It crashes at the exact same place if I re-run it, and it crashes every time.


So what to do,... I found:
https://skarnet.org/cgi-bin/archive.cgi?1:mss:1099:201711
and decided to update to this version in my buildroot system instead, but then I got a build error:

make[1]: Entering directory '/home/stefan/buildroot/output/build/s6-2.6.2.0'
exec /home/stefan/buildroot/output/host/bin/i586-buildroot-linux-gnu-gcc -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -iquote src/include-local -Isrc/include -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -I/home/stefan/buildroot/output/host/i586-buildroot-linux-gnu/sysroot/usr/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Wall -std=c99 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -ffunction-sections -fdata-sections -O2 -fomit-frame-pointer -fno-stack-protector -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O1 -c -o src/daemontools-extras/s6-applyuidgid.o src/daemontools-extras/s6-applyuidgid.c
src/daemontools-extras/s6-applyuidgid.c: In function 'main':
src/daemontools-extras/s6-applyuidgid.c:57:29: error: implicit declaration of function 'setgroups_and_gid' [-Werror=implicit-function-declaration] if (gidn != (size_t)-1 && setgroups_and_gid(gid ? gid : getegid(), gidn, gids) < 0)
                             ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors


Oh happy days,... Any suggestions on any of the three different issues and how to overcome? :o)

Best Regards
Stefan Nilsson

Reply via email to