Bug #2066
Updated by Victor Julien about 7 years ago
<pre> [root@openstack-slave1 ~]# uname -r 3.10.0-123.el7.x86_64 [root@openstack-slave1 ~]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.0.1406 (Core) Release: 7.0.1406 Codename: Core [root@openstack-slave1 ~]# ifconfig p6p2 p6p2: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500 inet6 fe80::92e2:baff:fe1a:999d prefixlen 64 scopeid 0x20<link> ether 90:e2:ba:1a:99:9d txqueuelen 1000 (Ethernet) RX packets 15416951 bytes 8789526257 (8.1 GiB) RX errors 0 dropped 26456499 overruns 0 frame 0 TX packets 8 bytes 648 (648.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@openstack-slave1 ~]# ethtool -i p6p2 driver: ixgbe version: 5.0.4 firmware-version: 0x18b30001 bus-info: 0000:04:00.1 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: yes [root@openstack-slave1 ~]# lsmod |grep netmap netmap 144395 11 ixgbe </pre> I debug suricata process the stack is: <pre> (gdb) info threads Id Target Id Frame 18 Thread 0x7f4a4f937700 (LWP 189545) "W#01-p6p2" 0x00007f4a5131de0d in poll () from /lib64/libc.so.6 17 Thread 0x7f4a4f136700 (LWP 189547) "W#02-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 16 Thread 0x7f4a4e935700 (LWP 189548) "W#03-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 15 Thread 0x7f4a4e134700 (LWP 189549) "W#04-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 14 Thread 0x7f4a4d933700 (LWP 189550) "W#05-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 13 Thread 0x7f4a4d132700 (LWP 189551) "W#06-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 12 Thread 0x7f4a4c931700 (LWP 189552) "W#07-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 11 Thread 0x7f4a338de700 (LWP 189553) "W#08-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 10 Thread 0x7f4a330dd700 (LWP 189554) "W#09-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 9 Thread 0x7f4a328dc700 (LWP 189555) "W#10-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 8 Thread 0x7f4a320db700 (LWP 189556) "W#11-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 7 Thread 0x7f4a318da700 (LWP 189557) "W#12-p6p2" 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 6 Thread 0x7f4a310d9700 (LWP 189558) "FM#01" 0x00007f4a51a7fab2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 5 Thread 0x7f4a308d8700 (LWP 189559) "FR#01" 0x00007f4a51a7fab2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 4 Thread 0x7f49fbfff700 (LWP 189560) "CW" 0x00007f4a51a7fab2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 3 Thread 0x7f49fb7fe700 (LWP 189561) "CS" 0x00007f4a51a7fab2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 2 Thread 0x7f49faffd700 (LWP 189562) "US" 0x00007f4a5131fb63 in select () from /lib64/libc.so.6 * 1 Thread 0x7f4a52b3f900 (LWP 189542) "Suricata-Main" 0x00007f4a512ef8ad in nanosleep () from /lib64/libc.so.6 </pre> <pre> (gdb) thread 10 [Switching to thread 10 (Thread 0x7f4a330dd700 (LWP 189554))] #0 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 (gdb) bt #0 0x00007f4a51a7f705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00000000006815f9 in PacketPoolWaitForN (n=0) at tmqh-packetpool.c:208 #2 0x0000000000614087 in NetmapRingRead (ring_id=8, ntv=0x7f4a0c26c8c0) at source-netmap.c:750 #3 ReceiveNetmapLoop (tv=0x38f75c0, data=0x7f4a0c26c8c0, slot=<optimized out>) at source-netmap.c:900 #4 0x0000000000686efa in TmThreadsSlotPktAcqLoop (td=0x38f75c0) at tm-threads.c:334 #5 0x00007f4a51a7bdf3 in start_thread () from /lib64/libpthread.so.0 #6 0x00007f4a513283dd in clone () from /lib64/libc.so.6 </pre> I found nm_ring_space() function return value is 0, the result is capture threads is locked.