On Thu, 12 Apr 2007, Alex Rousskov wrote:
rousskov 2007/04/12 08:51:10 MDT Modified files: src main.cc Log: This change should fix bug #1837: Segfault on configuration error When quitting on a fatal error, such as a configuration error, Squid may need to write clean state/log files. Squid uses comm_ routines to do so. Thus, we must initialize comm_ before such fatal errors are discovered. Perhaps a better fix would be to avoid writing clean state/log files until the old ones become dirty?
The last comment is correct. Squid should not write clean state files until existing state files have been entirely read. I fixed this bug a couple of days ago in the following revisions: 1.88 +2 -2 squid3/src/store_rebuild.cc 1.157 +9 -2 squid3/src/store_dir.cc store_dirs_rebuilding should be initialized to 1 store_dirs_rebuilding is initialized to _1_ as a hack so that storeDirWriteCleanLogs() doesn't try to do anything unless _all_ cache_dirs have been read. For example, without this hack, Squid will try to write clean log files if -kparse fails (becasue it calls fatal()). Sorry I did not realize there was a bugzilla entry for it. I'd suggest backing out your patch. DW