Re: [RFC PATCH v4 0/3] xfs: more unlinked inode list optimization v4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Darrick,

On Wed, Aug 19, 2020 at 07:46:18PM -0700, Darrick J. Wong wrote:
> Hm.  I saw the following warning from lockdep when running generic/078 with:
> 
> MKFS_OPTIONS --  -m reflink=1,rmapbt=1 -i sparse=1
> MOUNT_OPTIONS --  -o usrquota,grpquota,prjquota,
> CHECK_OPTIONS -- -g auto
> XFS_MKFS_OPTIONS -- -bsize=4096
> 
> The test kernel is 5.9-rc1 + inobtcount + y2038 + dave's iunlink series + yours

Thanks for the report. I didn't enable lockdep before, will confirm it soon.

Thanks!
Gao Xiang

> 
> +[  516.166575] run fstests generic/078 at 2020-08-19 15:35:28
> +[  516.659584] XFS (sda): Mounting V5 Filesystem
> +[  516.846982] XFS (sda): Ending clean mount
> +[  516.849669] xfs filesystem being mounted at /mnt supports timestamps until 2038 (0x7fffffff)
> +
> +[  517.341920] ============================================
> +[  517.342849] WARNING: possible recursive locking detected
> +[  517.343832] 5.9.0-rc1-djw #rc1 Tainted: G        W        
> +[  517.344862] --------------------------------------------
> +[  517.345886] renameat2/107505 is trying to acquire lock:
> +[  517.346830] ffff88803ca48468 (&pag->pag_iunlink_mutex){+.+.}-{3:3}, at: xfs_iunlink+0xb8/0x3f0 [xfs]
> +[  517.348460] 
> +               but task is already holding lock:
> +[  517.349107] ffff88803ca4bc68 (&pag->pag_iunlink_mutex){+.+.}-{3:3}, at: xfs_iunlink_remove+0x239/0x3f0 [xfs]
> +[  517.350240] 
> +               other info that might help us debug this:
> +[  517.351166]  Possible unsafe locking scenario:
> +
> +[  517.351902]        CPU0
> +[  517.352399]        ----
> +[  517.352895]   lock(&pag->pag_iunlink_mutex);
> +[  517.353572]   lock(&pag->pag_iunlink_mutex);
> +[  517.354387] 
> +                *** DEADLOCK ***
> +
> +[  517.355394]  May be due to missing lock nesting notation
> +
> +[  517.356132] 9 locks held by renameat2/107505:
> +[  517.356615]  #0: ffff888032b78468 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x24/0x60
> +[  517.357561]  #1: ffff88803d00bfe8 (&inode->i_sb->s_type->i_mutex_dir_key/1){+.+.}-{3:3}, at: lock_rename+0xf5/0x100
> +[  517.358912]  #2: ffff88803d00fbe8 (&inode->i_sb->s_type->i_mutex_dir_key){++++}-{3:3}, at: vfs_rename+0x17d/0x950
> +[  517.360011]  #3: ffff888032b78688 (sb_internal){.+.+}-{0:0}, at: xfs_trans_alloc+0x18b/0x250 [xfs]
> +[  517.361018]  #4: ffff88803d00f8f0 (&xfs_dir_ilock_class){++++}-{3:3}, at: xfs_ilock+0xcf/0x2a0 [xfs]
> +[  517.362063]  #5: ffff88803d00bcf0 (&xfs_dir_ilock_class){++++}-{3:3}, at: xfs_ilock_nowait+0xcf/0x340 [xfs]
> +[  517.363173]  #6: ffff88803bf82df0 (&xfs_nondir_ilock_class){++++}-{3:3}, at: xfs_ilock_nowait+0xcf/0x340 [xfs]
> +[  517.364685]  #7: ffff88803d00cbf0 (&xfs_dir_ilock_class){++++}-{3:3}, at: xfs_ilock_nowait+0xcf/0x340 [xfs]
> +[  517.366414]  #8: ffff88803ca4bc68 (&pag->pag_iunlink_mutex){+.+.}-{3:3}, at: xfs_iunlink_remove+0x239/0x3f0 [xfs]
> +[  517.367787] 
> +               stack backtrace:
> +[  517.368285] CPU: 1 PID: 107505 Comm: renameat2 Tainted: G        W         5.9.0-rc1-djw #rc1
> +[  517.369196] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1 04/01/2014
> +[  517.370401] Call Trace:
> +[  517.370703]  dump_stack+0x7c/0xac
> +[  517.371091]  __lock_acquire.cold+0x168/0x2ab
> +[  517.371571]  lock_acquire+0xa2/0x370
> +[  517.372025]  ? xfs_iunlink+0xb8/0x3f0 [xfs]
> +[  517.372505]  __mutex_lock+0xa1/0xa00
> +[  517.372955]  ? xfs_iunlink+0xb8/0x3f0 [xfs]
> +[  517.373455]  ? kvm_clock_read+0x14/0x30
> +[  517.373898]  ? kvm_sched_clock_read+0x9/0x20
> +[  517.374379]  ? sched_clock_cpu+0x14/0xe0
> +[  517.374897]  ? xfs_iunlink+0xb8/0x3f0 [xfs]
> +[  517.375405]  ? xfs_iunlink+0x94/0x3f0 [xfs]
> +[  517.376185]  ? rcu_read_lock_sched_held+0x56/0x80
> +[  517.377055]  ? xfs_iunlink+0xb8/0x3f0 [xfs]
> +[  517.377896]  xfs_iunlink+0xb8/0x3f0 [xfs]
> +[  517.378703]  xfs_rename+0xdb8/0x1030 [xfs]
> +[  517.379261]  xfs_vn_rename+0xd5/0x140 [xfs]
> +[  517.379740]  vfs_rename+0x1bc/0x950
> +[  517.380146]  ? lookup_dcache+0x18/0x60
> +[  517.380572]  ? do_renameat2+0x343/0x4d0
> +[  517.381013]  do_renameat2+0x343/0x4d0
> +[  517.381672]  __x64_sys_renameat2+0x25/0x30
> +[  517.382145]  do_syscall_64+0x31/0x40
> +[  517.382554]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> +[  517.383330] RIP: 0033:0x7fb9be244083
> +[  517.384005] Code: 64 89 02 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 f3 0f 1e fa 49 89 ca 45 85 c0 74 44 b8 3c 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3d 41 89 c0 83 f8 ff 74 0d 44 89 c0 c3 66 0f
> +[  517.387257] RSP: 002b:00007ffc56416ed8 EFLAGS: 00000202 ORIG_RAX: 000000000000013c
> +[  517.388148] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fb9be244083
> +[  517.389183] RDX: 00000000ffffff9c RSI: 00007ffc5641968c RDI: 00000000ffffff9c
> +[  517.390190] RBP: 0000000000000000 R08: 0000000000000004 R09: 00007ffc56416fd8
> +[  517.391440] R10: 00007ffc5641969c R11: 0000000000000202 R12: 000056494b1d6220
> +[  517.392747] R13: 00007ffc56416fd0 R14: 0000000000000000 R15: 0000000000000000
> +[  517.831548] XFS (sda): Unmounting Filesystem
> +[  518.026539] XFS (sda): Mounting V5 Filesystem
> +[  518.158574] XFS (sda): Ending clean mount
> +[  518.160484] xfs filesystem being mounted at /mnt supports timestamps until 2038 (0x7fffffff)
> 
> Dunno what this is about, but I'll have a look in the morning...
> 
> --D
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux