From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 29F29A0538; Wed, 5 Feb 2020 10:33:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 56C831C18F; Wed, 5 Feb 2020 10:33:05 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id C4DE21C137 for ; Wed, 5 Feb 2020 10:33:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580895183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mm48Oo0wJmqiJlMua9By4iK6yk2e/HqOR10L2bzUyuU=; b=Avwi4X60XZ9tc54af26kbJFbAVGdbtIoofMMLiFhe3i51kZXmLV9jbivzSuedf/4zseKVQ ZRqw7+Qc7Zsm+02J7OiiI8+1ZFxLfJbHFhnUU9NfmMXW9tClwu4gwafFtJIJtBsjEH13Fb 0ltoOJZgd+3fziV37EWZy9Ie9oJn/qw= Received: from mail-ua1-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-177-5OjdarEPOOKrJVlLte5ABg-1; Wed, 05 Feb 2020 04:33:01 -0500 Received: by mail-ua1-f71.google.com with SMTP id j16so426004uak.16 for ; Wed, 05 Feb 2020 01:33:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NzECQaR/ariLkeCQA/Uz/4owT5W8FeIq83pD1bdhwSc=; b=aUcwrdFUWY0Ve+q6nLBPXP7TLg2t3siKJls91fRE7FiFPFQnmAwbX1/DaKnhZTGJn0 5ObQ3MQ+gw4OjUDnddpqqUz9n7mwXxRzoeMw4cuITgsuzrQRxAzqOqEmejeXuewCxQU9 WoqTVyvUA0VSP4c3enli7PqoC6wpSmPBHC3b87K5iyNZ+pOXt5DWMXj65lspFMzTxFlk kjI91HXd8WxK+3Wkk1AjpGBpaVcUZkUu/xe76rhf5AbvkmpueZypiRufypd/NxVU38jJ u0xcBSQg7ZgMFhOSt+FFxZ8KNTTH/yaQSsW08yuh+JDNE0oFCCkdoeugnaxl/cr5TR29 1baQ== X-Gm-Message-State: APjAAAVkiLlGsTM/PpXTrHScmjDZM0aZpr9b05Fa4NE5N5Mx4ZUFYRFL 10LDyyxMUHstIE/zgeLr7MdhQ7Ba7YBJt417rFw3DzNypwcXJZjU37D2RzyhVGQKXGj0fPzqN1m 9t2fKimiRDSeXwbsKzXk= X-Received: by 2002:ab0:63cb:: with SMTP id i11mr11748028uap.87.1580895180677; Wed, 05 Feb 2020 01:33:00 -0800 (PST) X-Google-Smtp-Source: APXvYqy5no2o7+Kqxl3mVRXN2l6hQ/lTGpY6tOO2cxVhr9ntnhhSEX8+4kAbs38VK83EuYYsFSDlw1rFucKBdXd6BT0= X-Received: by 2002:ab0:63cb:: with SMTP id i11mr11748014uap.87.1580895180381; Wed, 05 Feb 2020 01:33:00 -0800 (PST) MIME-Version: 1.0 References: <20200104013341.19809-1-stephen@networkplumber.org> In-Reply-To: <20200104013341.19809-1-stephen@networkplumber.org> From: David Marchand Date: Wed, 5 Feb 2020 10:32:49 +0100 Message-ID: To: Stephen Hemminger Cc: dev , Luca Boccassi , Bruce Richardson X-MC-Unique: 5OjdarEPOOKrJVlLte5ABg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 00/14] cleanup resources on shutdown X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello Stephen, On Sat, Jan 4, 2020 at 2:34 AM Stephen Hemminger wrote: > > Recently started using valgrind with DPDK, and the results > are not clean. > > The DPDK has a function that applications can use to tell it > to cleanup resources on shutdown (rte_eal_cleanup). But the > current coverage of that API is spotty. Many internal parts of > DPDK leave files and allocated memory behind. > > This patch set is a start at getting the sub-parts of > DPDK to cleanup after themselves. These are the easier ones, > the harder and more critical ones are in the drivers > and the memory subsystem. > > There are no visible API or ABI changes here. Could you share what you did to run a dpdk application with valgrind? I tried with testpmd and a 3.15 valgrind (fc30), but I get an init failure on the cpu flags. $ LD_LIBRARY_PATH=3D/home/dmarchan/builds/build-gcc-shared/install/usr/loca= l/lib64 valgrind /home/dmarchan/builds/build-gcc-shared/install/usr/local/bin/dpdk-= testpmd -c 3 --no-huge -m 20 -d librte_mempool_ring.so -d librte_pmd_null.so -w 0:0.0 --vdev net_null1 --vdev net_null2 -- --no-mlockall --total-num-mbufs=3D2048 -ia =3D=3D10258=3D=3D Memcheck, a memory error detector =3D=3D10258=3D=3D Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward = et al. =3D=3D10258=3D=3D Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyr= ight info =3D=3D10258=3D=3D Command: /home/dmarchan/builds/build-gcc-shared/install/usr/local/bin/dpdk-testpmd -c 3 --no-huge -m 20 -d librte_mempool_ring.so -d librte_pmd_null.so -w 0:0.0 --vdev net_null1 --vdev net_null2 -- --no-mlockall --total-num-mbufs=3D2048 -ia =3D=3D10258=3D=3D ERROR: This system does not support "RDSEED". Please check that RTE_MACHINE is set correctly. EAL: FATAL: unsupported cpu type. EAL: unsupported cpu type. EAL: Error - exiting with code: 1 Cause: Cannot init EAL: Operation not supported =3D=3D10258=3D=3D =3D=3D10258=3D=3D HEAP SUMMARY: =3D=3D10258=3D=3D in use at exit: 1,388 bytes in 49 blocks =3D=3D10258=3D=3D total heap usage: 97 allocs, 48 frees, 89,426 bytes all= ocated =3D=3D10258=3D=3D =3D=3D10258=3D=3D LEAK SUMMARY: =3D=3D10258=3D=3D definitely lost: 0 bytes in 0 blocks =3D=3D10258=3D=3D indirectly lost: 0 bytes in 0 blocks =3D=3D10258=3D=3D possibly lost: 0 bytes in 0 blocks =3D=3D10258=3D=3D still reachable: 1,388 bytes in 49 blocks =3D=3D10258=3D=3D suppressed: 0 bytes in 0 blocks =3D=3D10258=3D=3D Rerun with --leak-check=3Dfull to see details of leaked m= emory =3D=3D10258=3D=3D =3D=3D10258=3D=3D For lists of detected and suppressed errors, rerun with: = -s =3D=3D10258=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 fr= om 0) Thanks. -- David Marchand