From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <users-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 396A046488
	for <public@inbox.dpdk.org>; Wed, 26 Mar 2025 20:24:03 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id B82A24021F;
	Wed, 26 Mar 2025 20:24:02 +0100 (CET)
Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com
 [209.85.214.173])
 by mails.dpdk.org (Postfix) with ESMTP id 0DF3040156
 for <users@dpdk.org>; Wed, 26 Mar 2025 20:24:02 +0100 (CET)
Received: by mail-pl1-f173.google.com with SMTP id
 d9443c01a7336-2260c91576aso4585355ad.3
 for <users@dpdk.org>; Wed, 26 Mar 2025 12:24:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1743017041;
 x=1743621841; darn=dpdk.org; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:from:to:cc:subject:date
 :message-id:reply-to;
 bh=YJKCVSauaffZjImiriSbPRKTlQSCcwe/uEwmM2JB6dU=;
 b=q0HKeG/5fDHXljjvid/o8ws5vP6BnbJdkFfDiYaJkBovq6b7KA3sUq9UEIoPAkUbAi
 6jPjDyaWlQ/O5hwgoeN5XdbplmLOViWikFDEfaYvZ7QvLo60gMVfZ6CUPRG75/MvPaSh
 WAI2AZKAFDkjtgkAxtLeaB16FDm5sq/dPK+CorxHTiwxx4ZrmqjTEEluTSicPLo+7IHO
 R4ry6q3m4B86FoiyC+pV2zCL2PTw6L+G45YlKZ974ndlRqOuHDPrSd/6DgJBt6gsme1M
 Nainey+N10N1iVbqQlvJRq0XEg9qP9sD/m73eOcZYMO5znp4FbRgkqm5BGiepLqm/Z4i
 1gmQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743017041; x=1743621841;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=YJKCVSauaffZjImiriSbPRKTlQSCcwe/uEwmM2JB6dU=;
 b=LXxF3hkk2hGzZpxUrmLE835a9mxWRWFHeSpk8E3VBNwEMJmKNvv3hxb/Smn0EDLQCD
 B2WE1UrpV7xZEjHeCITPuSgQR9AjKkXEk6HLTPhg9lsdZzVAS/oB3aAM3eBf/yOJuug3
 qcg7lIhMOP4qXkmYwy9CD3XBrTssx+S4ZEXsd14iStZr+uMJCMd3Wx74tiheo03SOcCi
 jciwBf3kRO9pEFoNjo/OJk20fjxSTbI3hU4xi4ve+IyBidhbdcWRWZpgQXbBo5+YMlUf
 mPL8FskjWDx8XGiSm2lV01WxVFHxXLgJAiX8QXMpTJG7g5XxuNONSnIqHjXlE0L8iIEC
 IsMg==
X-Gm-Message-State: AOJu0YxPeuz9ga1g9hDhIC8kH9avnXdDpgky7pQ/6zEgQYXkIUuhOlt0
 irKEJowMdV8Y1mbIPaSS3p5cXzpOXJnuFM77l3vcFI/iNGfFLwVoceR/yfTlzmY=
X-Gm-Gg: ASbGncuqe1co9uhrrQ3vxVm5533c6TEudLJIMXQFO5W7tqXKsugkcqmtOnzNDInXFJA
 XdztCD7xoqgJzIgjtUJut8iEJjaBzbApmBJQjOcrGNOZD/nTA8fg/lOvBzo8GQRSuEqeua10SBo
 bFbnXMNbGbCaosGGi8xiKG1tSV77oXrf7CoLmmTKQbfytdbgiiLVJ2rXzw3P3BzqkcsepB2l1+F
 t03voJgSPyKCI/kVruXF3LZTg28GK3vhmOU7YoSPd4O5s9pu/kBeFe6t9HyLYjWNG4VDcLADsCi
 g3zuB602rRN0oTKQI2RV2MVb3Lnodi4Yaw2qMY9ptk0d1iTrezW7oplqYdPjuuHtVx5WsrRjiSG
 EYSO75gszPkgd+bhEAh/U
X-Google-Smtp-Source: AGHT+IF7T3cDpOn5pLkjWhfKJtgC1YmYcpD9+I0QzPJSKW3haigsTBNVSV7y+VWqJFp+ZPy7LUV/9A==
X-Received: by 2002:a05:6a00:4607:b0:736:5725:59b4 with SMTP id
 d2e1a72fcca58-73960e0f88bmr1313303b3a.3.1743017041026; 
 Wed, 26 Mar 2025 12:24:01 -0700 (PDT)
Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-73905fab521sm12543775b3a.29.2025.03.26.12.24.00
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 26 Mar 2025 12:24:00 -0700 (PDT)
Date: Wed, 26 Mar 2025 12:23:58 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Jaiswal, Adesh" <adesh.jaiswal@rakuten.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: Issue with Packet Memory Allocation =?UTF-8?B?4oCT?= Double
 Allocation Without Freeing
Message-ID: <20250326122358.5feb6ba7@hermes.local>
In-Reply-To: <TYYP286MB1619DCDDD33B65C8037F0744F9A62@TYYP286MB1619.JPNP286.PROD.OUTLOOK.COM>
References: <TYYP286MB1619DCDDD33B65C8037F0744F9A62@TYYP286MB1619.JPNP286.PROD.OUTLOOK.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: users@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK usage discussions <users.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/users>,
 <mailto:users-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/users/>
List-Post: <mailto:users@dpdk.org>
List-Help: <mailto:users-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/users>,
 <mailto:users-request@dpdk.org?subject=subscribe>
Errors-To: users-bounces@dpdk.org

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.