Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 May 2002 12:25:17 -0700 (PDT)
From:      Paul Herman <pherman@frenchfries.net>
To:        freebsd-stable@FreeBSD.ORG
Subject:   panic: softdep_disk_write_complete: lock is held
Message-ID:  <20020517115857.Y1458-100000@mammoth.eat.frenchfries.net>

next in thread | raw e-mail | index | archive | help

In 4.6-PRERELEASE I have found a reproducible panic on my machine.
All I need to do is pull a large file via FTP, extract a large tar
file, and run XFree86 4.2.0 at the same time.  (X using the agp.ko
on a i810E controller.)

Any FFS guys out there have idea why acquire_lock is failing here?
*ip in softdep_update_inodeblock() I've tracked down to be
/dev/ttyp0, if that helps any.

(kgdb) bt 8
#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487
#1  0xc01ecfb3 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:316
#2  0xc01ed3d8 in poweroff_wait (junk=0xc03d5600, howto=-1056611328)
    at /usr/src/sys/kern/kern_shutdown.c:595
#3  0xc02f04c2 in acquire_lock (lk=0xc04259bc)
    at /usr/src/sys/ufs/ffs/ffs_softdep.c:261
#4  0xc02f45dc in softdep_update_inodeblock (ip=0xc1056400, bp=0xc377d5dc,
    waitfor=0) at /usr/src/sys/ufs/ffs/ffs_softdep.c:3813
#5  0xc02ef611 in ffs_update (vp=0xccdedd40, waitfor=0)
    at /usr/src/sys/ufs/ffs/ffs_inode.c:106
#6  0xc02f7932 in ffs_sync (mp=0xc1006400, waitfor=2, cred=0xc0b2a580,
    p=0xc0478300) at /usr/src/sys/ufs/ffs/ffs_vfsops.c:1022
#7  0xc021c72f in sync (p=0xc0478300, uap=0x0)
    at /usr/src/sys/kern/vfs_syscalls.c:576

(kgdb) up 3
#3  0xc02f04c2 in acquire_lock (lk=0xc04259bc)
    at /usr/src/sys/ufs/ffs/ffs_softdep.c:261
261                             panic("softdep_lock: locking against myself");
(kgdb) list
256
257             if (lk->lkt_held != -1) {
258                     holder = lk->lkt_held;
259                     FREE_LOCK(lk);
260                     if (holder == CURPROC->p_pid)
261                             panic("softdep_lock: locking against myself");
262                     else
263                             panic("softdep_lock: lock held by %d", holder);
264             }
265             lk->lkt_spl = splbio();
(kgdb) up
#4  0xc02f45dc in softdep_update_inodeblock (ip=0xc1056400,
bp=0xc377d5dc,
    waitfor=0) at /usr/src/sys/ufs/ffs/ffs_softdep.c:3813
3813            ACQUIRE_LOCK(&lk);
(kgdb) print lk
$2 = {lkt_spl = 6867008, lkt_held = -1}
(kgdb) print *ip
$4 = {i_lock = {lk_interlock = {lock_data = 0}, lk_flags = 64,
    lk_sharecount = 0, lk_waitcount = 0, lk_exclusivecount = 0, lk_prio = 8,
    lk_wmesg = 0xc03d7062 "inode", lk_timo = 6, lk_lockholder = -1}, i_hash = {
    le_next = 0x0, le_prev = 0xc0fde0c4}, i_vnode = 0xccdedd40,
  i_devvp = 0xcc911ec0, i_flag = 128, i_dev = 0xc100be80, i_number = 19505,
  i_effnlink = 1, inode_u = {fs = 0xc100c000, e2fs = 0xc100c000}, i_dquot = {
    0x0, 0x0}, i_modrev = 15157445577, i_lockf = 0x0, i_count = 0,
  i_endoff = 0, i_diroff = 0, i_offset = 0, i_ino = 0, i_reclen = 0,
  i_spare = {0, 0, 0}, i_dirhash = 0x0, i_din = {di_mode = 8576, di_nlink = 1,
    di_u = {oldids = {0, 0}, inumber = 0}, di_size = 0, di_atime = 1021620958,
    di_atimensec = 0, di_mtime = 1021620983, di_mtimensec = 0,
    di_ctime = 1021620983, di_ctimensec = 0, di_db = {1280,
      0 <repeats 11 times>}, di_ib = {0, 0, 0}, di_flags = 0, di_blocks = 0,
    di_gen = 2124500864, di_uid = 1000, di_gid = 4, di_spare = {0, 0}}}
(kgdb) print *bp
$6 = {b_hash = {le_next = 0x0, le_prev = 0xc3793a80}, b_vnbufs = {
    tqe_next = 0xc37c4354, tqe_prev = 0xc37798f0}, b_freelist = {
    tqe_next = 0xc377bfd0, tqe_prev = 0xc377ab20}, b_act = {
    tqe_next = 0xc377bfd0, tqe_prev = 0xc0fd20a4}, b_flags = 537006112,
  b_qindex = 0, b_xflags = 2 '\002', b_lock = {lk_interlock = {lock_data = 0},
    lk_flags = 1024, lk_sharecount = 0, lk_waitcount = 0,
    lk_exclusivecount = 1, lk_prio = 20, lk_wmesg = 0xc03bde90 "bufwait",
    lk_timo = 0, lk_lockholder = 6}, b_error = 0, b_bufsize = 16384,
  b_runningbufspace = 0, b_bcount = 16384, b_resid = 0, b_dev = 0xc100be80,
  b_data = 0xc38c3000 " !\002", b_kvabase = 0xc38c3000 " !\002",
  b_kvasize = 16384, b_lblkno = 377088, b_blkno = 377088,
  b_offset = 193069056, b_iodone = 0, b_iodone_chain = 0x0, b_vp = 0xcc911ec0,
  b_dirtyoff = 0, b_dirtyend = 0, b_rcred = 0x0, b_wcred = 0x0,
  b_pblkno = 3996064, b_saveaddr = 0x0, b_driver1 = 0x0, b_driver2 = 0x0,
  b_caller1 = 0x0, b_caller2 = 0x0, b_pager = {pg_spc = 0x0, pg_reqpage = 0},
  b_cluster = {cluster_head = {tqh_first = 0x0, tqh_last = 0x0},
    cluster_entry = {tqe_next = 0x0, tqe_prev = 0x0}}, b_pages = {0xc08be3f4,
    0xc08c9fb0, 0xc08bc66c, 0xc08c7328, 0x0 <repeats 28 times>}, b_npages = 4,
  b_dep = {lh_first = 0x0}, b_chain = {parent = 0x0, count = 0}}

-Paul.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020517115857.Y1458-100000>