> i'm running 4.6-STABLE, SMP kernel. dmesg attached:
> 
> OpenBSD 4.6 (build) #5: *Thu Nov 12 10:28:47 EST 2009*

Update your tree, rebuild the kernel.

There were a few cases where fstat(1) would crash my systems as well.

http://marc.info/?l=openbsd-cvs&m=125971073002018&w=2
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/kern/kern_sysctl.c#rev1.175.4.1

It appears to fix things, was commited on December 1st.

-Bryan.

--- src/sys/kern/kern_sysctl.c  2009/06/15 18:59:45     1.175
+++ src/sys/kern/kern_sysctl.c  2009/12/01 23:37:51     1.175.4.1
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kern_sysctl.c,v 1.175 2009/06/15 17:59:45 deraadt Exp $       
*/
+/*     $OpenBSD: kern_sysctl.c,v 1.175.4.1 2009/12/01 23:37:51 william Exp $   
*/
 /*     $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $     */

 /*-
@@ -1086,6 +1086,8 @@ fill_file2(struct kinfo_file2 *kf, struct file *fp, st
                kf->so_pcb = PTRTOINT64(so->so_pcb);
                kf->so_protocol = so->so_proto->pr_protocol;
                kf->so_family = so->so_proto->pr_domain->dom_family;
+               if (!so->so_pcb)
+                       break;
                switch (kf->so_family) {
                case AF_INET: {
                        struct inpcb *inpcb = so->so_pcb;

Reply via email to