Softupdates panic on SMP system

2000-07-09 Thread Ollivier Robert

Hi,

I just got a softupdates related panic on my dual PPro during
buildworld. Sources from July, 4th. Build with -j4.

I'll keep the dump if there's any need.

#0  boot (howto=260) at ../../kern/kern_shutdown.c:303
#1  0xc0177a29 in panic (fmt=0xc0298c54 "from debugger")
at ../../kern/kern_shutdown.c:553
#2  0xc0133195 in db_panic (addr=-1071190004, have_addr=0, count=-1, 
modif=0xc688e84c "") at ../../ddb/db_command.c:433
#3  0xc0133135 in db_command (last_cmdp=0xc02d4994, cmd_table=0xc02d47f4, 
aux_cmd_tablep=0xc0315320) at ../../ddb/db_command.c:333
#4  0xc01331fa in db_command_loop () at ../../ddb/db_command.c:455
#5  0xc01353b7 in db_trap (type=3, code=0) at ../../ddb/db_trap.c:71
#6  0xc026ed51 in kdb_trap (type=3, code=0, regs=0xc688e95c)
at ../../i386/i386/db_interface.c:158
#7  0xc028095c in trap (frame={tf_fs = -964165608, tf_es = -1072103408, 
  tf_ds = -1039466480, tf_edi = 0, tf_esi = 256, tf_ebp = -964105820, 
  tf_isp = -964105848, tf_ebx = -1070871776, tf_edx = -1744831553, 
  tf_ecx = 32, tf_eax = 18, tf_trapno = 3, tf_err = 0, 
  tf_eip = -1071190004, tf_cs = 8, tf_eflags = 598, tf_esp = -1070836221, 
  tf_ss = -1070971726}) at ../../i386/i386/trap.c:552
#8  0xc026f00c in Debugger (msg=0xc02a44b2 "panic") at machine/cpufunc.h:64
#9  0xc0177a20 in panic (fmt=0xc02bcb20 "flush_pagedep_deps: flush failed")
at ../../kern/kern_shutdown.c:551
#10 0xc0243521 in flush_pagedep_deps (pvp=0xc656a380, mp=0xc0d05400, 
diraddhdp=0xc0f08ba4) at ../../ufs/ffs/ffs_softdep.c:4296
#11 0xc0242de8 in softdep_sync_metadata (ap=0xc688eaf0)
at ../../ufs/ffs/ffs_softdep.c:3980
#12 0xc0246f62 in ffs_fsync (ap=0xc688eaf0) at ../../ufs/ffs/ffs_vnops.c:257
#13 0xc023dce8 in ffs_truncate (vp=0xc656a380, length=10752, flags=4, 
cred=0xc0dd6c80, p=0xc6866f60) at vnode_if.h:537
#14 0xc0249d47 in ufs_direnter (dvp=0xc656a380, tvp=0xc66d7980, 
dirp=0xc688ec3c, cnp=0xc688ee90, newdirbp=0x0)
at ../../ufs/ufs/ufs_lookup.c:844
#15 0xc024dcf3 in ufs_makeinode (mode=33188, dvp=0xc656a380, vpp=0xc688ee7c, 
cnp=0xc688ee90) at ../../ufs/ufs/ufs_vnops.c:2163
#16 0xc024b530 in ufs_create (ap=0xc688ed94) at ../../ufs/ufs/ufs_vnops.c:186
#17 0xc024dd7d in ufs_vnoperate (ap=0xc688ed94)
at ../../ufs/ufs/ufs_vnops.c:2287
#18 0xc01ad4ea in vn_open (ndp=0xc688ee68, flagp=0xc688ee34, cmode=420)
at vnode_if.h:106
#19 0xc01a9685 in open (p=0xc6866f60, uap=0xc688ef80)
at ../../kern/vfs_syscalls.c:992
#20 0xc0281385 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, 
  tf_edi = 8, tf_esi = 672435712, tf_ebp = -1077939112, 
  tf_isp = -964104236, tf_ebx = 672369188, tf_edx = 672435712, 
  tf_ecx = 16, tf_eax = 5, tf_trapno = 12, tf_err = 2, tf_eip = 672284676, 
  tf_cs = 31, tf_eflags = 647, tf_esp = -1077939156, tf_ss = 47})
at ../../i386/i386/trap.c:1126
#21 0xc026f71b in Xint0x80_syscall ()
cannot read proc at 0
(kgdb) up 9
#9  0xc0177a20 in panic (fmt=0xc02bcb20 "flush_pagedep_deps: flush failed")
at ../../kern/kern_shutdown.c:551
551 Debugger ("panic");
(kgdb) list
546 printf("lapic.id = %08x\n", lapic.id);
547 #endif
548
549 #if defined(DDB)
550 if (debugger_on_panic)
551 Debugger ("panic");
552 #endif
553 boot(bootopt);
554 }
555
(kgdb) up
#10 0xc0243521 in flush_pagedep_deps (pvp=0xc656a380, mp=0xc0d05400, 
diraddhdp=0xc0f08ba4) at ../../ufs/ffs/ffs_softdep.c:4296
warning: Source file is more recent than executable.

/*
 * If we have failed to get rid of all the dependencies
 * then something is seriously wrong.
 */
if (dap == LIST_FIRST(diraddhdp))
panic("flush_pagedep_deps: flush failed");

(kgdb) print dap
$1 = (struct diradd *) 0xc0e87200
(kgdb) print *dap
$2 = {da_list = {wk_list = {le_next = 0x0, le_prev = 0xc104e9bc}, 
wk_type = 10, wk_state = 32777}, da_pdlist = {le_next = 0xc10dada0, 
le_prev = 0xc0f08ba4}, da_offset = 8088, da_newinum = 104878, da_un = {
dau_previous = 0xc0f08b80, dau_pagedep = 0xc0f08b80}}
(kgdb) print diraddhdp
$3 = (struct diraddhd *) 0xc0f08ba4
(kgdb) print *diraddhdp
$4 = {lh_first = 0xc0e87200}
(kgdb) print *(diraddhdp-lh_first)
$5 = {da_list = {wk_list = {le_next = 0x0, le_prev = 0xc104e9bc}, 
wk_type = 10, wk_state = 32777}, da_pdlist = {le_next = 0xc10dada0, 
le_prev = 0xc0f08ba4}, da_offset = 8088, da_newinum = 104878, da_un = {
dau_previous = 0xc0f08b80, dau_pagedep = 0xc0f08b80}}
(kgdb) print lk
$7 = {lkt_spl = 0, lkt_held = 60344}
(kgdb) print bp
$8 = (struct buf *) 0xc20b2300
(kgdb) print *bp
$9 = {b_io = {bio_cmd = 2, bio_dev = 0xc0d57a80, bio_blkno = 852656, 
bio_offset = 436559872, bio_bcount = 8192, 
bio_data = 0xc2b09000 "ยค\201\001", bio_flags = 4, _bio_buf = 0x0, 
bio_error = 0, bio_resid = 0, bio_done = 0xc01a09ac bufdonebio, 
bio_driver1 = 0x0, 

Re: Softupdates panic on SMP system

2000-07-09 Thread Matthew Jacob


I did some thinking about this, but no real code inspection, on a walk today-
I think what is occurring is that the list of directory updates is getting
refreshed from another process while the first process' list is being written
out. A quick hack would be to make sure this doesn't happen (no -j4 for loose
and gross and incomplete, some kind of worklist ownership token so that when
process A wakes back up and looks at the worklist again it can see whether
it still owns that list (after all, it drops the locks so it do the write).

This is mostly a Kirk issue- he could say much quicker than I about this- I'd
file this as a PR - I could fool around with it a little myself, but later
this week.

-matt






To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message