Varnish 4.1 segfault
Hi everone,
I’m trying to use Varnish 4.1 with Docker (1.9.1). I’ve built a docker image in Alpine Linux 3.2 with its musl-libc to reduce the image size.
Dockerfile:
FROM alpine:3.2
RUN echo 'http://dl-4.alpinelinux.org/alpine/v3.3/main' >> /etc/apk/repositories && \
apk update && apk upgrade -U -a && \
apk add --update varnish \
&& rm -rf /var/cache/apk/*
When I try to run inside of the container, sometimes I get a segfault, but sometimes I don’t:
# varnishd -F -W epoll -f /etc/varnish/default.vcl
child (4081) Started
Pushing vcls failed:
CLI communication error (hdr)
Stopping Child
Child (4081) died signal=11
Child (4081) Panic message:
Assert error in child_sigsegv_handler(), mgt/mgt_child.c line 297:
Condition(Segmentation fault by instruction at 0x7f8bec8af9e8) not true.
version = varnish-4.1.0 revision 3041728
ident = Linux,3.13.0-66-generic,x86_64,-junix,-smalloc,-smalloc,-hcritbit,epoll
Could not create _.vsm.4071: File exists
Sometimes when I get 2-3 segfaults in a row and 3rd, 4th time it runs successfully.
My environment:
# gcc --version
gcc (Alpine 5.2.0) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.2.3
PRETTY_NAME="Alpine Linux v3.2"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
# ldd --version
musl libc
Version 1.1.12
# docker version
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64
Also, when I run it successfully and try to clear cache (ban), child process exits with a segfault.
Is it caused by musl-libc?
(from redmine: issue id 4938, created on 2015-12-08, closed on 2016-03-18)
- Changesets:
- Revision 58fbf680 by Natanael Copa on 2016-01-08T08:21:15Z:
main/varnish: add -dbg
ref #4938
- Revision 2e4fa203 by Natanael Copa on 2016-03-02T10:22:03Z:
main/varnish: fix stack overflow
ref #4938
- Revision 043207f7 by Natanael Copa on 2016-03-02T10:26:08Z:
main/varnish: fix stack overflow
fixes #4938