From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from diana.null.ro (diana.null.ro [83.166.206.79]) by dpdk.org (Postfix) with ESMTP id EBE184C7B for ; Mon, 26 Feb 2018 15:36:44 +0100 (CET) Received: from [192.168.168.224] (unknown [192.168.168.224]) by diana.null.ro (Postfix) with ESMTP id 300C91ABAC6 for ; Mon, 26 Feb 2018 16:37:51 +0200 (EET) To: users@dpdk.org From: andrei Message-ID: Date: Mon, 26 Feb 2018 16:36:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US Subject: [dpdk-users] dpdk concurrency X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2018 14:36:45 -0000 Hi, I had run into a deadlock by using DPDK, and I am out of ideas on how to debug the issue. Scenario: (The application is more complicated this is the simplified version) 4 mempools, 4 txBuffers, 3 threads, (CPU 4 cores; irrelevant). One thread extracts buffers(rte_mbuff) from a random memory(rte_mempool) pool and place them into a ring buffer. Other thread (Sender) extracts the buffers from the ring populates them with data and place them into a rte_eth_dev_tx_buffer by calling rte_eth_tx_buffer(); One thread (Flusher) is used as a flusher. It goes trough the rte_eth_dev_tx_buffer's and calls rte_eth_tx_buffer_flush. The deadlock occurs, in my opinion, when the Sender and the Flusher threads try to place back buffers into the same memory pool. This is a fragment of the core dump. Thread 2 (Thread 0x7f5932e69700 (LWP 14014)): #0=C2=A0 0x00007f59388e933a in common_ring_mp_enqueue () from /usr/local/lib/librte_mempool.so.2.1 #1=C2=A0 0x00007f59386b27e0 in ixgbe_xmit_pkts () from /usr/local/lib/librte_pmd_ixgbe.so.1.1 #2=C2=A0 0x00007f593d00aab7 in rte_eth_tx_burst (nb_pkts=3D, tx_pkts=3D, =C2=A0=C2=A0=C2=A0 queue_id=3D0, port_id=3D) at /usr/local/include/dpdk/rte_ethdev.h:2858 #3=C2=A0 rte_eth_tx_buffer_flush (buffer=3D, queue_id=3D0,= port_id=3D) =C2=A0=C2=A0=C2=A0 at /usr/local/include/dpdk/rte_ethdev.h:3040 #4=C2=A0 rte_eth_tx_buffer (tx_pkt=3D, buffer=3D, queue_id=3D0, =C2=A0=C2=A0=C2=A0 port_id=3D) at /usr/local/include/dpdk/= rte_ethdev.h:3090 Thread 30 (Thread 0x7f5933175700 (LWP 13958)): #0=C2=A0 0x00007f59388e91cc in common_ring_mp_enqueue () from /usr/local/lib/librte_mempool.so.2.1 #1=C2=A0 0x00007f59386b27e0 in ixgbe_xmit_pkts () from /usr/local/lib/librte_pmd_ixgbe.so.1.1 #2=C2=A0 0x00007f593d007dfd in rte_eth_tx_burst (nb_pkts=3D, tx_pkts=3D0x7f587a410358, =C2=A0=C2=A0=C2=A0 queue_id=3D, port_id=3D0 '\000') at /usr/local/include/dpdk/rte_ethdev.h:2858 #3=C2=A0 rte_eth_tx_buffer_flush (buffer=3D0x7f587a410340, queue_id=3D, port_id=3D0 '\000') =C2=A0=C2=A0=C2=A0 at /usr/local/include/dpdk/rte_ethdev.h:3040 Questions: =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 1. I am using DPDK 17.02.01. Was a=C2=A0 = bug solved in newer releases that can be mapped to this behavior? =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 2. If two threads try to place buffers in= to the same pool, the operation should be synchronized by DPDK or by application? Thank you, Andrei Comandatu