Bug 136057 - O_NONBLOCK for files breaks squid
O_NONBLOCK for files breaks squid
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
All Linux
medium Severity high
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
Depends On:
Blocks: 136049
  Show dependency treegraph
 
Reported: 2004-10-17 05:13 EDT by Alexandre Oliva
Modified: 2015-01-04 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version: 2.6.9-1.639
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-20 14:48:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2004-10-17 05:13:46 EDT
Description of problem:
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done
squid won't start when running under kernel 2.6.8-1.624, because of
the changes related with O_NONBLOCK for files.  The symptom is that
the init script takes a while to complete, and then reports squid
failed.  strace reveals squid is attempting to read the error message
files from /etc/squid/errors, and getting -EAGAIN errors in return.

If you cat all files in there to bring them into memory, squid starts
successfully, but it won't serve out cached content because of the
same issue.  It poll()s cached files, and gets indications that the
cache files are ready for input, but when it attempts to read from
them, it gets -EAGAIN errors.

It's possible to get squid to make progress, instead of eating all CPU
repeatedly calling poll and read, the latter of which fails, by
starting the following script after starting squid:

pid=`pidof '(squid)'`; while :; do lsof -p $pid | sed -n
's,.*\(/var/spool/squid/.*/.*/.*\),\1,p' | xargs cat /dev/null >
/dev/null; sleep 5; done

Version-Release number of selected component (if applicable):
kernel-2.6.8-1.624 squid-2.5.STABLE6-2

How reproducible:
Every time

Steps to Reproduce:
1.service squid start
2.cat /etc/squid/errors/* > /dev/null; service squid start
3.http_proxy=localhost:3128 links some_cached_url
  
Actual results:
1 fails.  2 works, but 3 won't get the page contents unless they
happened to be in memory.

Expected results:
1 fails.  2 works, but 3 won't get the page contents unless they
happened to be in memory.

Additional info:
Comment 1 Alexandre Oliva 2004-10-17 16:53:12 EDT
Ugh, osrry about the mess that this bug report turned out to be.  VNC
and Firefox don't quite live happily in my environment :-(  Looks like
a single C-v was for some reason interpreted as 10+ instances thereof,
and  I failed to notice that.  Also, I goofed in the `expect results',
that should have read `the usual' :-)
Comment 2 Michael Schwendt 2004-10-18 05:17:09 EDT
I assume this is not specific to Squid, because kernel-2.6.8-1.624
breaks 'gqview' into pieces. It fails to recognize/load any images
files at all. With the older 1.541 kernel I kept, it works okay.
Comment 3 Bill Nottingham 2004-10-19 00:48:50 EDT
Should be fixed in 2.6.9-1.635. 
Comment 4 Alexandre Oliva 2004-10-20 14:48:55 EDT
Confirmed fixed in 1.639.

Note You need to log in before you can comment on or make changes to this bug.