From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C515E41E1D; Mon, 13 Mar 2023 17:56:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54D3E410D1; Mon, 13 Mar 2023 17:56:28 +0100 (CET) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by mails.dpdk.org (Postfix) with ESMTP id BE19F406BC for ; Mon, 13 Mar 2023 17:56:26 +0100 (CET) Received: by mail-lj1-f170.google.com with SMTP id b10so13355257ljr.0 for ; Mon, 13 Mar 2023 09:56:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware.com; s=google; t=1678726586; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9WIHikDiIc2aFJBoLic2JiSPWxQX9zOT2TQXUORSM0Y=; b=eL1Huv3JZahKi6LAUef3wFfyhjgLF/MdgvPf1+UCX45JsHVq4YlyGdsss9yUekKDVI LMTF+jsTXkyBcVnf4E12MjH2KEJp3fol3U/Ivf78AcTuYWCnPhz7WC1Blzs8hzfI1Ljp KQfMeJVTMsiZAkCLwnxFSe7z8i6yzJs7TPbg0aoomZmJvCFgKr1z0IUfoSH76RuiLM3y C3ZyC0EgpWxVDMCin+v5bN/BrviNi/Kzton98SbLAtfy7ZstqKdntn91BJXVc3EKXQwH xmgectXnLzps/vYu9Hg6s+6SwFhKN3i3Qm9wIisg2A4JfE+5/EgCFmFhxflT5CbUSkNL bInQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678726586; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9WIHikDiIc2aFJBoLic2JiSPWxQX9zOT2TQXUORSM0Y=; b=qNLSSzDTESsRKQMGLGKhLNo/9iaHve08ap0H1Py39q7AT6QQrrik1wnSYMng2fts6V mgNasg8RMc2o/Rhso8uMWYZDq4ZhMVPu0nScHGGElo3U4YVtaAf6ZCSEezABVWdCvNp3 BjX8H2htM2OhpdwbiuQosee/RS+rORhVv54byqE7/Tr8uZ6ah/P+u+NlBOd3rtlH8wsc P+mLZalrkdLuK1T5UIT2ckPxbnpc0hzyD6TIKvhUic+If1Zjkc3zIXb2iHbAJUuSNdtm 6zP8AP/VR+41uP39CR8GXtYnkVV1Q0hIiM535Elx8QX4xocAB9lBIrxE2hAZXEBgHX2y aMwA== X-Gm-Message-State: AO0yUKW+a5U1HC/AOYwOuQEy5YWuUw33h7jqTv8djn5uGYqKs7uHv6hC 3PilZj8+PN1K1ay8B7WmUV0z1w== X-Google-Smtp-Source: AK7set+By1AFr+xyENM6yr6yci/19HAQTOP0Vbt1UbdyOOBmjO8pi9GA7s6UT0NKn9Bzv/r4ip47Ug== X-Received: by 2002:a2e:8510:0:b0:295:9ba2:8a78 with SMTP id j16-20020a2e8510000000b002959ba28a78mr3163271lji.17.1678726586184; Mon, 13 Mar 2023 09:56:26 -0700 (PDT) Received: from zays-home.int.nfware.com (95-31-178-83.broadband.corbina.ru. [95.31.178.83]) by smtp.gmail.com with ESMTPSA id f11-20020ac2508b000000b004db511ccae6sm18475lfm.294.2023.03.13.09.56.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 09:56:25 -0700 (PDT) From: Pavel Ivashchenko To: olivier.matz@6wind.com, konstantin.ananyev@intel.com, mb@smartsharesystems.com, ajit.khaparde@broadcom.com Cc: dev@dpdk.org, Pavel Ivashchenko , stable@dpdk.org Subject: [PATCH] app: fix mbuf_autotest in case of defined RTE_LIBRTE_MBUF_DEBUG Date: Mon, 13 Mar 2023 19:56:05 +0300 Message-Id: <20230313165605.12325-1-pivashchenko@nfware.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org How to reproduce: 1. Define RTE_LIBRTE_MBUF_DEBUG 2. MALLOC_PERTURB_=178 DPDK_TEST=mbuf_autotest gdb --args obj-x86_64-linux-gnu/app/test/dpdk-test --file-prefix=mbuf_autotest PANIC in rte_mbuf_sanity_check(): bad pkt_len ... #6 0x00007ffff7d3d4cc in rte_mbuf_sanity_check (m=m@entry=0x17f8c3400, is_header=is_header@entry=1) at ../lib/mbuf/rte_mbuf.c:384 #7 0x0000555555653d57 in rte_pktmbuf_free (m=0x17f8c3400) at ../lib/mbuf/rte_mbuf.h:1385 #8 0x000055555565c7a6 in test_nb_segs_and_next_reset () at ../app/test/test_mbuf.c:2752 #9 test_mbuf () at ../app/test/test_mbuf.c:2967 ... (gdb) frame 6 #6 0x00007ffff7d3d4cc in rte_mbuf_sanity_check (m=m@entry=0x17f8c3400, is_header=is_header@entry=1) at ../lib/mbuf/rte_mbuf.c:384 384 rte_panic("%s\n", reason); (gdb) p/d m->pkt_len $4 = 1500 Fixes: efc6f9104c80 ("mbuf: fix reset on mbuf free") Cc: stable@dpdk.org Signed-off-by: Pavel Ivashchenko --- app/test/test_mbuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 6cbb03b0af..d471a23805 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -2744,6 +2744,7 @@ test_nb_segs_and_next_reset(void) /* split m0 chain in two, between m1 and m2 */ m0->nb_segs = 2; + m0->pkt_len -= 500; m1->next = NULL; m2->nb_segs = 1; -- 2.39.0