Bug 12182 - possible circular locking dependency detected in ntfs_readpage / ntfs_map_runlist
Summary: possible circular locking dependency detected in ntfs_readpage / ntfs_map_run...
Status: CLOSED OBSOLETE
Alias: None
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-08 11:31 UTC by Brandon Ehle
Modified: 2012-05-30 11:30 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.28-rc5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Brandon Ehle 2008-12-08 11:31:50 UTC
Machine is x86 running on Debian sid against 2.6.28-rc5. The warning occursed while plugging in a USB harddrive with an NTFS partition on it.  I am grabbing latest from git and going to attempt to reproduce against that version as well.


p.s. Is there a component target in bugzilla for ntfs bugs?


usb 1-6: new high speed USB device using ehci_hcd and address 4
usb 1-6: configuration #1 chosen from 1 choice
scsi5 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 5:0:0:0: Direct-Access     WD       1200BEVExternal  1.02 PQ: 0 ANSI: 0
sd 5:0:0:0: [sdf] 234441648 512-byte hardware sectors: (120 GB/111 GiB)
sd 5:0:0:0: [sdf] Write Protect is off
sd 5:0:0:0: [sdf] Mode Sense: 00 00 00 00
sd 5:0:0:0: [sdf] Assuming drive cache: write through
sd 5:0:0:0: [sdf] 234441648 512-byte hardware sectors: (120 GB/111 GiB)
sd 5:0:0:0: [sdf] Write Protect is off
sd 5:0:0:0: [sdf] Mode Sense: 00 00 00 00
sd 5:0:0:0: [sdf] Assuming drive cache: write through
 sdf: sdf1
sd 5:0:0:0: [sdf] Attached SCSI disk
sd 5:0:0:0: Attached scsi generic sg6 type 0
NTFS volume version 3.1.
NTFS-fs warning (device sdf1): ntfs_setattr(): Changes in user/group/mode are not supported yet, ignoring.
NTFS-fs warning (device sdf1): ntfs_setattr(): Changes in user/group/mode are not supported yet, ignoring.

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.28-rc5 #51
-------------------------------------------------------
umount/3134 is trying to acquire lock:
 (&rl->lock){----}, at: [<c030ac69>] ntfs_readpage+0x967/0x9fe

but task is already holding lock:
 (&ni->mrec_lock){--..}, at: [<c031be2a>] map_mft_record+0x2d/0x207

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&ni->mrec_lock){--..}:
       [<c0159527>] __lock_acquire+0xb9b/0xf89
       [<c0159986>] lock_acquire+0x71/0x94
       [<c06484b6>] __mutex_lock_common+0x9b/0x3c2
       [<c0648887>] mutex_lock_nested+0x34/0x3b
       [<c031be2a>] map_mft_record+0x2d/0x207
       [<c030cdc4>] ntfs_map_runlist_nolock+0x158/0x4a9
       [<c030d4e4>] ntfs_map_runlist+0x55/0x69
       [<c030ac4b>] ntfs_readpage+0x949/0x9fe
       [<c01885cf>] __do_page_cache_readahead+0x167/0x1d7
       [<c01888f9>] ondemand_readahead+0x131/0x172
       [<c01889e4>] page_cache_sync_readahead+0x2d/0x39
       [<c0181a57>] generic_file_aio_read+0x2bf/0x61d
       [<c01a99fd>] do_sync_read+0xd2/0x108
       [<c01aa140>] vfs_read+0x90/0x14e
       [<c01aa2b1>] sys_read+0x42/0x70
       [<c0103f03>] sysenter_do_call+0x12/0x43
       [<ffffffff>] 0xffffffff

-> #0 (&rl->lock){----}:
       [<c01595de>] __lock_acquire+0xc52/0xf89
       [<c0159986>] lock_acquire+0x71/0x94
       [<c0648c22>] down_read+0x4a/0x98
       [<c030ac69>] ntfs_readpage+0x967/0x9fe
       [<c01823c1>] read_cache_page_async+0x71/0x145
       [<c01824ac>] read_cache_page+0x17/0x59
       [<c031c36f>] ntfs_sync_mft_mirror+0x93/0x5dd
       [<c031cc7c>] write_mft_record_nolock+0x3c3/0x566
       [<c0316f5b>] write_mft_record+0x4c/0x63
       [<c031b675>] ntfs_write_inode+0x39a/0x3c7
       [<c03255c7>] ntfs_put_super+0x59f/0x7f0
       [<c01ab74a>] generic_shutdown_super+0x5f/0xfd
       [<c01ab803>] kill_block_super+0x1b/0x2f
       [<c01abaa4>] deactivate_super+0x63/0x76
       [<c01be349>] mntput_no_expire+0xb8/0x116
       [<c01be634>] sys_umount+0x4b/0x311
       [<c01be918>] sys_oldumount+0x1e/0x20
       [<c0103f03>] sysenter_do_call+0x12/0x43
       [<ffffffff>] 0xffffffff

other info that might help us debug this:

3 locks held by umount/3134:
 #0:  (&type->s_umount_key#20){----}, at: [<c01aba9f>] deactivate_super+0x5e/0x76
 #1:  (&type->s_lock_key#12){--..}, at: [<c01ab0c1>] lock_super+0x20/0x22
 #2:  (&ni->mrec_lock){--..}, at: [<c031be2a>] map_mft_record+0x2d/0x207

stack backtrace:
Pid: 3134, comm: umount Not tainted 2.6.28-rc5 #51
Call Trace:
 [<c0646efd>] ? printk+0x1d/0x1f
 [<c0157818>] print_circular_bug_tail+0x84/0xba
 [<c01595de>] __lock_acquire+0xc52/0xf89
 [<c0155ef8>] ? trace_hardirqs_off+0xb/0xd
 [<c01096ab>] ? native_sched_clock+0x24/0x67
 [<c0159986>] lock_acquire+0x71/0x94
 [<c030ac69>] ? ntfs_readpage+0x967/0x9fe
 [<c0648c22>] down_read+0x4a/0x98
 [<c030ac69>] ? ntfs_readpage+0x967/0x9fe
 [<c030ac69>] ntfs_readpage+0x967/0x9fe
 [<c0189352>] ? __lru_cache_add+0x62/0x8a
 [<c0180ed8>] ? add_to_page_cache_lru+0x6e/0x77
 [<c01823c1>] read_cache_page_async+0x71/0x145
 [<c030a302>] ? ntfs_readpage+0x0/0x9fe
 [<c030a302>] ? ntfs_readpage+0x0/0x9fe
 [<c01824ac>] read_cache_page+0x17/0x59
 [<c031c36f>] ntfs_sync_mft_mirror+0x93/0x5dd
 [<c017253e>] ? __delayacct_blkio_end+0x32/0x52
 [<c0647aca>] ? io_schedule+0x70/0x8e
 [<c01c7019>] ? sync_buffer+0x0/0x40
 [<c0648157>] ? out_of_line_wait_on_bit+0xb3/0xbc
 [<c01c7019>] ? sync_buffer+0x0/0x40
 [<c031cc7c>] write_mft_record_nolock+0x3c3/0x566
 [<c0158812>] ? debug_check_no_locks_freed+0xda/0x15e
 [<c0316f5b>] write_mft_record+0x4c/0x63
 [<c031b675>] ntfs_write_inode+0x39a/0x3c7
 [<c03255c7>] ntfs_put_super+0x59f/0x7f0
 [<c05161ef>] ? _raw_spin_trylock+0xf/0x31
 [<c01ab74a>] generic_shutdown_super+0x5f/0xfd
 [<c0648bd0>] ? down_write+0x7c/0x84
 [<c01ab803>] kill_block_super+0x1b/0x2f
 [<c01df846>] ? vfs_quota_off+0x0/0x5ee
 [<c01abaa4>] deactivate_super+0x63/0x76
 [<c01be349>] mntput_no_expire+0xb8/0x116
 [<c01be634>] sys_umount+0x4b/0x311
 [<c01be918>] sys_oldumount+0x1e/0x20
 [<c0103f03>] sysenter_do_call+0x12/0x43
Comment 1 Alan 2012-05-30 11:30:09 UTC
Closing obsolete bugs. If this is seen in modern kernels please re-open

Note You need to log in before you can comment on or make changes to this bug.