xfs-masters
[Top] [All Lists]

[xfs-masters] [Bug 568] New: deadlock via xfs_write / xfs_dm_send_mmap_

To: xfs-master@xxxxxxxxxxx
Subject: [xfs-masters] [Bug 568] New: deadlock via xfs_write / xfs_dm_send_mmap_event
From: bugzilla-daemon@xxxxxxxxxxx
Date: Tue, 21 Mar 2006 17:55:04 -0800
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
http://oss.sgi.com/bugzilla/show_bug.cgi?id=568

           Summary: deadlock via xfs_write / xfs_dm_send_mmap_event
           Product: Linux XFS
           Version: Current
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: dmapi
        AssignedTo: xfs-master@xxxxxxxxxxx
        ReportedBy: c.pascoe@xxxxxxxxxxxxxx


Running a filesystem with DMAPI enabled (but all events turned off), I
have suffered a problem where accesses to a single file can hang.

The problem appears to be when a page fault occurs on a file during
generic_file_buffered_write, called from xfs_write with XFS_IOLOCK_EXCL on
the inode.  The page fault causes a call into xfs_dm_send_mmap_event which
tries again to obtain the iolock, and the process deadlocks.

The first process that hangs ends up with a trace like this:

imapd         D C3304280     0 26237   3459         26283 24394 (NOTLB)
d7a35b88 00000000 00000250 c3304280 f8af7297 00000000 00000004 00000250 
       f8af8c39 f589da34 00000246 f7fd1dc0 00000287 f4d32060 e7e4b760 00000000 
       000002d0 00000000 c311b560 00000001 00000000 dfb67f00 0040e5e6 c3255550 
Call Trace:
 [<f8af7297>] _pagebuf_find+0x13e/0x1d8 [xfs]
 [<f8af8c39>] kmem_zone_alloc+0x3d/0xb0 [xfs]
 [<c02d4767>] rwsem_down_read_failed+0x87/0x176
 [<f8acb904>] .text.lock.xfs_iget+0x75/0x161 [xfs]
 [<f8afc370>] xfs_dm_send_mmap_event+0xe6/0x200 [xfs]
 [<f8af7297>] _pagebuf_find+0x13e/0x1d8 [xfs]
 [<f8af0b6c>] linvfs_filemap_nopage+0x3e/0x81 [xfs]
 [<c014cf70>] do_no_page+0xc3/0x324
 [<c014d386>] __handle_mm_fault+0xd8/0x1e4
 [<c02d5369>] do_page_fault+0x1c9/0x64e
 [<f8ae182b>] xfs_trans_log_buf+0x49/0x6d [xfs]
 [<c02d51a0>] do_page_fault+0x0/0x64e
 [<c010362f>] error_code+0x4f/0x54
 [<f8ae007b>] xfs_trans_apply_sb_deltas+0x309/0x523 [xfs]
 [<f8ad007b>] xfs_inode_item_size+0x14b/0x184 [xfs]
 [<c013f50e>] generic_file_buffered_write+0xc9/0x5f1
 [<f8af77d8>] pagebuf_rele+0x14/0x6b [xfs]
 [<f8ae0cbe>] xfs_trans_tail_ail+0x2e/0x36 [xfs]
 [<c012161d>] current_fs_time+0x50/0x5a
 [<f8af4b2d>] xfs_write+0x8f8/0xcb1 [xfs]
 [<c01b4430>] avc_has_perm+0x4e/0x5e
 [<f8af05ae>] linvfs_aio_write+0x7a/0x8c [xfs]
 [<c015b13e>] do_sync_write+0xbf/0x11a
 [<c01c7587>] _atomic_dec_and_lock+0x27/0x50
 [<c01b72c7>] selinux_file_permission+0xee/0x137
 [<c012f62b>] autoremove_wake_function+0x0/0x37
 [<c015a9e4>] generic_file_llseek+0x24/0xb4
 [<c015b24c>] vfs_write+0xb3/0x154
 [<c015b398>] sys_write+0x41/0x6a
 [<c0102a5b>] sysenter_past_esp+0x54/0x75

and all subsequent attempts to access the file end up with a trace like this:

imapd         D ED6CEC20     0 26283   3459         26912 26237 (NOTLB)
d2da1e38 c3240310 00000006 ed6cec20 d2da1e44 00000002 00000246 00000002 
       c017b812 00000006 00000000 e3a2d974 e3a2d8e4 00000000 f8acb5b6 e3a2d9e8 
       e3a2d8e4 d2da1e3c c311b560 00000001 00000000 b1449e00 0040e5fe c3255550 
Call Trace:
 [<c017b812>] __mark_inode_dirty+0x52/0x198
 [<f8acb5b6>] xfs_ilock+0x3f/0xdd [xfs]
 [<c02d4767>] rwsem_down_read_failed+0x87/0x176
 [<f8acb904>] .text.lock.xfs_iget+0x75/0x161 [xfs]
 [<f8afc370>] xfs_dm_send_mmap_event+0xe6/0x200 [xfs]
 [<c0141a2b>] buffered_rmqueue+0x13f/0x1fd
 [<f8af0b6c>] linvfs_filemap_nopage+0x3e/0x81 [xfs]
 [<c014cf70>] do_no_page+0xc3/0x324
 [<c014d386>] __handle_mm_fault+0xd8/0x1e4
 [<c02d5369>] do_page_fault+0x1c9/0x64e
 [<c02d51a0>] do_page_fault+0x0/0x64e
 [<c010362f>] error_code+0x4f/0x54

-- 
Configure bugmail: http://oss.sgi.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


<Prev in Thread] Current Thread [Next in Thread>
  • [xfs-masters] [Bug 568] New: deadlock via xfs_write / xfs_dm_send_mmap_event, bugzilla-daemon <=