Date: Tue, 11 Dec 2001 07:00:04 -0800 (PST) From: Stefan.Esser@o-tel-o.de To: freebsd-bugs@FreeBSD.org Subject: Re: kern/32681: Reproducable PANIC in -stable Message-ID: <200112111500.fBBF04J48329@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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/<pid> * (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112111500.fBBF04J48329>