[Bug 208389] Netmap Panic
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Apr 4 00:30:40 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208389
--- Comment #16 from Shirkdog <mshirk at daemon-security.com> ---
The following will reproduce the issue on FreeBSD 11 Current with the following
dual nic intel card:
em1 at pci0:1:0:1: class=0x020000 card=0x115e8086 chip=0x105e8086 rev=0x06
hdr=0x00
vendor = 'Intel Corporation'
device = '82571EB Gigabit Ethernet Controller'
class = network
subclass = ethernet
1) Bootup the system without any network cable plugged, then plugin to em1 and
login as root
2) run "ifconfig em1 up"
3) run "tcpdump -i em1 -nns 0" (ensures there is traffic accessible to this
interface. My traffic mix was IGMP and Broadcast packets with some IPv6 for
DHCP solicitation)
4) run "tcpdump -i netmap:em1 -ns 0" When I run this, I get no traffic, even
though I should be seeing the same IGMP and Broadcast packets that I know the
interface has access too. I also get the following lock order reversal:
Apr 4 00:17:43 test login: ROOT LOGIN (root) ON ttyv0
Apr 4 00:17:49 test kernel: em1: link state changed to UP
Apr 4 00:17:51 test kernel: em1: promiscuous mode enabled
Apr 4 00:17:56 test kernel: em1: promiscuous mode disabled
Apr 4 00:18:02 test kernel: em1: link state changed to DOWN
Apr 4 00:18:02 test kernel: lock order reversal: (sleepable after
non-sleepable)
Apr 4 00:18:02 test kernel: 1st 0xfffff8000cc4f800 vm object (vm object) @
/usr/src/sys/vm/vm_fault.c:360
Apr 4 00:18:02 test kernel: 2nd 0xffffffff817f2e58 (&nm_mem)->nm_mtx
((&nm_mem)->nm_mtx) @ /usr/src/sys/dev/netmap/netmap_mem2.c:490
Apr 4 00:18:02 test kernel: stack backtrace:
Apr 4 00:18:02 test kernel: #0 0xffffffff80a7b800 at witness_debugger+0x70
Apr 4 00:18:02 test kernel: #1 0xffffffff80a7b701 at witness_checkorder+0xe71
Apr 4 00:18:02 test kernel: #2 0xffffffff80a28ce2 at _sx_xlock+0x72
Apr 4 00:18:02 test kernel: #3 0xffffffff80698a9d at
netmap_mem2_ofstophys+0x2d
Apr 4 00:18:02 test kernel: #4 0xffffffff806960fb at
netmap_dev_pager_fault+0x3b
Apr 4 00:18:02 test kernel: #5 0xffffffff80ccf6c1 at dev_pager_getpages+0x61
Apr 4 00:18:02 test kernel: #6 0xffffffff80cf7e0a at vm_pager_get_pages+0x4a
Apr 4 00:18:02 test kernel: #7 0xffffffff80cdbf00 at vm_fault_hold+0x760
Apr 4 00:18:02 test kernel: #8 0xffffffff80cdb758 at vm_fault+0x78
Apr 4 00:18:02 test kernel: #9 0xffffffff80e6cac5 at trap_pfault+0x115
Apr 4 00:18:02 test kernel: #10 0xffffffff80e6c37d at trap+0x57d
Apr 4 00:18:02 test kernel: #11 0xffffffff80e4c427 at calltrap+0x8
5) Wait until you see about 5 of these Null packets output from tcpdump:
2016-04-01 17:00:07.595078 00:00:00:00:00:00 > 00:00:00:00:00:00, 802.3, length
177: LLC, dsap Null (0x00) Individual, ssap Null (0x00) Command, ctrl 0x0000:
Information, send seq 0, rcv seq 0, Flags [Command], length 163
6) Hit control+C, and you should get back to your prompt, run tcpdump -i
netmap:em1 -ns 0 again, you should see more of the null packet output from
tcpdump, then hitting control+C will lead to the panic.
Of note, I have the following onboard NIC on this motherboard:
Apr 4 00:16:45 test kernel: re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe
Gigabit Ethernet> port 0xd000-0xd0ff mem
0xf7c00000-0xf7c00fff,0xf0000000-0xf0003fff irq 18 at device 0.0 on pci3
Apr 4 00:16:45 test kernel: re0: Using 1 MSI-X message
Apr 4 00:16:45 test kernel: re0: turning off MSI enable bit.
Apr 4 00:16:45 test kernel: re0: Chip rev. 0x4c000000
Apr 4 00:16:45 test kernel: re0: MAC rev. 0x00000000
I ran through the same steps, and I could not get the box to panic. After
testing with re0, I removed the cable and put it into em1, and ran through the
test.
I got different results from when I started from a reboot and tested em1. When
running tcpdump -i netmap:em1 after using the Realtek NIC, the first IP packet
would claim that it was truncated, and it took about 4 times using the test
procedure before it paniced.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-net
mailing list