When I type "netstat -si" in xterm on my physical machine, system crash. The user is not root, but in group "wheel". After restart the system, I see the line: "savecore: reboot after panic: page fault" And then I try it again in a idle system, and crash again. It is correct in VirtualBox in which FreeBSD 10.0-RELEASE-p1 runs. How-To-Repeat: I start the system, and launch xterm, and then type "netstat -si" in it, and type enter, and the system freeze.(maybe it is dumping the kernel) After 5-10 seconds, system restart automatically.
I have the same problem: I rebooted three machines by this command and stopped. One is FreeBSD 11.0-CURRENT r262846 And two of them are FreeBSD 10.0-RELEASE-p1
Same problem here: 10.0-STABLE r270206M
Confirmed running as 'nobody' or 'root' on 10-STABLE r268824 but unable to reproduce on 9-STABLE r268824.
Could someone who's seeing this problem please provide a backtrace from the crash, or even better, a copy of core.txt?
Created attachment 146101 [details] core.txt
If necessary I can upload my vmcore + /boot/kernel/kernel
(In reply to Danilo Egea Gondolfo from comment #6) > If necessary I can upload my vmcore + /boot/kernel/kernel That would be useful, thanks. I assumed it was crashing while handling SIOCGIFSTAT_*, but I'm not sure why in6_control() doesn't appear in the trace.
vmcore: https://people.freebsd.org/~danilo/tmp/vmcore.6.xz kernel: https://people.freebsd.org/~danilo/tmp/kernel.tar.xz
(In reply to Danilo Egea Gondolfo from comment #8) > vmcore: https://people.freebsd.org/~danilo/tmp/vmcore.6.xz > kernel: https://people.freebsd.org/~danilo/tmp/kernel.tar.xz Thanks. Looks like the problem is caused by executing the SIOCGIFSTAT_IN6 ioctl on pflog0. So kldloading pflog.ko and running netstat -si allows me to reproduce the problem.
Created attachment 146138 [details] proposed patch Here's a proposed fix for the crash, which is the result of a missed check in r253841.
A commit references this bug: Author: markj Date: Fri Aug 22 19:21:09 UTC 2014 New revision: 270348 URL: http://svnweb.freebsd.org/changeset/base/270348 Log: Add some missing checks for unsupported interfaces (e.g. pflog(4)) when handling ioctls. While here, remove duplicated checks for a NULL ifp in in6_control(): this check is already done near the beginning of the function. PR: 189117 Reviewed by: hrs MFC after: 2 weeks Changes: head/sys/netinet6/in6.c head/sys/netinet6/scope6.c head/sys/netinet6/scope6_var.h
A commit references this bug: Author: markj Date: Sat Sep 6 04:33:38 UTC 2014 New revision: 271184 URL: http://svnweb.freebsd.org/changeset/base/271184 Log: MFC r270348: Add some missing checks for unsupported interfaces (e.g. pflog(4)) when handling ioctls. While here, remove duplicated checks for a NULL ifp in in6_control(): this check is already done near the beginning of the function. MFC r270349: Suppress warnings when retrieving protocol stats from interfaces that don't support IPv6 (e.g. pflog(4)). PR: 189117 Changes: _U stable/9/sys/ stable/9/sys/netinet6/in6.c stable/9/sys/netinet6/scope6.c stable/9/sys/netinet6/scope6_var.h _U stable/9/usr.bin/netstat/ stable/9/usr.bin/netstat/inet6.c
A commit references this bug: Author: markj Date: Sat Sep 6 04:39:27 UTC 2014 New revision: 271185 URL: http://svnweb.freebsd.org/changeset/base/271185 Log: MFC r270348: Add some missing checks for unsupported interfaces (e.g. pflog(4)) when handling ioctls. While here, remove duplicated checks for a NULL ifp in in6_control(): this check is already done near the beginning of the function. MFC r270349: Suppress warnings when retrieving protocol stats from interfaces that don't support IPv6 (e.g. pflog(4)). PR: 189117 Approved by: re (gjb) Changes: _U stable/10/ stable/10/sys/netinet6/in6.c stable/10/sys/netinet6/scope6.c stable/10/sys/netinet6/scope6_var.h stable/10/usr.bin/netstat/inet6.c
Fixed in stable/10 and stable/9.