deadlock with &log->l_cilp->xc_ctx_lock semaphone

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

 



Hello,

While testing and rearranging my pquota/gquota code, I stumbled on a
xfs_shutdown() during a mount. But the mount just hung.

I debugged and found that it is in a code path where
&log->l_cilp->xc_ctx_lock is first acquired in read mode and some levels
down the same semaphore is being acquired in write mode causing a
deadlock.

This is the stack:
xfs_log_commit_cil -> acquires &log->l_cilp->xc_ctx_lock in read mode
  xlog_print_tic_res
    xfs_force_shutdown
      xfs_log_force_umount
        xlog_cil_force
          xlog_cil_force_lsn
            xlog_cil_push_foreground
              xlog_cil_push - tries to acquire same semaphore in write mode
-------------------------

Here is the actual stack from /var/log/messages:

-------------------------
schedule+0x29/0x70
rwsem_down_write_failed+0xf5/0x1a0
call_rwsem_down_write_failed+0x13/0x20
? down_write+0x31/0x40
xlog_cil_push+0xd6/0x3e0 [xfs]
? __cond_resched+0x2a/0x40
xlog_cil_force_lsn+0x154/0x160 [xfs]
? __xfs_printk+0x31/0x50 [xfs]
xfs_log_force_umount+0x5c/0x170 [xfs]
xfs_do_force_shutdown+0x6b/0x170 [xfs]
? xlog_print_tic_res+0x112/0x120 [xfs]
xlog_print_tic_res+0x112/0x120 [xfs]
xfs_log_commit_cil+0x336/0x4a0 [xfs]
xfs_trans_commit+0x79/0x270 [xfs]  
xfs_qm_write_sb_changes+0x61/0x90 [xfs]
xfs_qm_mount_quotas+0x82/0x180 [xfs]
xfs_mountfs+0x5f6/0x6b0 [xfs]
xfs_fs_fill_super+0x2af/0x330 [xfs]
mount_bdev+0x1be/0x200
? __free_pages+0x2d/0x40
? xfs_setup_devices+0xa0/0xa0 [xfs]
? selinux_sb_copy_data+0x14a/0x1e0 
xfs_fs_mount+0x15/0x20 [xfs]
mount_fs+0x43/0x1a0
vfs_kern_mount+0x72/0x100
do_mount+0x3e3/0x980
SyS_mount+0x90/0xe0
tracesys+0xdd/0xe2

--------------------------



_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux