From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2F8AAA0350 for ; Sat, 6 Jun 2020 14:59:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7EC3A1C2E8; Sat, 6 Jun 2020 14:59:45 +0200 (CEST) Received: from wh10.alp1.flow.ch (wh10.alp1.flow.ch [185.119.84.194]) by dpdk.org (Postfix) with ESMTP id 0C7A91C1B2 for ; Sat, 6 Jun 2020 14:59:43 +0200 (CEST) Received: from [185.218.109.142] (port=63428 helo=[192.168.0.109]) by wh10.alp1.flow.ch with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jhYQI-00Daxk-1e; Sat, 06 Jun 2020 14:59:42 +0200 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) From: Alex Kiselev X-Mailer: iPhone Mail (16G102) In-Reply-To: <20200601091729.03ea9e50@hermes.lan> Date: Sat, 6 Jun 2020 15:59:40 +0300 Cc: users@dpdk.org Content-Transfer-Encoding: quoted-printable Message-Id: <7DA537F2-9887-4B0A-9249-064736E8A9AD@therouter.net> References: <504fcb6e5a12a03035e7b55507e7c279@therouter.net> <20200601091729.03ea9e50@hermes.lan> To: Stephen Hemminger X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - wh10.alp1.flow.ch X-AntiAbuse: Original Domain - dpdk.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - therouter.net X-Get-Message-Sender-Via: wh10.alp1.flow.ch: authenticated_id: alex@therouter.net X-Authenticated-Sender: wh10.alp1.flow.ch: alex@therouter.net X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [dpdk-users] segmention fault while accessing mbuf 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: , Errors-To: users-bounces@dpdk.org Sender: "users" > 1 =D0=B8=D1=8E=D0=BD=D1=8F 2020 =D0=B3., =D0=B2 19:17, Stephen Hemminger <= stephen@networkplumber.org> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0= ): >=20 > On Mon, 01 Jun 2020 15:24:25 +0200 > Alex Kiselev wrote: >=20 >> Hello, >>=20 >> I've got a segmentation fault error in my data plane path. >> I am pretty sure the code where the segfault happened is ok, >> so my guess is that I somehow received a corrupted mbuf. >> How could I troubleshoot this? Is there any way? >> Is it possible that other threads of the application >> corrupted that mbuf? >>=20 >> I would really appriciate any advice. >> Thanks. >>=20 >> DPDK 18.11.3 >> NIC: 82599ES >>=20 >> Code: >>=20 >> nb_rx =3D rte_eth_rx_burst(port_id, queue_id, pkts_burst, >> MAX_PKT_BURST); >>=20 >> ... >>=20 >> for (i=3D0; i < vec_size; i++) { >> rte_prefetch0(rte_pktmbuf_mtod(m_v[i], void *)); >>=20 >> for (i=3D0; i < vec_size; i++) { >> m =3D m_v[i]; >> eth_hdr =3D rte_pktmbuf_mtod(m, struct ether_hdr *); >> eth_type =3D rte_be_to_cpu_16(eth_hdr->ether_type); <---= =20 >> Segmentation fault >> ... >>=20 >> #0 rte_arch_bswap16 (_x=3D> at address 0x4d80000000053010>) >=20 > Build with as many of the debug options turned on in the DPDK config, > and build with EXTRA_CFLAGS of -g. Could using an incorrect (a very big one) value of mbuf pkt_len and data_len= while transmitting cause mbuf corruption and following segmentation fault o= n rx?=