From owner-freebsd-bugs Tue Dec 11 7: 0: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3126537B419 for ; Tue, 11 Dec 2001 07:00:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBBF04J48329; Tue, 11 Dec 2001 07:00:04 -0800 (PST) (envelope-from gnats) Date: Tue, 11 Dec 2001 07:00:04 -0800 (PST) Message-Id: <200112111500.fBBF04J48329@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Stefan.Esser@o-tel-o.de Subject: Re: kern/32681: Reproducable PANIC in -stable Reply-To: Stefan.Esser@o-tel-o.de Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/32681; it has been noted by GNATS. From: Stefan.Esser@o-tel-o.de To: freebsd-gnats-submit@FreeBSD.org Cc: Stefan.Esser@Arcor.Net, se@freebsd.org Subject: Re: kern/32681: Reproducable PANIC in -stable Date: Tue, 11 Dec 2001 16:00:45 +0100 Further debugging reveals, that the panic is caused by PROCFS (on my -c= urrent box running either an non-SMP or SMP kernel). In order to check for the presence of some process %PID%, nessusd perfo= rms an opendir("/proc/%PID%"), which can lead to a panic in fstafs(), if the corresponding process just finishes just before the call to fstatfs ...= /* * First method : attempt to open /proc/ * (we first check that we can open /proc/ourpid because * we may run on some weird system) */ sprintf(procname, "/proc/%d", getpid()); dir =3D opendir(procname); if(dir) /* The /proc trick worked for us */ { closedir(dir); sprintf(procname, "/proc/%d", pid); dir =3D opendir(procname); if(dir){ closedir(dir); return 1; } else return 0; } Truss output caused by opendir("/proc/%PID%"). Seems that either the ar= gument printing does not work for the specific system calls (or there is some = other problem), but the opendir call had been issued with a valid directory n= ame (see debugging output below): stat("D=F2=BF=BFqyp(=A8=ACr(=FFt",0xbfbff004) =3D 0 (0x0= ) open("qyp(=A8=ACr(=FFt",4,027757771104) =3D 13 (0xd) fstat(13,0xbfbff004) =3D 0 (0x0) fcntl(0xd,0x2,0x1) =3D 0 (0x0) fstatfs(0xd,0xbfbfef04) =3D 0 (0x0) Debugging output: 905 sprintf(procname, "/proc/%d", getpid()); (gdb) getpid() =3D 724 (0x2d4) 906 dir =3D opendir(procname); (gdb) 907 if(dir) /* The /proc trick worked for us */ (gdb) p procname $7 =3D "/proc/724\000" (gdb) s 909 closedir(dir); (gdb) close(13) =3D 0 (0x0) 910 sprintf(procname, "/proc/%d", pid); = To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message