From: "Alejandro Riveira Fernández" <ariveira@gmail.com>
To: John Wenker <jjw@pt.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: fstat(2) returns st_size==0 for non-empty FIFO.
Date: Wed, 10 Sep 2008 11:19:02 +0200 [thread overview]
Message-ID: <20080910111902.6916284a@Varda> (raw)
In-Reply-To: <OFA045C5CB.E26ECC40-ON882574BF.007A7015-882574BF.007ED085@pt.com>
El Tue, 9 Sep 2008 16:05:06 -0700
John Wenker <jjw@pt.com> escribió:
> A colleague has run into a problem. We assume it's a kernel issue. Here
> is the pertinent bug report data.
>
> [1.] One line summary of the problem:
> fstat(2) returns st_size == 0 for a FIFO that is known to have data in it.
>
> [2.] Full description of the problem/report:
> When using a FIFO, fstat(2) (and stat(2)) returns a 'struct stat' with the
> st_size field equal to zero, at a time when the FIFO is known to have data
> in it. Problem occurs with Linux 2.6.16 kernel (see more below), but does
> not occur on 2.4.20.
>
> [3.] Keywords (i.e., modules, networking, kernel):
> stat, fstat, FIFO, struct stat, st_size, system call, write
>
> [4.] Kernel version (from /proc/version):
> Linux version 2.6.16.13-4-default (geeko@buildhost) (gcc version 4.1.0
> (SUSE Linux)) #1 Wed May 3 04:53:23 UTC 2006
>
> Note: Problem does _not_ occur on Linux version 2.4.20-8
> (bhcompile@porky.devel.redhat.com) (gcc version 3.2.2 2003022 (Red Hat
> Linux 3.2.2-5)) #1 Thu Mar 13 17:54:28 EST 2003
>
> [5.] Output of Oops.. message (if applicable) with symbolic information
> resolved (see Documentation/oops-tracing.txt)
> No oops. Problem doesn't cause system crash, only affects behavior of
> user applications.
>
> [6.] A small shell script or example program which triggers the
> problem (if possible)
> I don't know if this qualifies as "small", but there is a 'C' program
> attached that will reproduce the problem (fifo.c).
FWIW
$ LC_ALL=C ./fifo test
Enter a string to write into the FIFO: Hello World!
fifo: WARNING - 0 (of 14 requested) bytes written into FIFO.
0 bytes in FIFO.
$ uname -r
2.6.27-rc5
>
>
>
next prev parent reply other threads:[~2008-09-10 9:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 23:05 John Wenker
2008-09-10 9:19 ` Alejandro Riveira Fernández [this message]
2008-09-10 9:24 ` Andreas Schwab
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=20080910111902.6916284a@Varda \
--to=ariveira@gmail.com \
--cc=jjw@pt.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®