Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 2015 15:24:33 +0100
From:      Marko =?UTF-8?B?Q3VwYcSH?= <marko.cupac@mimar.rs>
To:        freebsd-ports@freebsd.org
Subject:   www/squid does not shutdown via rc
Message-ID:  <20150126152433.52f07277f377f9396b65c9a8@mimar.rs>

next in thread | raw e-mail | index | archive | help
Hi,

I am building new proxy server based on FreeBSD 10.1-RELEASE and latest
squid from ports (squid-3.4.11).

Squid starts and works ok when testing from single client, but it does
not shutdown correctly through rc script.

Starting situation: squid is not started, no pid dir and file in /var/run=
,
ps ax shows nothing related to squid.

Next: squid is started with 'service squid start', pid dir and file are
created in /var/run, 'service squid status' shows the same value as
pidfile:

% sudo service squid status
squid is running as pid 770.

% sudo cat /var/run/squid/squid.pid=20
770

% ps waux | grep squid
squid  768   0.0  1.0 62096 10488  -  Is    3:14PM  0:00.00 /usr/local/sb=
in/squid -f /usr/local/etc/squid/squid.conf
squid  770   0.0  1.8 82948 18764  -  S     3:14PM  0:00.36 (squid-1) -f =
/usr/local/etc/squid/squid.conf (squid)
squid  772   0.0  0.3 23876  3012  -  I     3:14PM  0:00.01 (logfile-daem=
on) /squid/logs/access.log (log_file_daemon)
squid  773   0.0  0.3 23872  3000  -  I     3:14PM  0:00.01 (unlinkd) (un=
linkd)
squid  774   0.0  0.3 24256  3024  -  S     3:14PM  0:00.01 diskd 788484 =
788485 788486

The problem arises when trying to stop squid:

% sudo service squid stop
Stopping squid.
Waiting for PIDS: 770.

Let's see if rc script finds it running:
% sudo service squid status
squid is not running.

There is no pid dir and file in /var/run/

However, ps shows running proceses:
squid  768   0.0  1.0 62096 10488  -  Is    3:14PM  0:00.00 /usr/local/sb=
in/squid -f /usr/local/etc/squid/squid.conf
squid  806   0.0  1.8 82948 18764  -  S     3:18PM  0:00.21 (squid-1) -f =
/usr/local/etc/squid/squid.conf (squid)
squid  807   0.0  0.3 23876  3012  -  I     3:18PM  0:00.01 (logfile-daem=
on) /squid/logs/access.log (log_file_daemon)
squid  808   0.0  0.3 23872  3000  -  I     3:18PM  0:00.01 (unlinkd) (un=
linkd)
squid  809   0.0  0.3 24256  3024  -  S     3:18PM  0:00.01 diskd 825348 =
825349 825350

Those are probably relevant:

from messages:
Jan 26 15:10:09 rsbgyucnix02 squid[558]: Squid Parent: (squid-1) process =
560 exited due to signal 6 with status 0
Jan 26 15:10:09 rsbgyucnix02 kernel: pid 560 (squid), uid 100: exited on =
signal 6 (core dumped)
Jan 26 15:10:12 rsbgyucnix02 squid[558]: Squid Parent: (squid-1) process =
733 started
Jan 26 15:12:44 rsbgyucnix02 kernel: pid 733 (squid), uid 100: exited on =
signal 6 (core dumped)
Jan 26 15:14:41 rsbgyucnix02 squid[768]: Squid Parent: will start 1 kids
Jan 26 15:14:41 rsbgyucnix02 squid[768]: Squid Parent: (squid-1) process =
770 started
Jan 26 15:18:18 rsbgyucnix02 squid[768]: Squid Parent: (squid-1) process =
770 exited due to signal 6 with status 0
Jan 26 15:18:18 rsbgyucnix02 kernel: pid 770 (squid), uid 100: exited on =
signal 6 (core dumped)
Jan 26 15:18:22 rsbgyucnix02 squid[768]: Squid Parent: (squid-1) process =
806 started

from cache.log:
2015/01/26 15:14:43 kid1| storeLateRelease: released 0 objects
2015/01/26 15:18:18| Set Current Directory to /squid/cache
FATAL: Received Segment Violation...dying.
2015/01/26 15:18:18 kid1| Closing HTTP port 127.0.0.1:3128
2015/01/26 15:18:18 kid1| Closing HTTP port 10.20.0.12:8080
2015/01/26 15:18:18 kid1| storeDirWriteCleanLogs: Starting...

Could it be that I am doing something wrong or is this a bug?
--=20
Marko Cupa=C4=87
https://www.mimar.rs



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150126152433.52f07277f377f9396b65c9a8>