#47880: squid 3.5.4 and squid 3.5.5 run fails with syslog err "failed to ftruncate" ----------------------+------------------- Reporter: ni-27@… | Owner: jmr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: squid3 | ----------------------+------------------- Comment (by ni-27@…): Replying to [comment:2 jmr@…]:
The ftruncate failure happens when squid is starting up again ''after'' it has exited abnormally (and thus not unlinked its shared memory segments before exiting). So the actual problem is whatever is causing the abnormal termination before squid restarts and prints that message.
Thanks. However, this issue comes around both on different machines with prior squid3 3.4.11 directories and with total fresh installation of MacPorts 2.3.3 with squid3 3.5.5 variant. Please find the first two startup logs from system.log after a fresh install below: ---- - squid[18516]: Squid Parent: will start 1 kids - squid[18516]: Squid Parent: (squid-1) process 18518 started - squid[18519]: storeDirWriteCleanLogs: Starting... - squid[18518]: cannot change current directory to /opt/local/var/squid/cache/squid: (2) No such file or directory - squid[18519]: Finished. Wrote 0 entries. - squid[18518]: Current Directory is /opt/local/var/squid - squid[18519]: Took 0.00 seconds ( 0.00 entries/sec). - squid[18519]: Ipc::Mem::Segment::create failed to ftruncate(/squid- cf__metadata.shm): (22) Invalid argument - squid[18518]: Creating missing swap directories - squid[18518]: No cache_dir stores are configured. - squid[18516]: Squid Parent: (squid-1) process 18518 exited with status 0 - com.apple.launchd[1] (org.macports.Squid[18513]): Exited with code: 2 - squid[18526]: Squid Parent: will start 1 kids - squid[18526]: Squid Parent: (squid-1) process 18528 started - squid[18528]: cannot change current directory to /opt/local/var/squid/cache/squid: (2) No such file or directory - squid[18529]: storeDirWriteCleanLogs: Starting... - squid[18529]: Finished. Wrote 0 entries. - squid[18528]: Current Directory is /opt/local/var/squid - squid[18529]: Took 0.00 seconds ( 0.00 entries/sec). - squid[18529]: Ipc::Mem::Segment::create failed to ftruncate(/squid- cf__metadata.shm): (22) Invalid argument - squid[18528]: Creating missing swap directories - squid[18528]: No cache_dir stores are configured. - squid[18526]: Squid Parent: (squid-1) process 18528 exited with status 0 - com.apple.launchd[1] (org.macports.Squid[18523]): Exited with code: 2 ---- This chain of failed runs will continue both on fresh and on pre-used machines similarly or even after successful directory builds until a "port unload squid3" is given. How to continue on this issue? Which data do you need for further investigation? -- Ticket URL: <https://trac.macports.org/ticket/47880#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X