xfs
[Top] [All Lists]

BUG 796140 - deadlock on unmount

To: btg@xxxxxxx
Subject: BUG 796140 - deadlock on unmount
From: pv@xxxxxxxxxxxxx (dxm@xxxxxxxxxxxx)
Date: Wed, 12 Jul 2000 21:02:08 -0700 (PDT)
Cc: linux-xfs@xxxxxxxxxxx
Reply-to: sgi.bugs.xfs@xxxxxxxxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
Webexec: webpvsubmit,PvProjectIncident
Webpv: clouds.melbourne.sgi.com
View Incident: 
http://co-op.engr.sgi.com/BugWorks/code/bwxquery.cgi?search=Search&wlong=1&view_type=Bug&wi=796140

Submitter : dxm                       Submitter Domain : engr               
Assigned Engineer : btg               Assigned Domain : sgi.com             
Assigned Group : xfs-linux            Category : software                   
Customer Reported : F                 Priority : 4                          
Project : xfs-linux                   Status : open                         
Description :
I've marked this as minor since I've only seen it once and 
I haven't managed to make it reoccur.

I locked up XFS by doing an xfs_dumplog during on a filesystem
that was being unmounted. 

Looks like xfs_dumplog was closing the device at a vital time
during the unmount. Can these two functions deadlock?

int
xfs_unmountfs_writesb(xfs_mount_t *mp)
{
...
        sbp = xfs_getsb(mp, 0);
...                
        error = xfs_iowait(sbp);
...        
        xfs_buf_relse(sbp);
...
}

***

int fsync_dev(kdev_t dev)
{
...        
        lock_kernel();
        sync_supers(dev);
...
        unlock_kernel();
...
}


Entering kdb (0xc02de000) due to Keyboard Entry
kdb> ps
Task Addr    Pid     Parent  [*] cpu  State    Thread   Command
0xc1152000 00000001 00000000  0  000  stop  0xc1152248 init
0xc1140000 00000002 00000001  0  000  stop  0xc1140248 kswapd
0xc11ee000 00000003 00000001  0  000  stop  0xc11ee248 kflushd
0xc11ec000 00000004 00000001  0  000  stop  0xc11ec248 kupdate
0xc2aa8000 00000352 00000001  0  000  stop  0xc2aa8248 portmap
0xc31ee000 00000429 00000001  0  000  stop  0xc31ee248 rpciod
0xc3dfe000 00000430 00000001  0  000  stop  0xc3dfe248 lockd
0xc2450000 00000456 00000001  0  000  stop  0xc2450248 syslogd
0xc21ba000 00000468 00000001  0  000  stop  0xc21ba248 klogd
0xc247e000 00000485 00000001  0  000  stop  0xc247e248 identd
0xc2108000 00000495 00000485  0  000  stop  0xc2108248 identd
0xc3dc0000 00000496 00000495  0  000  stop  0xc3dc0248 identd
0xc2276000 00000497 00000495  0  000  stop  0xc2276248 identd
0xc2e0a000 00000498 00000495  0  000  stop  0xc2e0a248 identd
0xc24fc000 00000506 00000001  0  000  stop  0xc24fc248 atd
0xc26bc000 00000523 00000001  0  000  stop  0xc26bc248 crond
0xc1d72000 00000540 00000001  0  000  stop  0xc1d72248 inetd
0xc2e7e000 00000650 00000001  0  000  stop  0xc2e7e248 pmcd
0xc2756000 00000847 00000001  0  000  stop  0xc2756248 pmlogger
0xc2cd4000 00000873 00000001  0  000  stop  0xc2cd4248 minilogd
0xc2170000 00000885 00000001  0  000  stop  0xc2170248 login
0xc1e64000 00000886 00000001  0  000  stop  0xc1e64248 login
more> 
0xc27be000 00000887 00000001  0  000  stop  0xc27be248 login
0xc20b8000 00000888 00000001  0  000  stop  0xc20b8248 mingetty
0xc1e7a000 00000889 00000001  0  000  stop  0xc1e7a248 mingetty
0xc207e000 00000890 00000001  0  000  stop  0xc207e248 mingetty
0xc2032000 00000908 00000885  0  000  stop  0xc2032248 tcsh
0xc2aa0000 00000996 00000908  0  000  stop  0xc2aa0248 xfscrash
0xc05dc000 00001071 00000001  0  000  stop  0xc05dc248 pagebuf_daemon
0xc05da000 00001072 00000001  0  000  stop  0xc05da248 page_daemon
0xc3e90000 00002450 00000886  0  000  stop  0xc3e90248 tcsh
0xc3eec000 00002971 00000996  0  000  stop  0xc3eec248 umount
0xc3f02000 00002972 00002450  0  000  stop  0xc3f02248 xfs_logprint
0xc260a000 00002974 00000887  0  000  stop  0xc260a248 tcsh
kdb> btp 2972
    EBP       EIP         Function(args)
0xc3f03ea0 0xc0113612 schedule+0x2b6 (0xc3063000, 0x306, 0xc11da414)
                               kernel .text 0xc0100000 0xc011335c 0xc01137c0
0xc3f03ef0 0xc0134397 __wait_on_super+0x173 (0xc3063000)
                               kernel .text 0xc0100000 0xc0134224 0xc0134400
0xc3f03f04 0xc013443b sync_supers+0x3b (0x306)
                               kernel .text 0xc0100000 0xc0134400 0xc0134494
0xc3f03f14 0xc012e001 fsync_dev+0x19 (0x306)
                               kernel .text 0xc0100000 0xc012dfe8 0xc012e01c
0xc3f03f3c 0xc01375ed blkdev_put+0x85 (0xc11da3e0, 0x0)
                               kernel .text 0xc0100000 0xc0137568 0xc01376a8
0xc3f03f4c 0xc01376bc blkdev_close+0x14 (0xc3119740, 0xc3de0e40)
                               kernel .text 0xc0100000 0xc01376a8 0xc01376c0
0xc3f03f6c 0xc0133592 __fput+0x2a (0xc3de0e40, 0xc3de0e40)
                               kernel .text 0xc0100000 0xc0133568 0xc01335ec
0xc3f03f80 0xc01335ff _fput+0x13 (0xc3de0e40)
                               kernel .text 0xc0100000 0xc01335ec 0xc0133630
0xc3f03f94 0xc01326b9 filp_close+0x51 (0xc3de0e40, 0xc1e6a3a0, 0xc3f02000, 
0x4000ae60)
                               kernel .text 0xc0100000 0xc0132668 0xc01326c4
0xc3f03fac 0xc0132710 do_close+0x4c (0x4, 0x1)
                               kernel .text 0xc0100000 0xc01326c4 0xc0132720
0xc3f03fbc 0xc013272e sys_close+0xe (0x4, 0x1260, 0x8057760, 0x4000ae60, 
0xbffffac4)
                               kernel .text 0xc0100000 0xc0132720 0xc0132734
more> q       
kdb> btp 2971
    EBP       EIP         Function(args)
0xc3eeddfc 0xc0113612 schedule+0x2b6 (0xc06770a4, 0xc0677020, 0xc3062c00)
                               kernel .text 0xc0100000 0xc011335c 0xc01137c0
0xc3eede50 0xc0107cb5 __down+0x16d
                               kernel .text 0xc0100000 0xc0107b48 0xc0107d44
0xc3eede64 0xc0107fbf __down_failed+0xb (0xc203a600, 0xc0677020, 0xc3062c00, 
0xc3eede98, 0xc486c172)
                               kernel .text 0xc0100000 0xc0107fb4 0xc0107fc8
           0xc48102b4 [pagebuf].text.lock+0xf
                               pagebuf .text.lock 0xc48102a5 0xc48102a5 
0xc4810300
0xc3eede78 0xc480c09f [pagebuf]pagebuf_iowait+0xb3 (0xc0677020, 0xc3062c00, 
0xc0677020)
                               pagebuf .text 0xc480a060 0xc480bfec 0xc480c0c4
0xc3eede98 0xc486c172 [xfs]xfs_unmountfs_writesb+0xd2 (0xc3062c00)
                               xfs .text 0xc4816060 0xc486c0a0 0xc486c1b8
0xc3eedeb4 0xc486bfa6 [xfs]xfs_unmountfs+0x56 (0xc3062c00, 0x3, 0xc48aad00)
                               xfs .text 0xc4816060 0xc486bf50 0xc486c054
0xc3eedee4 0xc48781a4 [xfs]xfs_unmount+0x1fc (0xc3062c00, 0x0, 0xc48aad00)
                               xfs .text 0xc4816060 0xc4877fa8 0xc48781b8
0xc3eedf04 0xc4884938 [xfs]fs_dounmount+0x7c (0xc3062c00, 0x0, 0x0, 0xc48aad00, 
0xc337a540)
                               xfs .text 0xc4816060 0xc48848bc 0xc4884954
0xc3eedf34 0xc488cfe1 [xfs]linvfs_put_super+0x59 (0xc3063000)
                               xfs .text 0xc4816060 0xc488cf88 0xc488d060
0xc3eedf4c 0xc0134d9e kill_super+0x56 (0xc3063000, 0x0, 0xc3d23d20, 0xc3d23d20, 
0xffffffff)
                               kernel .text 0xc0100000 0xc0134d48 0xc0134e38
more> 
0xc3eedf6c 0xc0135171 do_umount+0x1a5 (0xc3d23d20, 0x0, 0x0)
                               kernel .text 0xc0100000 0xc0134fcc 0xc0135180
0xc3eedfac 0xc01352bc sys_umount+0x13c (0x8052dd8, 0x0)
                               kernel .text 0xc0100000 0xc0135180 0xc0135324
0xc3eedfbc 0xc0135332 sys_oldumount+0xe (0x8052dd8, 0x78, 0x8052e08, 0x8052dd9, 
0x804d3e0)
                               kernel .text 0xc0100000 0xc0135324 0xc0135338
           0xc0109968 system_call+0x34
                               kernel .text 0xc0100000 0xc0109934 0xc010996c

<Prev in Thread] Current Thread [Next in Thread>
  • BUG 796140 - deadlock on unmount, dxm@xxxxxxxxxxxx <=