]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 3574: crashes on reconfigure and startup
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 12 Oct 2015 01:38:02 +0000 (18:38 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 12 Oct 2015 01:38:02 +0000 (18:38 -0700)
commita918ecc603e84cf752177ec3f5dfa83eaa9bf703
treec6f98147ba7019fbac986fbae2c3861a575786bc
parent3736fdd638492b925d601eb0e22a25a7d470f8be
Bug 3574: crashes on reconfigure and startup

When Squid receives a reconfigure signal before its signal handler
has been registered on startup it will crash with unhandled signal
exceptions. This can be triggered on system boot when a resolv.conf
alteration signal wins a race with the daemon service initialization.

 Register the reconfigure signal handler early and ignoring signals
 until initial squid.conf load has completed.

When Squid receives a reconfigure signal while it is already in the
process of reconfiguring, the two async sequences can interfere and
result in confusing fatal error or crashes.
 Only allowing one reconfigure sequence to be initiated at a time.

Also, if shutdown signal has been received while waiting for a
reconfigure to finish, let shutdown take precedence over any pending
reconfigure repeats.

 Based on work by Clint Byrum and D J Gardner, Ubuntu
src/main.cc