* [Bug 55651] New: Non-atomic short write problem with O_APPEND
@ 2013-03-23 1:19 bugzilla-daemon
2013-03-25 20:59 ` [Bug 55651] " bugzilla-daemon
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: bugzilla-daemon @ 2013-03-23 1:19 UTC (permalink / raw)
To: linux-ext4
https://bugzilla.kernel.org/show_bug.cgi?id=55651
Summary: Non-atomic short write problem with O_APPEND
Product: File System
Version: 2.5
Kernel Version: 3.8.4
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: ext4
AssignedTo: fs_ext4@kernel-bugs.osdl.org
ReportedBy: qbarnes@gmail.com
Regression: No
Created an attachment (id=96041)
--> (https://bugzilla.kernel.org/attachment.cgi?id=96041)
C program to demonstrate problem with non-atomic short writes.
With recent kernels, short writes to a regular file opened with
O_APPEND can be non-atomic when receiving a signal, and the write
syscall is still returning bytes written == nbytes.
I tried this with v3.8.4 (latest stable) and as far back as v3.2.41
and a smattering in between. All show this problem. However, it
does not reproduce on v3.0.70 or earlier kernels. All testing was
done with on x86_64 SMP systems and on an ext3 or ext4 file system.
(I also tried running with only a single CPU enabled. It made no
difference.)
This is likely going to not be a problem specifically with the ext
file system, but it seemed the best Bugzilla match that I saw
based on the information gathered so far.
The problem did not reproduce on an OpenSUSE 12.1 system
(3.1.10-1.19-default). In the world of RHEL kernels, this problem
does not appear with RHEL5.7 or earlier RHEL kernels I tried.
However, it does appear starting with RHEL5.8 and 5.9 and also on
RHEL6 kernels that I tried (6.2 & 6.4).
I can't find anything wrong with the attached demo program, or find
anything in the POSIX standard or with the Linux open(2) man pages
that might allow for this apparent erroneous behavior.
To reproduce the problem, compile and run the program below. After
it's been running a say 4-6 seconds, press ^C. Notice there's been
no output from the program (for every write call made, all returned
success and with scnt==wcnt). Now run "grep '^P.*P' test.log". If
there is no problem, there will be no output. If you see output,
you'll see lines that were stepped on or otherwise not fully written
out.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 55651] Non-atomic short write problem with O_APPEND
2013-03-23 1:19 [Bug 55651] New: Non-atomic short write problem with O_APPEND bugzilla-daemon
@ 2013-03-25 20:59 ` bugzilla-daemon
2013-03-27 18:40 ` bugzilla-daemon
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2013-03-25 20:59 UTC (permalink / raw)
To: linux-ext4
https://bugzilla.kernel.org/show_bug.cgi?id=55651
--- Comment #1 from Quentin Barnes <qbarnes@gmail.com> 2013-03-25 20:59:31 ---
I have a small mistake in the above report. The problem does not reproduce on
RHEL6.2 (or earlier RHEL6 releases). Only on RHEL6.3 and later.
So it looks like the bug came in between: v3.1 and v3.2, RHEL5.7 and RHEL5.8,
and RHEL6.2 and RHEL6.3.
I'm still poking about to see if I can figure out which patch that is so I can
better have a guess at which subsystem.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 55651] Non-atomic short write problem with O_APPEND
2013-03-23 1:19 [Bug 55651] New: Non-atomic short write problem with O_APPEND bugzilla-daemon
2013-03-25 20:59 ` [Bug 55651] " bugzilla-daemon
@ 2013-03-27 18:40 ` bugzilla-daemon
2013-03-27 18:46 ` bugzilla-daemon
2013-03-27 18:57 ` bugzilla-daemon
3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2013-03-27 18:40 UTC (permalink / raw)
To: linux-ext4
https://bugzilla.kernel.org/show_bug.cgi?id=55651
Quentin Barnes <qbarnes@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #96041|0 |1
is obsolete| |
--- Comment #2 from Quentin Barnes <qbarnes@gmail.com> 2013-03-27 18:40:35 ---
Created an attachment (id=96411)
--> (https://bugzilla.kernel.org/attachment.cgi?id=96411)
Fully automatic C test for demostrating problem
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 55651] Non-atomic short write problem with O_APPEND
2013-03-23 1:19 [Bug 55651] New: Non-atomic short write problem with O_APPEND bugzilla-daemon
2013-03-25 20:59 ` [Bug 55651] " bugzilla-daemon
2013-03-27 18:40 ` bugzilla-daemon
@ 2013-03-27 18:46 ` bugzilla-daemon
2013-03-27 18:57 ` bugzilla-daemon
3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2013-03-27 18:46 UTC (permalink / raw)
To: linux-ext4
https://bugzilla.kernel.org/show_bug.cgi?id=55651
Quentin Barnes <qbarnes@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|ext4 |VFS
Kernel Version|3.8.4 |3.9-rc4
--- Comment #3 from Quentin Barnes <qbarnes@gmail.com> 2013-03-27 18:46:35 ---
I tracked the problem down to the specific patch a50527b1.
Since now I know the problem is not specific to ext[34], I'm
updating the ticket to be the VFS layer. (HOWEVER, Bugzilla
won't let me change the assignee to fs_vfs@kernel-bugs.osdl.org.
Can someone do that for me?)
With the patch in place (even up to and including 3.9-rc4), the
attached test (mlt-auto.c) fails.
If I git revert a50527b1 out of 3.9-rc4, the test passes.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 55651] Non-atomic short write problem with O_APPEND
2013-03-23 1:19 [Bug 55651] New: Non-atomic short write problem with O_APPEND bugzilla-daemon
` (2 preceding siblings ...)
2013-03-27 18:46 ` bugzilla-daemon
@ 2013-03-27 18:57 ` bugzilla-daemon
3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2013-03-27 18:57 UTC (permalink / raw)
To: linux-ext4
https://bugzilla.kernel.org/show_bug.cgi?id=55651
Theodore Tso <tytso@mit.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |tytso@mit.edu
AssignedTo|fs_ext4@kernel-bugs.osdl.or |jack@suse.cz
|g |
--- Comment #4 from Theodore Tso <tytso@mit.edu> 2013-03-27 18:57:24 ---
The commit in question (a50527b1) was authored by Jan Kara so I've changed the
assignee of this bug to him.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-27 18:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-23 1:19 [Bug 55651] New: Non-atomic short write problem with O_APPEND bugzilla-daemon
2013-03-25 20:59 ` [Bug 55651] " bugzilla-daemon
2013-03-27 18:40 ` bugzilla-daemon
2013-03-27 18:46 ` bugzilla-daemon
2013-03-27 18:57 ` bugzilla-daemon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).