Re: UFS snapshot deadlocks

From: Jun Kuriyama <kuriyama_at_imgsrc.co.jp>
Date: Sun, 06 Jun 2004 22:33:16 +0900
At Fri, 4 Jun 2004 15:06:55 +0000 (UTC),
Frode Nordahl wrote:
> The following is a 100% reproducible procedure to make it happen:
> 
> Running 5.2-CURRENT #0: Fri Jun  4 15:07:54 CEST 2004
> 
> tty1:
> while (1)
> 	ls -la /usr/.snap
> end
> 
> tty2:
> dump -0af /some/where -C 32 -L /dev/ad0s1f

I can also reproduce this with above steps.

FWIW, I did them with debug.snapdebug=1.  It looks we are in the deadlock between mksnap_ffs and ls...

----- 
ffs_snapgone: lost snapshot vnode 1346
ffs_snapshot: busy vnode: 0xc1354924: tag ufs, type VDIR, usecount 1, writecount 0, refcount 1, flags (VV_ROOT|VV_OBJBUF), lock type ufs: EXCL (count 1) by thread 0xc12ff420 (pid 870)
        ino 2, on dev ad0s1e (4, 16)
### go to debugger ###
db> ps
  pid   proc     uarea   uid  ppid  pgrp  flag   stat  wmesg    wchan  cmd
  874 c12fec08 c9e16000 1021   562   874 0004002 [SLPQ ufs 0xc1356bd8][SLP] ls
  870 c13f1370 ca01a000    0   869   866 0004002 [SLPQ ufs 0xc14ad3b8][SLP] mksnap_ffs
...
db> show lockedvnods
Locked vnodes
0xc14ad30c: tag ufs, type VDIR, usecount 3, writecount 0, refcount 2, flags (VV_OBJBUF), lock type ufs: EXCL (count 1) by thread 0xc12ff9a0 (pid 874) with 1 pending
        ino 3, on dev ad0s1e (4, 16)
0xc1356b2c: tag ufs, type VREG, usecount 2, writecount 0, refcount 16, lock type ufs: EXCL (count 1) by thread 0xc12ff420 (pid 870) with 1 pending
        ino 1347, on dev ad0s1e (4, 16)


-- 
Jun Kuriyama <kuriyama_at_imgsrc.co.jp> // IMG SRC, Inc.
             <kuriyama_at_FreeBSD.org> // FreeBSD Project
Received on Sun Jun 06 2004 - 04:33:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:56 UTC