linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fsync() on read-only RAID triggers BUG
@ 2013-01-20 18:44 Ben Hutchings
  2013-01-25 15:09 ` Sebastian Riemer
  0 siblings, 1 reply; 11+ messages in thread
From: Ben Hutchings @ 2013-01-20 18:44 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid, 696650

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

We've had a report of the BUG in md_write_start() being triggered while
running the Debian installer: <http://bugs.debian.org/696650>.
Based on the call trace, I came up with the following script that
reproduces this under Linux 3.2.35 and 3.7.3:

--- BEGIN ---
#!/bin/bash -ex

# Set up temporary RAID1 on /dev/md0
dd if=/dev/zero of=/tmp/disk0 bs=1M count=1
losetup /dev/loop0 /tmp/disk0
dd if=/dev/zero of=/tmp/disk1 bs=1M count=1
losetup /dev/loop1 /tmp/disk1
yes | mdadm -C /dev/md0 -l 1 -n 2 /dev/loop{0,1}

# Make it read-only
while ! mdadm -o /dev/md0; do sleep 1; done

# Call fsync()
python -c "import os; os.fsync(os.open('/dev/md0', os.O_RDWR))"
--- END ---

I assume that the sync request should be filtered out at some point
before this assertion is made, since there can be nothing to sync.

Ben.

-- 
Ben Hutchings
Never attribute to conspiracy what can adequately be explained by stupidity.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-02-04 22:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-20 18:44 fsync() on read-only RAID triggers BUG Ben Hutchings
2013-01-25 15:09 ` Sebastian Riemer
2013-01-26 19:44   ` Ben Hutchings
2013-01-27 16:39     ` Christoph Hellwig
2013-01-28 10:32       ` [PATCH v2] md: protect against crash upon fsync on ro array Sebastian Riemer
2013-01-28 12:39         ` [PATCH v3] " Sebastian Riemer
2013-01-29  5:45           ` Ben Hutchings
2013-01-29 11:19             ` [PATCH v4] " Sebastian Riemer
2013-01-29 12:29               ` [PATCH v5] " Paul Menzel
2013-01-31 19:35                 ` Sebastian Riemer
2013-02-04 22:30                   ` NeilBrown

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).