On 7 April 2016 at 19:35, Alex Rousskov <rousskov@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
On 04/07/2016 08:21 AM, Odhiambo Washington wrote:
> On 7 April 2016 at 17:16, Amos Jeffries wrote:
>
> On 7/04/2016 3:16 a.m., Odhiambo Washington wrote:
> > I am getting the following error in cache.log:
> >
> > Squid Cache (Version 3.5.16): Terminated abnormally.
> > FATAL: Ipc::Mem::Segment::create failed to
> > shm_open(/opt/squid-3.5/var/run/squid/cf__metadata.shm): (17) File exists
> >
> > However, that file doesn't exist.
> This can happen if you have a startup script the runs 'squid -z' or
> similar just prior to starting the main proxy, and not waiting
> sufficiently long for the -z run to finish.
> I am gonna check this out again tonight although I doubt if that is the
> cause.
>
> I run squid using daemontools, invoked as:
>
> exec setuidgid root /opt/squid-3.5/sbin/squid -f
> /opt/squid-3.5/etc/squid.conf -N
>
> /opt/squid-3.5/var/run/squid/ is actually empty when I get this error.
I see two possibilities:
1. The file was there at the time the error was triggered but was not
there at the time you checked the directory. This would mean that
something is starting a second Squid while the first Squid has not
removed the shared memory segment file (yet). Amos mentioned one such
common scenario (not waiting for background squid-z) but there are
others, possibly including handling of Squid crashes. Do you see any
other errors, assertions, or FATAL messages in your cache.log?
2. Squid code that is trying to open the shared segment is broken or,
more likely, not compatible with your FreeBSD environment. For example,
it tries to exclusively create a shared segment using the wrong name.
If you can reproduce this, I recommend starting Squid via strace (or
equivalent) to see the system calls that Squid is making when calling
shm_open() and the exact call parameters. This can confirm or eliminate
#2 as the suspect.
HTH,
Alex.
All I get from running strace -ff -vvv -o /tmp/squid-strace.txt /opt/squid-3.5/sbin/squid -f /opt/squid-3.5/etc/squid.conf:
..
pread: Device busy
pread: Device busy
pread: Device busy
pread: Device busy
pread: Device busy
pread: Device busy
pread: Device busy
pread: Device busy
pread: Device busy
pread: Device busy
pread: Device busy
pread: Device busy
PIOCRUN: Input/output error
trouble opening proc file
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft."
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft."
_______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users