From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 18372] New: A filled up named pipe always has a size of zero!
Date: Sun, 12 Sep 2010 21:47:04 GMT [thread overview]
Message-ID: <bug-18372-13602@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=18372
Summary: A filled up named pipe always has a size of zero!
Product: File System
Version: 2.5
Kernel Version: 2.6.32-22-generic (also older and newer ones)
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: ext4
AssignedTo: fs_ext4@kernel-bugs.osdl.org
ReportedBy: tom.bzliknl83947@online.de
CC: tom.bzliknl83947@online.de
Regression: No
Hi, there!
The size of a filled named pipe is always zero. This is wrong! A read operation
is going to hang for try to read from an empty pipe. To go around this trap it
is necessary to do a conditional test on the filesize, [ -s pipe ]. Problem:
The test doesn't work, because filesize is always zero.
Try:
mknod pipe &
sleep 3600 <>pipe &
echo 'date' >pipe
[ -s pipe ] && echo "filled up"
ls -l pipe; stat pipe # if size zero, it is wrong
[ -s pipe ] && (read val <pipe; echo $val)
This is a critical error. While parallel processing a script would be blocked.
In worst case it causes a deadlock situation. Every changing of a condition of
a file should be reported whithin the i-node.
I found it in several disto: Ubuntu KarmicKoala 9.1, LucidLynx 10.04,
Linux Mint Debian Edition 5, Slackware 13.1 x64
Best regards
TOM
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
next reply other threads:[~2010-09-12 21:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-12 21:47 bugzilla-daemon [this message]
2012-05-12 15:46 ` [Bug 18372] A filled up named pipe always has a size of zero! bugzilla-daemon
2012-05-12 15:46 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-18372-13602@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox