xfs-masters
[Top] [All Lists]

[Bug 22452] New: data corruption after mmap()ing a file and writev() som

To: xfs-masters@xxxxxxxxxxx
Subject: [Bug 22452] New: data corruption after mmap()ing a file and writev() some data to another file
From: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
Date: Mon, 8 Nov 2010 10:33:58 GMT
Auto-submitted: auto-generated
https://bugzilla.kernel.org/show_bug.cgi?id=22452

           Summary: data corruption after mmap()ing a file and writev()
                    some data to another file
           Product: File System
           Version: 2.5
    Kernel Version: 2.6.36
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: XFS
        AssignedTo: xfs-masters@xxxxxxxxxxx
        ReportedBy: tolzmann@xxxxxxxxxxxxx
        Regression: Yes


Created an attachment (id=36732)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=36732)
map-test.c mmap() a file and writev() back to another file

Hi there,

we experienced some serious database corruptions in cyrus imap after switching
to the latest stable kernel (2.6.36).

we traced this down to some mmap()ing and writev() afterwards. 

Donald Buczek wrote a small test-program to reproduce this (.c-file attached)

to reproduce the corruption please compile map-test.c and run:

  echo -n "cccccccccc">test.flat
  ./map-test
  xxd test.flat.NEW

how we built the xfs and mounted it:
  mkfs.xfs /dev/sda3
  mount /dev/sda3 /mnt

example output under XFS: (/dev/sda3 /mnt xfs rw,relatime,attr2,noquota)
0000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000010: 0000 0000 6363 6363 6363 6363 6363       ....cccccccccc

example output under reiserfs:
0000000: 6161 6161 6161 6161 6161 6262 6262 6262  aaaaaaaaaabbbbbb
0000010: 6262 6262 6363 6363 6363 6363 6363       bbbbcccccccccc

please let me know what else to provide to make reproducing this bug easier..

we downgraded to linux 2.6.35.8 and everything seems to be fine again.

regards, 
   marius tolzmann

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

<Prev in Thread] Current Thread [Next in Thread>