* [Bug 194071] New: data loss using fallocate and mmap @ 2017-02-06 10:59 bugzilla-daemon 2017-04-26 10:46 ` [Bug 194071] " bugzilla-daemon ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: bugzilla-daemon @ 2017-02-06 10:59 UTC (permalink / raw) To: linux-ext4 https://bugzilla.kernel.org/show_bug.cgi?id=194071 Bug ID: 194071 Summary: data loss using fallocate and mmap Product: File System Version: 2.5 Kernel Version: 4.4.0+ Hardware: x86-64 OS: Linux Tree: Mainline Status: NEW Severity: high Priority: P1 Component: ext4 Assignee: fs_ext4@kernel-bugs.osdl.org Reporter: michael@swarm64.com Regression: No Created attachment 254231 --> https://bugzilla.kernel.org/attachment.cgi?id=254231&action=edit Example C program After calling fallocate() on a shared mmap'ed file and writing data into the newly allocated region, occasionally (first observed after running for ~1 week) some data is replaced by 0s. The address and size of corrupted data is also not reproducible. The initial failure was debugged and reduced to a C++ program that failed with both gcc and clang, and later to the attached C program. The amount allocated every iteration was reduced to 1 byte because that caused faster failures, and wasn't reproducible with higher power of 2 sizes. Is this a bug or user error? OS: Ubuntu 16.04.1 LTS kernel versions: 4.4.0-38-generic, 4.9.7-040907-generic block device: Observed on both /dev/ram0 and local SSD ext4 mount options: (rw, relatime,data=ordered) Unable to reproduce when using the "FALLOC_FL_ZERO_RANGE" flag, and on a tmpfs ram disk. Reproduction steps: sudo mkdir /mnt/ram0 sudo mkfs.ext4 /dev/ram0 sudo mount /dev/ram0 /mnt/ram0/ gcc -O2 tests_mmap_fallocate.c -o tests_mmap_fallocate_gcc while sudo rm -f /mnt/ram0/tests_mmap_fallocate && sudo ./tests_mmap_fallocate_gcc; do date && sleep 1; done ... ... ... Value has been modified (Also nothing found in /var/log/kern.log) On a development machine the failure only occurs after several days of running in a loop, but fails within minutes on a virtualized Linux machine on a server. -- You are receiving this mail because: You are watching the assignee of the bug. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug 194071] data loss using fallocate and mmap 2017-02-06 10:59 [Bug 194071] New: data loss using fallocate and mmap bugzilla-daemon @ 2017-04-26 10:46 ` bugzilla-daemon 2017-05-25 8:47 ` bugzilla-daemon ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: bugzilla-daemon @ 2017-04-26 10:46 UTC (permalink / raw) To: linux-ext4 https://bugzilla.kernel.org/show_bug.cgi?id=194071 --- Comment #1 from Michael Zimmer (michael@swarm64.com) --- Has anyone investigated or been able to reproduce this failure? -- You are receiving this mail because: You are watching the assignee of the bug. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug 194071] data loss using fallocate and mmap 2017-02-06 10:59 [Bug 194071] New: data loss using fallocate and mmap bugzilla-daemon 2017-04-26 10:46 ` [Bug 194071] " bugzilla-daemon @ 2017-05-25 8:47 ` bugzilla-daemon 2017-05-25 8:59 ` bugzilla-daemon ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: bugzilla-daemon @ 2017-05-25 8:47 UTC (permalink / raw) To: linux-ext4 https://bugzilla.kernel.org/show_bug.cgi?id=194071 Jan Kara (jack@suse.cz) changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jack@suse.cz Attachment #254231|text/x-csrc |text/plain mime type| | -- You are receiving this mail because: You are watching the assignee of the bug. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug 194071] data loss using fallocate and mmap 2017-02-06 10:59 [Bug 194071] New: data loss using fallocate and mmap bugzilla-daemon 2017-04-26 10:46 ` [Bug 194071] " bugzilla-daemon 2017-05-25 8:47 ` bugzilla-daemon @ 2017-05-25 8:59 ` bugzilla-daemon 2017-05-25 11:29 ` bugzilla-daemon ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: bugzilla-daemon @ 2017-05-25 8:59 UTC (permalink / raw) To: linux-ext4 https://bugzilla.kernel.org/show_bug.cgi?id=194071 --- Comment #2 from Jan Kara (jack@suse.cz) --- Looks like a bug in ext4... I'm investigating... -- You are receiving this mail because: You are watching the assignee of the bug. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug 194071] data loss using fallocate and mmap 2017-02-06 10:59 [Bug 194071] New: data loss using fallocate and mmap bugzilla-daemon ` (2 preceding siblings ...) 2017-05-25 8:59 ` bugzilla-daemon @ 2017-05-25 11:29 ` bugzilla-daemon 2017-05-25 11:55 ` bugzilla-daemon 2017-09-05 10:02 ` bugzilla-daemon 5 siblings, 0 replies; 7+ messages in thread From: bugzilla-daemon @ 2017-05-25 11:29 UTC (permalink / raw) To: linux-ext4 https://bugzilla.kernel.org/show_bug.cgi?id=194071 --- Comment #3 from Jan Kara (jack@suse.cz) --- Created attachment 256719 --> https://bugzilla.kernel.org/attachment.cgi?id=256719&action=edit [PATCH] ext4: Fix data corruption for mmap writes This patch fixes the issue for me. -- You are receiving this mail because: You are watching the assignee of the bug. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug 194071] data loss using fallocate and mmap 2017-02-06 10:59 [Bug 194071] New: data loss using fallocate and mmap bugzilla-daemon ` (3 preceding siblings ...) 2017-05-25 11:29 ` bugzilla-daemon @ 2017-05-25 11:55 ` bugzilla-daemon 2017-09-05 10:02 ` bugzilla-daemon 5 siblings, 0 replies; 7+ messages in thread From: bugzilla-daemon @ 2017-05-25 11:55 UTC (permalink / raw) To: linux-ext4 https://bugzilla.kernel.org/show_bug.cgi?id=194071 --- Comment #4 from Jan Kara (jack@suse.cz) --- BTW, can I base a testcase for fstests on your example program? -- You are receiving this mail because: You are watching the assignee of the bug. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug 194071] data loss using fallocate and mmap 2017-02-06 10:59 [Bug 194071] New: data loss using fallocate and mmap bugzilla-daemon ` (4 preceding siblings ...) 2017-05-25 11:55 ` bugzilla-daemon @ 2017-09-05 10:02 ` bugzilla-daemon 5 siblings, 0 replies; 7+ messages in thread From: bugzilla-daemon @ 2017-09-05 10:02 UTC (permalink / raw) To: linux-ext4 https://bugzilla.kernel.org/show_bug.cgi?id=194071 --- Comment #5 from Michael Zimmer (michael@swarm64.com) --- Thanks for investigating and making the patch. Sorry that I missed your last comment, feel free to base a testcase on the example program. -- You are receiving this mail because: You are watching the assignee of the bug. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-09-05 10:02 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-02-06 10:59 [Bug 194071] New: data loss using fallocate and mmap bugzilla-daemon 2017-04-26 10:46 ` [Bug 194071] " bugzilla-daemon 2017-05-25 8:47 ` bugzilla-daemon 2017-05-25 8:59 ` bugzilla-daemon 2017-05-25 11:29 ` bugzilla-daemon 2017-05-25 11:55 ` bugzilla-daemon 2017-09-05 10:02 ` bugzilla-daemon
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.