Date: Thu, 01 Dec 2011 16:44:24 +0100 From: Rene Ladan <rene@freebsd.org> To: current@FreeBSD.ORG Subject: lock order reversals with netmap Message-ID: <4ED7A0D8.90801@freebsd.org>
next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA96EF098D339257E340AB9F6 Content-Type: multipart/mixed; boundary="------------090809090106060906060408" This is a multi-part message in MIME format. --------------090809090106060906060408 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, on FreeBSD 10.0-CURRENT #7 r228176M: Thu Dec 1 13:56:02 CET 2011 (GENERIC + CAPABILITIES + netmap with head.diff and bge patches applied) I get these lock order reversals when running a netmap-enabled program (details in the attachment) with syscall (54, FreeBSD ELF64, sys_ioctl): Dec 1 16:23:09 acer kernel: exclusive sleep mutex netmap memory allocator lock (netmap memory allocator lock) r =3D 0 (0xfffffe00027d1880= ) locked @ /usr/src/sys/dev/netmap/netmap.c:1484 Dec 1 16:23:09 acer kernel: exclusive sleep mutex bge0 (network driver) r =3D 0 (0xffffff8000768010) locked @ /usr/src/sys/dev/netmap/if_bge_netmap.h:60 The application does not invoke the offending function (netmap_malloc()) itself. Regards, Ren=E9 --=20 http://www.rene-ladan.nl:8080/ GPG fingerprint =3D ADBC ECCD EB5F A6B4 549F 600D 8C9E 647A E564 2BFC (subkeys.pgp.net) --------------090809090106060906060408 Content-Type: text/plain; name="netmap-messages" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="netmap-messages" Dec 1 15:41:20 acer kernel: FreeBSD 10.0-CURRENT #7 r228176M: Thu Dec 1= 13:56:02 CET 2011 Dec 1 15:41:20 acer kernel: real memory =3D 4294967296 (4096 MB) Dec 1 15:41:20 acer kernel: avail memory =3D 4080091136 (3891 MB) Dec 1 15:41:20 acer kernel: 001.000005 netmap_memory_init [1627] netmap_= buffer_base 0xffffff8117eaa000 (offset 679936) Dec 1 15:41:20 acer kernel: 001.000006 netmap_memory_init [1636] Have 12= 9 MB, use 661KB for rings, 65862 buffers at 0xffffff8117eaa000 Dec 1 15:41:20 acer kernel: netmap: loaded module with 129 Mbytes Dec 1 15:41:20 acer kernel: bge0: <Broadcom NetLink Gigabit Ethernet Con= troller , ASIC rev. 0x5784100> mem 0xf5100000-0xf510ffff irq 16 at dev= ice 0.0 on pci2 Dec 1 15:41:20 acer kernel: bge0: CHIP ID 0x05784100; ASIC REV 0x5784; C= HIP REV 0x57841; PCI-E Dec 1 15:41:20 acer kernel: miibus0: <MII bus> on bge0 Dec 1 15:41:20 acer kernel: brgphy0: <BCM5784 10/100/1000baseT PHY> PHY = 1 on miibus0 Dec 1 15:41:20 acer kernel: brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 1= 00baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-m= aster, auto, auto-flow Dec 1 15:41:20 acer kernel: bge0: Ethernet address: 00:26:2d:5e:d8:ee Dec 1 15:41:20 acer kernel: 001.000009 netmap_attach [1243] ok for bge0 Dec 1 16:23:09 acer kernel: 989.882634 netmap_set_ringid [779] ringid bg= e0 set to SW RING Dec 1 16:23:09 acer kernel: uma_zalloc_arg: zone "64" with the following= non-sleepable locks held: Dec 1 16:23:09 acer kernel: exclusive sleep mutex netmap memory allocato= r lock (netmap memory allocator lock) r =3D 0 (0xfffffe00027d1880) locked= @ /usr/src/sys/dev/netmap/netmap.c:1484 Dec 1 16:23:09 acer kernel: exclusive sleep mutex bge0 (network driver) = r =3D 0 (0xffffff8000768010) locked @ /usr/src/sys/dev/netmap/if_bge_netm= ap.h:60 Dec 1 16:23:09 acer kernel: KDB: stack backtrace: Dec 1 16:23:09 acer kernel: db_trace_self_wrapper() at db_trace_self_wra= pper+0x2a Dec 1 16:23:10 acer kernel: kdb_backtrace() at kdb_backtrace+0x37 Dec 1 16:23:10 acer kernel: _witness_debugger() at _witness_debugger+0x2= c Dec 1 16:23:10 acer kernel: witness_warn() at witness_warn+0x2c2 Dec 1 16:23:10 acer kernel: uma_zalloc_arg() at uma_zalloc_arg+0x335 Dec 1 16:23:10 acer kernel: malloc() at malloc+0xbe Dec 1 16:23:10 acer kernel: netmap_malloc() at netmap_malloc+0x86 Dec 1 16:23:10 acer kernel: netmap_ioctl() at netmap_ioctl+0x5bd Dec 1 16:23:10 acer kernel: devfs_ioctl_f() at devfs_ioctl_f+0x7a Dec 1 16:23:10 acer kernel: kern_ioctl() at kern_ioctl+0xcd Dec 1 16:23:10 acer kernel: sys_ioctl() at sys_ioctl+0xfd Dec 1 16:23:10 acer kernel: amd64_syscall() at amd64_syscall+0x3ac Dec 1 16:23:10 acer kernel: Xfast_syscall() at Xfast_syscall+0xf7 Dec 1 16:23:10 acer kernel: --- syscall (54, FreeBSD ELF64, sys_ioctl), = rip =3D 0x8022aef0c, rsp =3D 0x7fffffffd4b8, rbp =3D 0x802bfb100 --- Dec 1 16:23:10 acer kernel: uma_zalloc_arg: zone "64" with the following= non-sleepable locks held: Dec 1 16:23:10 acer kernel: exclusive sleep mutex netmap memory allocato= r lock (netmap memory allocator lock) r =3D 0 (0xfffffe00027d1880) locked= @ /usr/src/sys/dev/netmap/netmap.c:1484 Dec 1 16:23:10 acer kernel: exclusive sleep mutex bge0 (network driver) = r =3D 0 (0xffffff8000768010) locked @ /usr/src/sys/dev/netmap/if_bge_netm= ap.h:60 Dec 1 16:23:10 acer kernel: KDB: stack backtrace: Dec 1 16:23:10 acer kernel: db_trace_self_wrapper() at db_trace_self_wra= pper+0x2a Dec 1 16:23:10 acer kernel: kdb_backtrace() at kdb_backtrace+0x37 Dec 1 16:23:10 acer kernel: _witness_debugger() at _witness_debugger+0x2= c Dec 1 16:23:10 acer kernel: witness_warn() at witness_warn+0x2c2 Dec 1 16:23:10 acer kernel: uma_zalloc_arg() at uma_zalloc_arg+0x335 Dec 1 16:23:10 acer kernel: malloc() at malloc+0xbe Dec 1 16:23:10 acer kernel: netmap_malloc() at netmap_malloc+0x86 Dec 1 16:23:10 acer kernel: netmap_ioctl() at netmap_ioctl+0x817 Dec 1 16:23:10 acer kernel: devfs_ioctl_f() at devfs_ioctl_f+0x7a Dec 1 16:23:10 acer kernel: kern_ioctl() at kern_ioctl+0xcd Dec 1 16:23:10 acer kernel: sys_ioctl() at sys_ioctl+0xfd Dec 1 16:23:10 acer kernel: amd64_syscall() at amd64_syscall+0x3ac Dec 1 16:23:10 acer kernel: Xfast_syscall() at Xfast_syscall+0xf7 Dec 1 16:23:10 acer kernel: --- syscall (54, FreeBSD ELF64, sys_ioctl), = rip =3D 0x8022aef0c, rsp =3D 0x7fffffffd4b8, rbp =3D 0x802bfb100 --- Dec 1 16:23:10 acer kernel: 990.041760 netmap_reset [1403] +++ NR_REINIT= ok on bge0 RX[0] Dec 1 16:23:10 acer kernel: 990.041948 netmap_reset [1384] +++ NR_REINIT= ok on bge0 TX[0] Dec 1 16:23:10 acer kernel: bge0: link state changed to DOWN Dec 1 16:23:10 acer kernel: 990.051589 netmap_dtor [352] deleting last n= etmap instance for bge0 Dec 1 16:23:12 acer kernel: bge0: link state changed to UP --------------090809090106060906060408-- --------------enigA96EF098D339257E340AB9F6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7XoOkACgkQjJ5keuVkK/yfigCgsO5wQ/1y9D5L7dgBoDLzJB+N Hc8AniBuVaHsf10p+5pqq0sTkiPkKx3p =bNYi -----END PGP SIGNATURE----- --------------enigA96EF098D339257E340AB9F6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ED7A0D8.90801>