[MacPorts] #47880: squid 3.5.4 and squid 3.5.5 run fails with syslog err "failed to ftruncate"
#47880: squid 3.5.4 and squid 3.5.5 run fails with syslog err "failed to ftruncate" --------------------------------+-------------------------------- Reporter: ni-27@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: squid3 squid 3.5.5 | Port: squid3 --------------------------------+-------------------------------- Squid3 compiles but "load squid3" run fails with syslog err "failed to ftruncate" regularily. The child squid is stopped due to the resulting file troubles apparently. This issue seems not be solved by Ticket #47080 Error is active since changing from 3.4.11 to 3.5.x and would be good to have a squid3_3.4.x variant continued, I suppose. - - - # entry for error from system.log: Ipc::Mem::Segment::create failed to ftruncate(/squid-cf__metadata.shm): (22) Invalid argument - - - # squid -v Squid Cache: Version 3.5.5 Service Name: squid configure options: '--prefix=/opt/local' '--mandir=/opt/local/share/man' '--sysconfdir=/opt/local/etc/squid' '--datadir=/opt/local/share/squid' '-- localstatedir=/opt/local/var/squid' '-- libexecdir=/opt/local/libexec/squid' '--with- pidfile=/opt/local/var/run/squid/squid.pid' '--disable-strict-error- checking' '--disable-loadable-modules' '--disable-arch-native' '--without- gnutls' '--without-mit-krb5' '--without-heimdal-krb5' '--without-gnugss' '--enable-delay-pools' '--enable-zph-qos' '--enable-removal-policies' '--enable-storeio=ufs,aufs,diskd,rock' '--enable-disk- io=AIO,Blocking,DiskDaemon,DiskThreads,Mmapped' '--enable-log-daemon- helpers' '--with-default-user=squid' '--enable-auth' '--enable-auth-basic' '--enable-auth-digest' '--enable-auth-negotiate=wrapper' '--enable-auth- ntlm' '--enable-external-acl-helpers=SQL_session eDirectory_userip file_userip time_quota unix_group wbinfo_group' '--with- openssl=/opt/local' 'CC=/usr/bin/clang' 'CFLAGS=-pipe -Os -arch x86_64' 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64' 'CPPFLAGS=-I/opt/local/include' 'CXX=/usr/bin/clang++' 'CXXFLAGS=-pipe -Os -arch x86_64 -stdlib=libc++' - - - # environment: Apple Mac OS X 10.9.5 (13F1077) Apple XCode Version 6.2 (6C131e) macports 2.3.3 squid3 @3.5.5_0+openssl - - - -- Ticket URL: <https://trac.macports.org/ticket/47880> MacPorts <https://www.macports.org/> Ports system for OS X
#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 | ----------------------+------------------- Changes (by ryandesign@…): * cc: jmr@… (removed) * owner: macports-tickets@… => jmr@… * keywords: squid3 squid 3.5.5 => Old description:
Squid3 compiles but "load squid3" run fails with syslog err "failed to ftruncate" regularily. The child squid is stopped due to the resulting file troubles apparently.
This issue seems not be solved by Ticket #47080
Error is active since changing from 3.4.11 to 3.5.x and would be good to have a squid3_3.4.x variant continued, I suppose.
- - -
# entry for error from system.log:
Ipc::Mem::Segment::create failed to ftruncate(/squid-cf__metadata.shm): (22) Invalid argument
- - -
# squid -v
Squid Cache: Version 3.5.5 Service Name: squid configure options: '--prefix=/opt/local' '--mandir=/opt/local/share/man' '--sysconfdir=/opt/local/etc/squid' '--datadir=/opt/local/share/squid' ' --localstatedir=/opt/local/var/squid' '-- libexecdir=/opt/local/libexec/squid' '--with- pidfile=/opt/local/var/run/squid/squid.pid' '--disable-strict-error- checking' '--disable-loadable-modules' '--disable-arch-native' '--without-gnutls' '--without-mit-krb5' '--without-heimdal-krb5' '--without-gnugss' '--enable-delay-pools' '--enable-zph-qos' '--enable- removal-policies' '--enable-storeio=ufs,aufs,diskd,rock' '--enable-disk- io=AIO,Blocking,DiskDaemon,DiskThreads,Mmapped' '--enable-log-daemon- helpers' '--with-default-user=squid' '--enable-auth' '--enable-auth- basic' '--enable-auth-digest' '--enable-auth-negotiate=wrapper' '--enable-auth-ntlm' '--enable-external-acl-helpers=SQL_session eDirectory_userip file_userip time_quota unix_group wbinfo_group' '--with-openssl=/opt/local' 'CC=/usr/bin/clang' 'CFLAGS=-pipe -Os -arch x86_64' 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64' 'CPPFLAGS=-I/opt/local/include' 'CXX=/usr/bin/clang++' 'CXXFLAGS=-pipe -Os -arch x86_64 -stdlib=libc++'
- - -
# environment:
Apple Mac OS X 10.9.5 (13F1077) Apple XCode Version 6.2 (6C131e)
macports 2.3.3 squid3 @3.5.5_0+openssl
- - -
New description: Squid3 compiles but "load squid3" run fails with syslog err "failed to ftruncate" regularily. The child squid is stopped due to the resulting file troubles apparently. This issue seems not be solved by Ticket #47080 Error is active since changing from 3.4.11 to 3.5.x and would be good to have a squid3_3.4.x variant continued, I suppose. ---- == entry for error from system.log: == {{{ Ipc::Mem::Segment::create failed to ftruncate(/squid-cf__metadata.shm): (22) Invalid argument }}} ---- == squid -v == {{{ Squid Cache: Version 3.5.5 Service Name: squid configure options: '--prefix=/opt/local' '--mandir=/opt/local/share/man' '--sysconfdir=/opt/local/etc/squid' '--datadir=/opt/local/share/squid' '-- localstatedir=/opt/local/var/squid' '-- libexecdir=/opt/local/libexec/squid' '--with- pidfile=/opt/local/var/run/squid/squid.pid' '--disable-strict-error- checking' '--disable-loadable-modules' '--disable-arch-native' '--without- gnutls' '--without-mit-krb5' '--without-heimdal-krb5' '--without-gnugss' '--enable-delay-pools' '--enable-zph-qos' '--enable-removal-policies' '--enable-storeio=ufs,aufs,diskd,rock' '--enable-disk- io=AIO,Blocking,DiskDaemon,DiskThreads,Mmapped' '--enable-log-daemon- helpers' '--with-default-user=squid' '--enable-auth' '--enable-auth-basic' '--enable-auth-digest' '--enable-auth-negotiate=wrapper' '--enable-auth- ntlm' '--enable-external-acl-helpers=SQL_session eDirectory_userip file_userip time_quota unix_group wbinfo_group' '--with- openssl=/opt/local' 'CC=/usr/bin/clang' 'CFLAGS=-pipe -Os -arch x86_64' 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64' 'CPPFLAGS=-I/opt/local/include' 'CXX=/usr/bin/clang++' 'CXXFLAGS=-pipe -Os -arch x86_64 -stdlib=libc++' }}} ---- == environment: == Apple Mac OS X 10.9.5 (13F1077)\\ Apple XCode Version 6.2 (6C131e) macports 2.3.3\\ squid3 @3.5.5_0+openssl ===== -- -- Ticket URL: <https://trac.macports.org/ticket/47880#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#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 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. -- Ticket URL: <https://trac.macports.org/ticket/47880#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#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
#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 jmr@…): That should be plenty. It is in fact the same as #47080: {{{ cannot change current directory to /opt/local/var/squid/cache/squid: (2) No such file or directory }}} -- Ticket URL: <https://trac.macports.org/ticket/47880#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#47880: squid @3.5.5 run fails with "cannot change current directory to /opt/local/var/squid/cache/squid" ----------------------+------------------- Reporter: ni-27@… | Owner: jmr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: squid3 | ----------------------+------------------- -- Ticket URL: <https://trac.macports.org/ticket/47880#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#47880: squid3 @3.5.5 run fails with "cannot change current directory to /opt/local/var/squid/cache/squid" ----------------------+-------------------- Reporter: ni-27@… | Owner: jmr@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: fixed | Keywords: Port: squid3 | ----------------------+-------------------- Changes (by jmr@…): * status: new => closed * cc: dluke@… (added) * resolution: => fixed Comment: r136919 -- Ticket URL: <https://trac.macports.org/ticket/47880#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#47880: squid3 @3.5.5 run fails with "cannot change current directory to /opt/local/var/squid/cache/squid" ----------------------+-------------------- Reporter: ni-27@… | Owner: jmr@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: fixed | Keywords: Port: squid3 | ----------------------+-------------------- Comment (by jmr@…): You may need to update the cache_dir setting in your squid.conf if it’s pointing to a nonexistent directory, BTW. -- Ticket URL: <https://trac.macports.org/ticket/47880#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#47880: squid3 @3.5.5 run fails with "cannot change current directory to /opt/local/var/squid/cache/squid" ----------------------+-------------------- Reporter: ni-27@… | Owner: jmr@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: fixed | Keywords: Port: squid3 | ----------------------+-------------------- Comment (by ni-27@…): Replying to [comment:7 jmr@…]:
You may need to update the cache_dir setting in your squid.conf if it’s pointing to a nonexistent directory, BTW.
Thanks. However, you may have missed the point, that I have this issue in particular with a '''working dir setting''' since changing from 3.4.11 to 3.5.3 due to the MacPorts upgrade. A former 3.4.x adjusted profile should work with 3.5.x, I presume? BTW Shouldn't the default profile just nicely build a default directory in a fresh environment or am I wrong? -- Ticket URL: <https://trac.macports.org/ticket/47880#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#47880: squid3 @3.5.5 run fails with "cannot change current directory to /opt/local/var/squid/cache/squid" ----------------------+-------------------- Reporter: ni-27@… | Owner: jmr@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: fixed | Keywords: Port: squid3 | ----------------------+-------------------- Comment (by jmr@…): Yes the default should work in a fresh environment, but the default was wrong. That’s what I fixed. Updating the port will not touch an existing squid.conf, so if you have a reference to /opt/local/var/squid/cache/squid in there (rather than /opt/local/var/squid/cache) you will need to either change it or create that directory. I can’t tell you what series of events led to the current state of your squid.conf, but your log output is very clear that it is referencing /opt/local/var/squid/cache/squid. -- Ticket URL: <https://trac.macports.org/ticket/47880#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#47880: squid3 @3.5.5 run fails with "cannot change current directory to /opt/local/var/squid/cache/squid" ----------------------+-------------------- Reporter: ni-27@… | Owner: jmr@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: fixed | Keywords: Port: squid3 | ----------------------+-------------------- Comment (by ni-27@…): Replying to [comment:9 jmr@…]:
Yes the default should work in a fresh environment, but the default was wrong. That’s what I fixed. Updating the port will not touch an existing squid.conf, so if you have a reference to /opt/local/var/squid/cache/squid in there (rather than /opt/local/var/squid/cache) you will need to either change it or create that directory. I can’t tell you what series of events led to the current state of your squid.conf, but your log output is very clear that it is referencing /opt/local/var/squid/cache/squid.
Thank you very much. This helped. With the 3.5.5_1 patch I was able to upgrade the 3.4.11 squid environment without trouble on my second machine. Your observations on the logs are correct. Unfortunately, I was missing the point by using a fresh startup and did not take the effort to dig for the original logs and squid.conf on the first machine. -- Ticket URL: <https://trac.macports.org/ticket/47880#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts