DPDK usage discussions
 help / color / mirror / Atom feed
From: Farbod <fshahinfar1@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] Segfault while freeing mbuf in the primary process
Date: Fri, 23 Oct 2020 18:08:35 +0330	[thread overview]
Message-ID: <0123fbc4-ceda-e67f-dbef-959129a95303@gmail.com> (raw)

Hi,

I am using DPDK multi-processor mode for sending packets from one 
application (secondary) to another application (primary) using rings.
The primary applications role is to just free the packet with 
`rte_pktmbuf_free()`.

I encounter a SEGFAULT error in the line of `rte_pktmbuf_free()`.

My DPDK version is 19.11.1.

```

Signal: 11 (Segmentation fault), si_code: 1 (SEGV_MAPERR: address not 
mapped to object)
Backtrace (recent calls first) ---
(0): (+0x81a1ee) [0x562d35df51ee]
     bucket_enqueue_single at 
---/dpdk-19.11.1/drivers/mempool/bucket/rte_mempool_bucket.c:111 
(discriminator 3)
          108:   addr &= bd->bucket_page_mask;
          109:   hdr = (struct bucket_header *)addr;
110:
       -> 111:   if (likely(hdr->lcore_id == lcore_id)) {
          112:           if (hdr->fill_cnt < bd->obj_per_bucket - 1) {
          113: hdr->fill_cnt++;
          114:           } else {
      (inlined by) bucket_enqueue at 
---/dpdk-19.11.1/drivers/mempool/bucket/rte_mempool_bucket.c:148 
(discriminator 3)
          145:   int rc = 0;
146:
          147:   for (i = 0; i < n; i++) {
       -> 148:           rc = bucket_enqueue_single(bd, obj_table[i]);
          149:           RTE_ASSERT(rc == 0);
          150: }
[0x562d35cd2f8c]
     rte_mempool_ops_enqueue_bulk at 
---/dpdk-19.11.1/build/include/rte_mempool.h:786
       -> 786:   return ops->enqueue(mp, obj_table, n);
      (inlined by) __mempool_generic_put at 
---/dpdk-19.11.1/build/include/rte_mempool.h:1329
       -> 1329:          rte_mempool_ops_enqueue_bulk(mp, 
&cache->objs[cache->size],
      (inlined by) rte_mempool_generic_put at 
---/dpdk-19.11.1/build/include/rte_mempool.h:1365
       -> 1365:  __mempool_generic_put(mp, obj_table, n, cache);
      (inlined by) rte_mempool_put_bulk at 
---/dpdk-19.11.1/build/include/rte_mempool.h:1388
       -> 1388:  rte_mempool_generic_put(mp, obj_table, n, cache);
      (inlined by) rte_mempool_put at 
---/dpdk-19.11.1/build/include/rte_mempool.h:1406
       -> 1406:  rte_mempool_put_bulk(mp, &obj, 1);
      (inlined by) rte_mbuf_raw_free at 
---/dpdk-19.11.1/build/include/rte_mbuf.h:579
       -> 579:   rte_mempool_put(m->pool, m);
      (inlined by) rte_pktmbuf_free_seg at 
---/dpdk-19.11.1/build/include/rte_mbuf.h:1223
       -> 1223:          rte_mbuf_raw_free(m);         151:   if 
(local_stack->top > bd->bucket_stack_thresh) {
        (inlined by) rte_pktmbuf_free at ---/rte_mbuf.h:1244
       -> 1244: rte_pktmbuf_free_seg(m);
      (inlined by) ?? at --- /packet.h:199
       -> 199:     rte_pktmbuf_free(reinterpret_cast<struct rte_mbuf 
*>(pkt));

```

I have made sure that primary and secondary process does not share any 
cpu in common. The packets received in the primary application are valid 
and the information inside them is readable. It only runs in to SEGFAULT 
when I am trying to free the mubf structures.

I would like to mention that the applications are in two different 
projects and are built separately.

Thank you


             reply	other threads:[~2020-10-23 14:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 14:38 Farbod [this message]
2020-10-24 14:24 ` Farbod

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0123fbc4-ceda-e67f-dbef-959129a95303@gmail.com \
    --to=fshahinfar1@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).