From owner-freebsd-bugs Thu Jul 29 9:30: 7 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id AF23C150D7 for ; Thu, 29 Jul 1999 09:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id JAA58038; Thu, 29 Jul 1999 09:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 2A33914C2D; Thu, 29 Jul 1999 09:27:40 -0700 (PDT) Message-Id: <19990729162740.2A33914C2D@hub.freebsd.org> Date: Thu, 29 Jul 1999 09:27:40 -0700 (PDT) From: peter@holm.cc To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: kern/12869: panic: softdep_flushfiles: looping Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12869 >Category: kern >Synopsis: panic: softdep_flushfiles: looping >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jul 29 09:30:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Peter Holm >Release: Current Sat Jul 24 18:39:38 1999 >Organization: Holm Computer Consulting >Environment: FreeBSD 4.0-CURRENT #0: Sat Jul 24 15:08:52 CEST 1999 root@current.risby.dk:/usr/src/sys/compile/PHO >Description: I found a problem with ffs: Script started on Sat Jul 24 18:39:38 1999 bastion# kermit C-Kermit 6.0.192, 6 Sep 96, for FreeBSD Copyright (C) 1985, 1996, Trustees of Columbia University in the City of New York. Default file-transfer mode is TEXT Type ? or HELP for help. [/usr/tmp] C-Kermit>connect Connecting to /dev/cuaa1, speed 9600. The escape character is Ctrl-V (ASCII 22, SYN) Type the escape character followed by C to get back, or followed by ? to see other options. data=0x266d4+0x20764 syms=[0x4+0x279f0+0x4+0x2a357 Hit [Enter] to boot immediately, or any other key for command prompt. Booting [kernel] in 9 seconds... Type '?' for a list of commands, 'help' for more detailed help. disk1s1a:> boot -s Copyright (c) 1992-1999 The FreeBSD Project. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. FreeBSD 4.0-CURRENT #0: Sat Jul 24 15:08:52 CEST 1999 root@current.risby.dk:/usr/src/sys/compile/PHO Timecounter "i8254" frequency 1193182 Hz CPU: AMD-K6(tm) 3D processor (400.91-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x58c Stepping = 12 Features=0x8021bf AMD Features=0x80000800 real memory = 134201344 (131056K bytes) avail memory = 126226432 (123268K bytes) Preloaded elf kernel "kernel" at 0xc03a4000. K6-family MTRR support enabled (2 registers) : changing root device to wd0s1a Enter full pathname of shell or RETURN for /bin/sh: # fsck -p /dev/rwd0s1a: FILESYSTEM CLEAN; SKIPPING CHECKS /dev/rwd0s1a: clean, 72609 free (217 frags, 9049 blocks, 0.2% fragmentation) /dev/rwd0s3f: FILESYSTEM CLEAN; SKIPPING CHECKS /dev/rwd0s3f: clean, 917227 free (299 frags, 114616 blocks, 0.0% fragmentation) /dev/rwd0s3a: FILESYSTEM CLEAN; SKIPPING CHECKS /dev/rwd0s3a: clean, 435121 free (129 frags, 54374 blocks, 0.0% fragmentation) /dev/rwd0s3d: FILESYSTEM CLEAN; SKIPPING CHECKS /dev/rwd0s3d: clean, 4116873 free (25633 frags, 511405 blocks, 0.6% fragmentation) /dev/rwd0s3g: FILESYSTEM CLEAN; SKIPPING CHECKS /dev/rwd0s3g: clean, 281787 free (9123 frags, 34083 blocks, 1.8% fragmentation) /dev/rwd0s3h: FILESYSTEM CLEAN; SKIPPING CHECKS /dev/rwd0s3h: clean, 730667 free (643 frags, 91253 blocks, 0.1% fragmentation) /dev/rwd0s3e: FILESYSTEM CLEAN; SKIPPING CHECKS /dev/rwd0s3e: clean, 855529 free (193 frags, 106917 blocks, 0.0% fragmentation) # mount -u / # mount /usr # mount /dev/wd0s1a on / (local, writes: sync 2 async 0) /dev/wd0s3d on /usr (local, soft-updates, writes: sync 2 async 0) # cd /usr/tmp/stress/dir # cat dir.c /* $Id$ */ #include #include #include #include #include #include #include void error(char *op, char* arg, char* file, int line) { fprintf(stderr,"%s. %s. %s (%s:%d)\n", op, arg, sys_errlist[errno], file, line); } void mkDir(char *path, int level) { char newPath[4096]; /* printf("mkdir(%s)\n", path);*/ if (mkdir(path, 0770) == -1) { error("mkdir", path, __FILE__, __LINE__); exit(2); } if (level > 1) { sprintf(newPath,"%s/d%d", path, level-1); mkDir(newPath, level-1); } } void rmDir(char *path, int level) { char newPath[4096]; if (level > 1) { sprintf(newPath,"%s/d%d", path, level-1); rmDir(newPath, level-1); } /* printf("rmdir(%s):%d\n", path, level);*/ if (rmdir(path) == -1) { error("unlink", path, __FILE__, __LINE__); exit(2); } } int main(int argc, char **argv) { int fd, i, levels, pid; char path[128]; if (argc != 2) { fprintf(stderr, "Usage: %s \n", argv[0]); exit(1); } levels = 10; sscanf(argv[1], "%d", &levels); if (levels > 210) levels = 210; pid = getpid(); umask(0); sprintf(path,"p%05d.d%04d", pid, levels); mkDir(path, levels); rmDir(path, levels); return 0; } # ./dir 200 # sync;sync;sync # reboot syncing disks... done panic: softdep_flushfiles: looping Debugger("panic") Stopped at Debugger+0x37: movl $0,in_Debugger db> trace Debugger(c02b22db) at Debugger+0x37 panic(c02ef9ef,c0ddda00,0,c9020620,c99d5e94) at panic+0x74 softdep_flushfiles(c0ddda00,2,c9020620,c0ddda00,0) at softdep_flushfiles+0x164 ffs_unmount(c0ddda00,80000,c9020620,c0ddda00,0) at ffs_unmount+0x2d dounmount(c0ddda00,80000,c9020620,c36cb2a0,0) at dounmount+0xa6 vfs_unmountall(c9020620,c031215c,0,0,0) at vfs_unmountall+0x46 boot(0,c99d5fa0,c02687b6,c9020620,c99d5f80) at boot+0x23f reboot(c9020620,c99d5f80,2,0,0) at reboot+0x1c syscall(2f,2f,2f,0,0) at syscall+0x182 Xint0x80_syscall() at Xint0x80_syscall+0x26 db> >How-To-Repeat: Run the test program, reboot. >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message