Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Apr 2016 00:30:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-net@FreeBSD.org
Subject:   [Bug 208389] Netmap Panic
Message-ID:  <bug-208389-2472-GuMOeCNLNr@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-208389-2472@https.bugs.freebsd.org/bugzilla/>
References:  <bug-208389-2472@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208389

--- Comment #16 from Shirkdog <mshirk@daemon-security.com> ---
The following will reproduce the issue on FreeBSD 11 Current with the follo=
wing
dual nic intel card:

em1@pci0:1:0:1: class=3D0x020000 card=3D0x115e8086 chip=3D0x105e8086 rev=3D=
0x06
hdr=3D0x00
    vendor     =3D 'Intel Corporation'
    device     =3D '82571EB Gigabit Ethernet Controller'
    class      =3D network
    subclass   =3D 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 t=
he
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+0x=
e71
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+0x=
61
Apr  4 00:18:02 test kernel: #6 0xffffffff80cf7e0a at vm_pager_get_pages+0x=
4a=20
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, le=
ngth
177: LLC, dsap Null (0x00) Individual, ssap Null (0x00) Command, ctrl 0x000=
0:
Information, send seq 0, rcv seq 0, Flags [Command], length 163=20

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. W=
hen
running tcpdump -i netmap:em1 after using the Realtek NIC, the first IP pac=
ket
would claim that it was truncated, and it took about 4 times using the test
procedure before it paniced.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-208389-2472-GuMOeCNLNr>