DPDK usage discussions
 help / color / mirror / Atom feed
* Issue with Packet Memory Allocation – Double Allocation Without Freeing
@ 2025-03-26 16:51 Jaiswal, Adesh
  2025-03-26 19:23 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Jaiswal, Adesh @ 2025-03-26 16:51 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

Hello everyone,

We are using memory allocation for packets in our DPDK-based application. However, we are observing a de-sync issue where, during debugging, we see logs indicating that a packet is allocated twice without being freed in between.
To diagnose the issue, we added logging at both the time of allocation and deallocation. From the logs, we noticed:

  *   The same memory address is allocated/shared twice without a corresponding free operation.
  *   This is causing inconsistencies in packet handling.
Our Questions:

  1.  Is this a known issue in DPDK 18.08?
  2.  Is there any existing patch or workaround available for this problem?
  3.  What could cause a scenario where a packet is allocated twice without freeing?
  4.  What debugging approaches or tools would you recommend for tracking such memory allocation inconsistencies?
Additional Details:

  *   DPDK version: DPDK 18.08.0 version 16
Would appreciate any insights or debugging tips from the community!

Thanks,
Adesh


[-- Attachment #2: Type: text/html, Size: 8662 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Issue with Packet Memory Allocation – Double Allocation Without Freeing
  2025-03-26 16:51 Issue with Packet Memory Allocation – Double Allocation Without Freeing Jaiswal, Adesh
@ 2025-03-26 19:23 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2025-03-26 19:23 UTC (permalink / raw)
  To: Jaiswal, Adesh; +Cc: users

On Wed, 26 Mar 2025 16:51:39 +0000
"Jaiswal, Adesh" <adesh.jaiswal@rakuten.com> wrote:

> Hello everyone,
> 
> We are using memory allocation for packets in our DPDK-based application. However, we are observing a de-sync issue where, during debugging, we see logs indicating that a packet is allocated twice without being freed in between.
> To diagnose the issue, we added logging at both the time of allocation and deallocation. From the logs, we noticed:
> 
>   *   The same memory address is allocated/shared twice without a corresponding free operation.
>   *   This is causing inconsistencies in packet handling.
> Our Questions:
> 
>   1.  Is this a known issue in DPDK 18.08?
>   2.  Is there any existing patch or workaround available for this problem?
>   3.  What could cause a scenario where a packet is allocated twice without freeing?
>   4.  What debugging approaches or tools would you recommend for tracking such memory allocation inconsistencies?
> Additional Details:
> 
>   *   DPDK version: DPDK 18.08.0 version 16
> Would appreciate any insights or debugging tips from the community!
> 
> Thanks,
> Adesh
> 

In the past, these have always been application not DPDK internal bugs.
Build with RTE_LIBRTE_MBUF_DEBUG and RTE_LIBRTE_ETHDEV_DEBUG might find something.

Remember mbuf's have ref counts.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-26 19:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-26 16:51 Issue with Packet Memory Allocation – Double Allocation Without Freeing Jaiswal, Adesh
2025-03-26 19:23 ` Stephen Hemminger

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).