Varnish segfault because of

Varnish can fail not only because of misconfigured transient cache. It can fail because of bugs, for example in using libexecinfo. Sometimes you can see that Varnish’s child process fails and you lose all the cache due to it.

In that case, you’ll see such errors in your system log:

kernel: varnishd[20091]: segfault at 4a82dd8a ip 00007f1c58ed277d sp 00007f1c52293458 error 4 in[7f1c58ec6000+d000]

This is because Varnish does not work well with the libexecinfo library. The developers are aware of this and at some point they decided to drop libexecinfo and start using libunwind.

If you are using Varnish 4.1.11 then you have 2 options to get rid of the error:

  1. Upgrade Varnish to version 6.5, in which case you will have to rewrite the VCL and check the compatibility of previously used modules;
  2. Patch Varnish 4.1.11 yourself, because the developers did not provide this fix for older versions.

I have prepared a patch for Varnish 4.1.11 to enable –with-unwind configure switch. You can download and apply it on the Varnish source code, then just rebuild and use it.

Leave a Reply

Your email address will not be published. Required fields are marked *