<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 7 April 2016 at 19:35, Alex Rousskov <span dir="ltr"><<a href="mailto:rousskov@measurement-factory.com" target="_blank">rousskov@measurement-factory.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On 04/07/2016 08:21 AM, Odhiambo Washington wrote:<br>
<span class=""><br>
> On 7 April 2016 at 17:16, Amos Jeffries wrote:<br>
><br>
> On 7/04/2016 3:16 a.m., Odhiambo Washington wrote:<br>
> > I am getting the following error in cache.log:<br>
> ><br>
> > Squid Cache (Version 3.5.16): Terminated abnormally.<br>
</span><span class="">> > FATAL: Ipc::Mem::Segment::create failed to<br>
> > shm_open(/opt/squid-3.5/var/run/squid/cf__metadata.shm): (17) File exists<br>
> ><br>
> > However, that file doesn't exist.<br>
<br>
> This can happen if you have a startup script the runs 'squid -z' or<br>
> similar just prior to starting the main proxy, and not waiting<br>
> sufficiently long for the -z run to finish.<br>
<br>
<br>
</span><span class="">> I am gonna check this out again tonight although I doubt if that is the<br>
> cause.<br>
><br>
> I run squid using daemontools, invoked as:<br>
><br>
> exec setuidgid root /opt/squid-3.5/sbin/squid -f<br>
> /opt/squid-3.5/etc/squid.conf -N<br>
><br>
> /opt/squid-3.5/var/run/squid/ is actually empty when I get this error.<br>
<br>
<br>
</span>I see two possibilities:<br>
<br>
1. The file was there at the time the error was triggered but was not<br>
there at the time you checked the directory. This would mean that<br>
something is starting a second Squid while the first Squid has not<br>
removed the shared memory segment file (yet). Amos mentioned one such<br>
common scenario (not waiting for background squid-z) but there are<br>
others, possibly including handling of Squid crashes. Do you see any<br>
other errors, assertions, or FATAL messages in your cache.log?<br>
<br>
2. Squid code that is trying to open the shared segment is broken or,<br>
more likely, not compatible with your FreeBSD environment. For example,<br>
it tries to exclusively create a shared segment using the wrong name.<br>
<br>
If you can reproduce this, I recommend starting Squid via strace (or<br>
equivalent) to see the system calls that Squid is making when calling<br>
shm_open() and the exact call parameters. This can confirm or eliminate<br>
#2 as the suspect.<br>
<br>
<br>
HTH,<br>
<br>
Alex.<br></blockquote><div><br></div><div>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:</div><div>..</div><div>pread: Device busy</div><div>pread: Device busy</div><div>pread: Device busy</div><div>pread: Device busy</div><div>pread: Device busy</div><div>pread: Device busy</div><div>pread: Device busy</div><div>pread: Device busy</div><div>pread: Device busy</div><div>pread: Device busy</div><div>pread: Device busy</div><div>pread: Device busy</div><div>PIOCRUN: Input/output error</div><div>trouble opening proc file </div></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Best regards,<br>Odhiambo WASHINGTON,<br>Nairobi,KE<br>+254 7 3200 0004/+254 7 2274 3223<br>"<span style="font-size:12.8px">Oh, the cruft.</span><span style="font-size:12.8px">"</span></div></div></div>
</div></div>