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 DC127A00C2; Sat, 25 Apr 2020 21:35:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 872D51C19F; Sat, 25 Apr 2020 21:35:08 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 31C701C19E for ; Sat, 25 Apr 2020 21:35:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587843306; 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=Vjb2OF2rwkqDFCGS4ilahATXDpV/o53u87MbN12ltT0=; b=MRgFsyyBn1B2JDkogZkxzbar6GNox1KQu9G4B0s7TnKQUTLYSEsW2EO5jtydKiYD1+h13A R2bBwxl/9MMw+Y2L5x3vxtWSK1roMDn47SVjwPYwSAF7gzy7zcLg1ALcwhU2ZzhTshXaMc mmvz7ym0CFDglvXZcBmF9FtzcunwBxQ= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-351-D08iCxj7O6Kh-rM8BMCr3g-1; Sat, 25 Apr 2020 15:35:02 -0400 X-MC-Unique: D08iCxj7O6Kh-rM8BMCr3g-1 Received: by mail-ua1-f69.google.com with SMTP id z20so7203044uag.19 for ; Sat, 25 Apr 2020 12:35:02 -0700 (PDT) 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=MHgPxTu0Pu/s0C4Zz9fKk9nWHuLqzu+4IfI4u9tdTxQ=; b=qtfB3TNMkOlOu/qEOZ9AxKEWa3yVsLsuUB7XKzWRdGI8/st7RPvEhDH3f2ERV3Ugmr uf8L7+9GvDVO7wGc7611eAWn3HAytcEXXIN3seqfYt/uobCWKCV1qPtvMdawXY0bMQLC 2Cf4RuQhzzNoK/WoPgbGrxP9kHqrpGg+pJFhAd9b188EROl165ABUwS4LVAu7GD+hoj7 uaY9PvXa9s9jc3A8cM+axPXOSCOgDu0CtaVn/LhpsxJCKBPw5hGNcf1hTl0AiJfynmJh Ah6Py1tpY6GKs+JjHEAphH8WUyioBrTODO1UQ4tiCtaPzJgkBzlpX9D/iU/CkQ4foJm2 A+WA== X-Gm-Message-State: AGi0PuZm56MR6AdX9APCBdXdJSHMsFBJm61sVUwJiFBDzvMeMgOATQue hWmrpydots4gaOmvVBaFXJpG3OR9J9JMbssH4X1QEdal0SQlTQIQ9yw/mhlDuNB2ir0sADV+UwV Oxj4OgBQVqkvZvK2W7jk= X-Received: by 2002:ab0:5586:: with SMTP id v6mr9848446uaa.87.1587843302006; Sat, 25 Apr 2020 12:35:02 -0700 (PDT) X-Google-Smtp-Source: APiQypJmIFEzUsejEipHN+zhS/EcHMUgI6SOkAE+O1618pjS/HpVqY3od+NpgcYS8NzgSSQOuCYV1Hjsro7ORuOcMiY= X-Received: by 2002:ab0:5586:: with SMTP id v6mr9848435uaa.87.1587843301568; Sat, 25 Apr 2020 12:35:01 -0700 (PDT) MIME-Version: 1.0 References: <20200104013341.19809-1-stephen@networkplumber.org> In-Reply-To: <20200104013341.19809-1-stephen@networkplumber.org> From: David Marchand Date: Sat, 25 Apr 2020 21:34:50 +0200 Message-ID: To: Stephen Hemminger Cc: dev 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" 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. I was about to push the series (except patch 10), but I hit a crash when passing an invalid option to test-null.sh. Reproduced with: Core was generated by `/home/dmarchan/builds/x86_64-native-linux-gcc+shared+kmods/app/testpmd -c 0x3 --log-level=3D'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007fd5231dba64 in pthread_cancel () from /usr/lib64/libpthread.so.0 Missing separate debuginfos, use: dnf debuginfo-install elfutils-libelf-0.178-7.fc30.x86_64 glibc-2.29-28.fc30.x86_64 jansson-2.12-2.fc30.x86_64 libgcc-9.2.1-1.fc30.x86_64 libpcap-1.9.1-1.fc30.x86_64 numactl-libs-2.0.12-2.fc30.x86_64 zlib-1.2.11-19.fc30.x86_64 (gdb) bt full #0 0x00007fd5231dba64 in pthread_cancel () from /usr/lib64/libpthread.so.0 No symbol table info available. #1 0x00007fd52320c586 in rte_eal_cleanup () at /home/dmarchan/dpdk/lib/librte_eal/linux/eal.c:1339 i =3D 1 #2 0x00007fd523215f5e in rte_exit (exit_code=3Dexit_code@entry=3D1, format=3Dformat@entry=3D0x47ada4 "Cannot init EAL: %s\n") at /home/dmarchan/dpdk/lib/librte_eal/linux/eal_debug.c:83 ap =3D {{gp_offset =3D 24, fp_offset =3D 48, overflow_arg_area =3D 0x7ffecdf7aa70, reg_save_area =3D 0x7ffecdf7a9a0}} #3 0x000000000043535b in main (argc=3D21, argv=3D0x7ffecdf7abc8) at /home/dmarchan/dpdk/app/test-pmd/testpmd.c:3647 diag =3D -1 port_id =3D count =3D ret =3D (gdb) f 1 #1 0x00007fd52320c586 in rte_eal_cleanup () at /home/dmarchan/dpdk/lib/librte_eal/linux/eal.c:1339 1339 pthread_cancel(lcore_config[i].thread_id); (gdb) p lcore_config[1].thread_id $1 =3D 0 rte_eal_cleanup() is called from rte_exit() by testpmd. But since rte_eal_init() failed at parsing, lcore_config[*].thread_id are invalid, and we crash on pthread_cancel. I have no quick idea to fix this, series postponed to rc2. --=20 David Marchand