segmentation fault in apk.static from Alpine 3.5 blocks build on armhf
This appears to be very similar to
https://bugs.alpinelinux.org/issues/6372 on the surface, although
underlying cause might not be (there’s less output from apk.static
before the segfault here than there is there).
Here’s the script output: (note that apk
referenced here is actually a
copy of apk.static
from the apk-tools-static-2.6.8-r1
package, and
/home/ubuntu/jenkins-slave/workspace/docker-armhf-alpine/apk-tools-v3.5/etc/apk/keys
comes from the alpine-keys-1.3-r0
package)
$ sudo PATH="$PATH" ./mkimage-alpine.bash "${BUILD_OPTIONS[@]}"
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/armhf/APKINDEX.tar.gz
./mkimage-alpine.bash: line 21: 14229 Segmentation fault (core dumped) apk --root "$rootfs" --update-cache --keys-dir /home/ubuntu/jenkins-slave/workspace/docker-armhf-alpine/apk-tools-v3.5/etc/apk/keys add --initdb ${packages[*]//,/ }
A gdb
backtrace was requested in
https://bugs.alpinelinux.org/issues/6372\#note-24, but I can’t seem to
find where the core file was dumped, and running apk
directly via
gdb
is giving me the following:
Reading symbols from /home/ubuntu/jenkins-slave/workspace/docker-armhf-alpine/apk-tools-v3.5/sbin/apk.static...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/ubuntu/jenkins-slave/workspace/docker-armhf-alpine/apk-tools-v3.5/sbin/apk.static --root /var/tmp/alpine-docker-rootfs-9n21sOwkbI --update-cache --keys-dir /home/ubuntu/jenkins-slave/workspace/docker-armhf-alpine/apk-tools-v3.5/etc/apk/keys add --initdb alpine-baselayout alpine-keys apk-tools libc-utils
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/armhf/APKINDEX.tar.gz
Program received signal SIGSEGV, Segmentation fault.
0xaab02e1c in ?? ()
(gdb) bt
#0 0xaab02e1c in ?? ()
#1 0xaab03008 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
I’m happy to do more to help debug further — just need some pointers. :)
It might also be notable that 3.2, 3.3, 3.4, and edge all work fine in the same environment.
(from redmine: issue id 6795, created on 2017-02-01, closed on 2017-05-22)
- Changesets:
- Revision 0eb056df5f4e6fb5af12c3f3f8eef81100066b02 by Natanael Copa on 2017-02-02T06:41:14Z:
main/apk-tools: fix error message short read
also triggers rebuild which might fix apk.static (ref #6795)
(cherry picked from commit 5ef7a332f8186986761c3280b8b2c2bf1c02f230)
- Revision 3a1f5351fc414b87eed5250b25df8e35f3973ddc by Natanael Copa on 2017-05-09T19:39:25Z:
main/apk-tools: fix error message short read
also triggers rebuild which might fix apk.static (ref #6795)
(cherry picked from commit 5ef7a332f8186986761c3280b8b2c2bf1c02f230)