NetBSD-Bugs archive

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

Re: kern/41417: WAPBL: hang on tstile



The following reply was made to PR kern/41417; it has been noted by GNATS.

From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/41417: WAPBL: hang on tstile
Date: Sun, 3 Jul 2011 22:33:55 +0200

 I've reproduced the problem with a recent netbsd-5 kernel, with:
 while (1)
 rsync -avH --delete --delete-excluded --delete-after --delay-updates --force 
--stats --partial rsync://rsync.fr.netbsd.org/NetBSD/NetBSD-release-5-0/src .
 rsync -avH --delete --delete-excluded --delete-after --delay-updates --force 
--stats --partial rsync://rsync.fr.netbsd.org/NetBSD/NetBSD-release-4-0/src .
 end
 
 on a dual-core machine (with 8Gb RAM but I don't think it matters; I've
 reproduced it on a i386 with 1Gb RAM too).
 637     1            rsync   netbsd   38 tstile       ffff80006a9903a8
 572     1            rsync   netbsd   35 tstile       ffff8000885dae48
 db{0}> tr/t 0t637
 trace: pid 637 lid 1 at 0xffff80005a3f0710
 sleepq_block() at netbsd:sleepq_block+0xec
 turnstile_block() at netbsd:turnstile_block+0x2e7
 rw_vector_enter() at netbsd:rw_vector_enter+0x28c
 vlockmgr() at netbsd:vlockmgr+0xf6
 VOP_LOCK() at netbsd:VOP_LOCK+0x64
 vn_lock() at netbsd:vn_lock+0xd9
 wapbl_ufs_rename() at netbsd:wapbl_ufs_rename+0x5ab
 ufs_rename() at netbsd:ufs_rename+0x39
 VOP_RENAME() at netbsd:VOP_RENAME+0x75
 do_sys_rename() at netbsd:do_sys_rename+0x57d
 syscall() at netbsd:syscall+0xb6
 db{0}> tr/t 0t572
 trace: pid 572 lid 1 at 0xffff80005a39a650
 sleepq_block() at netbsd:sleepq_block+0xec
 turnstile_block() at netbsd:turnstile_block+0x2e7
 rw_vector_enter() at netbsd:rw_vector_enter+0x28c
 vlockmgr() at netbsd:vlockmgr+0xf6
 VOP_LOCK() at netbsd:VOP_LOCK+0x64
 vn_lock() at netbsd:vn_lock+0xd9
 cache_lookup() at netbsd:cache_lookup+0x201
 ufs_lookup() at netbsd:ufs_lookup+0xcd
 VOP_LOOKUP() at netbsd:VOP_LOOKUP+0x80
 lookup() at netbsd:lookup+0x34b
 namei() at netbsd:namei+0x1a4
 do_sys_stat() at netbsd:do_sys_stat+0x44
 sys___lstat30() at netbsd:sys___lstat30+0x2a
 syscall() at netbsd:syscall+0xb6
 
 wapbl_ufs_rename() at netbsd:wapbl_ufs_rename+0x5ab is
 (gdb) l *(wapbl_ufs_rename+0x5ab)
 0xffffffff8028112b is in wapbl_ufs_rename 
(/home/src/src-5/src/sys/ufs/ufs/ufs_wapbl.c:352).
 347                     if (fdvp == tvp) {
 348                             error = doingdirectory ? ENOTEMPTY : EISDIR;
 349                             goto out;
 350                     }
 351                     vn_lock(fdvp, LK_EXCLUSIVE | LK_RETRY);
 352                     if ((error = relookup(fdvp, &fvp, fcnp))) {
 353                             vput(fdvp);
 354                             vrele(ap->a_fvp);
 355                             goto out2;
 
 (it's probably line 351, gdb is usually off by one in this situation
 show lock 0xffff80006a9903a8
 lock address : 0xffff80006a9903a8 type     :     sleep/adaptive
 initialized  : 0xffffffff80354f36
 shared holds :                  0 exclusive:                  1
 shares wanted:                  0 exclusive:                  2
 current cpu  :                  0 last held:                  0
 current lwp  : 0xffff80005a0b17c0 last held: 0xffff80005a3a17e0
 last locked  : 0xffffffff80352d12 unlocked : 0xffffffff80352d9a
 owner/count  : 0xffff80005a3a17e0 flags    : 0x000000000000000f
 
 Turnstile chain at 0xffffffff807e3be0.
 => Turnstile at 0xffff800059b95cc8 (wrq=0xffff800059b95ce8, 
rdq=0xffff800059b95c
 f8).
 => 0 waiting readers:
 => 2 waiting writers: 0xffff80005a3ba420 0xffff80005a3ba800
 
 db{0}> tr/a 0xffff80005a3a17e0
 trace: pid 572 lid 1 at 0xffff80005a39a650
 sleepq_block() at netbsd:sleepq_block+0xec
 turnstile_block() at netbsd:turnstile_block+0x2e7
 rw_vector_enter() at netbsd:rw_vector_enter+0x28c
 vlockmgr() at netbsd:vlockmgr+0xf6
 VOP_LOCK() at netbsd:VOP_LOCK+0x64
 vn_lock() at netbsd:vn_lock+0xd9
 cache_lookup() at netbsd:cache_lookup+0x201
 ufs_lookup() at netbsd:ufs_lookup+0xcd
 VOP_LOOKUP() at netbsd:VOP_LOOKUP+0x80
 lookup() at netbsd:lookup+0x34b
 namei() at netbsd:namei+0x1a4
 do_sys_stat() at netbsd:do_sys_stat+0x44
 sys___lstat30() at netbsd:sys___lstat30+0x2a
 syscall() at netbsd:syscall+0xb6
 
 db{0}> show lock 0xffff8000885dae48                      
 lock address : 0xffff8000885dae48 type     :     sleep/adaptive
 initialized  : 0xffffffff80354f36
 shared holds :                  0 exclusive:                  1
 shares wanted:                  0 exclusive:                  1
 current cpu  :                  0 last held:                  1
 current lwp  : 0xffff80005a0b17c0 last held: 0xffff80005a3ba800
 last locked  : 0xffffffff80352d12 unlocked : 0xffffffff80352d9a
 owner/count  : 0xffff80005a3ba800 flags    : 0x000000000000000f
 
 Turnstile chain at 0xffffffff807e3660.
 => Turnstile at 0xffff800059b959c8 (wrq=0xffff800059b959e8, 
rdq=0xffff800059b959
 f8).
 => 0 waiting readers:
 => 1 waiting writers: 0xffff80005a3a17e0
 db{0}> tr/a 0xffff80005a3ba800
 trace: pid 637 lid 1 at 0xffff80005a3f0710
 sleepq_block() at netbsd:sleepq_block+0xec
 turnstile_block() at netbsd:turnstile_block+0x2e7
 rw_vector_enter() at netbsd:rw_vector_enter+0x28c
 vlockmgr() at netbsd:vlockmgr+0xf6
 VOP_LOCK() at netbsd:VOP_LOCK+0x64
 vn_lock() at netbsd:vn_lock+0xd9
 wapbl_ufs_rename() at netbsd:wapbl_ufs_rename+0x5ab
 ufs_rename() at netbsd:ufs_rename+0x39
 VOP_RENAME() at netbsd:VOP_RENAME+0x75
 do_sys_rename() at netbsd:do_sys_rename+0x57d
 syscall() at netbsd:syscall+0xb6
 
 db{0}> show lock 0xffff80006a9903a8
 lock address : 0xffff80006a9903a8 type     :     sleep/adaptive
 initialized  : 0xffffffff80354f36
 shared holds :                  0 exclusive:                  1
 shares wanted:                  0 exclusive:                  2
 current cpu  :                  0 last held:                  0
 current lwp  : 0xffff80005a0b17c0 last held: 0xffff80005a3a17e0
 last locked  : 0xffffffff80352d12 unlocked : 0xffffffff80352d9a
 owner/count  : 0xffff80005a3a17e0 flags    : 0x000000000000000f
 
 Turnstile chain at 0xffffffff807e3be0.
 => Turnstile at 0xffff800059b95cc8 (wrq=0xffff800059b95ce8, 
rdq=0xffff800059b95c
 f8).
 => 0 waiting readers:
 => 2 waiting writers: 0xffff80005a3ba420 0xffff80005a3ba800
 db{0}> tr/a 0xffff80005a3a17e0
 trace: pid 572 lid 1 at 0xffff80005a39a650
 
 so it's really a deadlock between pids 572 and 637 (i.e. the 2 rsync processes)
 
 Both locks were held by vlockmgr so it's not really that usefull.
 
 -- 
 Manuel Bouyer <bouyer%antioche.eu.org@localhost>
      NetBSD: 26 ans d'experience feront toujours la difference
 --
 


Home | Main Index | Thread Index | Old Index