Skip to contentSkip to conversation

rte_pktmbuf_alloc fails with a segmentation fault but rte_pktmbuf_pool_create returns valid data

dpdk-dev [email protected] 1 participant 1 message Aug 9, 2021

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=785

Bug ID: 785
Summary: rte_pktmbuf_alloc fails with a segmentation fault but
rte_pktmbuf_pool_create returns valid data
Product: DPDK
Version: 20.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: core
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---

(backtrace below) mbuf_pool is valid, and there is sufficient memory onboard, yet __mempool_generic_get (from rte_pktmbuf_alloc) fails because cache points to invalid memory. There doesn't seem to be any way of detecting that something is wrong because pool_create returns perfectly good data.

Backtrace:

Program received signal SIGSEGV, Segmentation fault. 0x0000000000402735 in __mempool_generic_get (cache=0x2f6e69622f77735f, n=1, obj_table=0x7fffffffe0d8, mp=0x7fffffffe6db) at /usr/local/include/rte_mempool.h:1417
1417 if (unlikely(cache == NULL || n >= cache->size))
(gdb) bt full
#0 0x0000000000402735 in __mempool_generic_get (cache=0x2f6e69622f77735f, n=1, obj_table=0x7fffffffe0d8, mp=0x7fffffffe6db) at /usr/local/include/rte_mempool.h:1417

        ret = 0
        len = 4294960256
        index = 32767
        cache_objs = 0x0
#1  rte_mempool_generic_get (cache=0x2f6e69622f77735f, n=1,
obj_table=0x7fffffffe0d8, mp=0x7fffffffe6db) at
/usr/local/include/rte_mempool.h:1491
        ret = 0
#2  rte_mempool_get_bulk (n=1, obj_table=0x7fffffffe0d8, mp=0x7fffffffe6db) at
/usr/local/include/rte_mempool.h:1526
        cache = 0x2f6e69622f77735f

#3 rte_mempool_get (obj_p=0x7fffffffe0d8, mp=0x7fffffffe6db) at /usr/local/include/rte_mempool.h:1552
No locals.
#4 rte_mbuf_raw_alloc (mp=0x7fffffffe6db) at /usr/local/include/rte_mbuf.h:590

        m = 0x1656380
#5  0x0000000000402cd2 in rte_pktmbuf_alloc (mp=0x7fffffffe6db) at
/usr/local/include/rte_mbuf.h:895
        m = 0x7ffff70e5d4d <__GI_rewind+109>

#6 0x000000000040798e in getAndMbufData (argstring=0x7a9935 "-f", einf=0x7fffffffe480) at cmdParser.c:73
fd = 0x1656380
fsize = 0
readSize = 5
data = 0x1651f20 ""
argv = {0x4095f0 "progname", 0x7a9935 "-f", 0x7a9938 "test.txt", 0x0} argc = 3
opt = -1
myBuf = 1
total_mbufs = 0
bufToUse = 0x7fffffffe70a

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.