s6: random SIGILLs in Alpine 3.6 (possible compiler issue)
To reproduce:
- Install Alpine 3.6.0 or 3.6.1 on a Virtualbox VM. (sys or data or whatever; any flavour will do. It’s apparently not a grsec issue.)
- apk add s6-rc
- wget https://skarnet.org/tmp/main.tgz && tar zxpvf main.tgz # this tgz is also included in the current bug
- rm -rf compiled && s6-rc-compile compiled main
The last command, s6-rc-compile (dynamically linked binary), can have 3 or 4 different results:
- exit 0 after creating a compiled/ subdirectory with various stuff in it. This is the expected behaviour.
- busyloop until a ^C is sent
- crash with a SIGILL
- some people also reported seeing a crash with a SIGSEGV.
The application code is good: it works when manually built on another system, be it with glibc or musl.
It seems like there’s an unaligned memory access at some point, but Shiz and kaniini can give more details.
(from redmine: issue id 7386, created on 2017-06-05, closed on 2017-07-03)
- Uploads:
- main.tgz the source database to test s6-rc-compile with
- 0001-Use-size_t-buffer-offsets.patch