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 04B3DA0579; Fri, 9 Apr 2021 14:00:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6031140ECF; Fri, 9 Apr 2021 14:00:26 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 1216C4013F for ; Fri, 9 Apr 2021 14:00:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617969625; 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: in-reply-to:in-reply-to:references:references; bh=cCNEiz63g+JOpaqgtQsTRoPW7Ku7ECol6R9fwD+0B7M=; b=JNfQpvoZonVHVVF93rwLsSuHATZCptJ1g+Le0yzzcL8rShSAIAouRVNVVOWSveSsOC9jBN dKE2q+asHhObCNRKosGKF1iRnZjvoLbrCGTih9kTCDbcUVAwBgw9CtU3kQ49c9n/I5OlwR 4Bv/OyuNPfjE6Yc6DMbpIoHSYwkQc5c= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-383-M0FwapDfNhK2LvDt7tf7ZA-1; Fri, 09 Apr 2021 08:00:23 -0400 X-MC-Unique: M0FwapDfNhK2LvDt7tf7ZA-1 Received: by mail-vk1-f198.google.com with SMTP id h75so1165538vka.9 for ; Fri, 09 Apr 2021 05:00:23 -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=cCNEiz63g+JOpaqgtQsTRoPW7Ku7ECol6R9fwD+0B7M=; b=gK6H8M+xU/7qW6NpPpMhZS2oObK5FR51rDdUDC261NIXcPrFuuq3L6j/KY4jUuBOPi N8wHykLRoC0UniojmExLRLIu6OsahUYPRT5fn374sPhMLBEfXTF8hKY/n1QMtuAh4GVv 80uOdMNhtyomLo0xPt+f5gSsZbxJmS/1Qe1tugKyOB0Ma2G21OWNePtYf2RWdHNr40BK OnBbkJGEwv1xdFmPKRmuavTLfSOq3VDBKp8VShjzfDDkHSK8LiIvw/l+rkvypU7K/2ap wf7BCERES98r/tflrlBgMtepZXP0buz+W1Wf4c+6JvUxWfp7ejBz07IIN4RasqUH3SsL PDEA== X-Gm-Message-State: AOAM532H27wMKQpnO2AMTBx8E+3LUlP0/ymZLJj2t7jB5QC1fDAX7cPb EsdcwEwhVJifZd+3hhBB0WqXWBnOGjL/c/6dE/Dv9gzQ1WvfCLEJN8FHA/T2ElnQJJEIzze9JF4 8tt0fwk8OVzPEk6HQTSs= X-Received: by 2002:a67:f895:: with SMTP id h21mr10745375vso.17.1617969623343; Fri, 09 Apr 2021 05:00:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMAeoa4m5ZHXzrGUAKxRRqTuWIX5pvnkkpFHbgL2o+tN7BnhFR/pHd6tQt2QBkemkDHLOsmLBpH3NnrOEqAs0= X-Received: by 2002:a67:f895:: with SMTP id h21mr10745363vso.17.1617969623075; Fri, 09 Apr 2021 05:00:23 -0700 (PDT) MIME-Version: 1.0 References: <20210324180128.32752-1-dmitry.kozliuk@gmail.com> <20210324193227.15497-1-dmitry.kozliuk@gmail.com> In-Reply-To: <20210324193227.15497-1-dmitry.kozliuk@gmail.com> From: David Marchand Date: Fri, 9 Apr 2021 14:00:11 +0200 Message-ID: To: Dmitry Kozlyuk , Anatoly Burakov Cc: dev , Jie Zhou Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2] mem: fix cleanup when multi-process is disabled 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 Sender: "dev" On Wed, Mar 24, 2021 at 8:32 PM Dmitry Kozlyuk wrote: > @@ -1050,7 +1055,10 @@ rte_eal_memory_detach(void) > * config - we can't zero it out because it might still be referenced > * by other processes. > */ > - rte_mem_unmap(mcfg, RTE_ALIGN(sizeof(*mcfg), page_sz)); > + if (internal_conf->no_shconf == 0) > + if (rte_mem_unmap(mcfg, RTE_ALIGN(sizeof(*mcfg), page_sz)) != 0) > + RTE_LOG(ERR, EAL, "Could not unmap shared memory config: %s\n", > + rte_strerror(rte_errno)); > rte_eal_get_configuration()->mem_config = NULL; > > return 0; We have another issue if eal init fails early, then the application exits calling rte_exit() -> rte_eal_cleanup() -> rte_eal_memory_detach() The issue itself is not related to this current change but rather to dfbc61a2f9a6 ("mem: detach memsegs on cleanup"), but it became visible with the above log. Example: $ ./build/app/dpdk-testpmd --plop ... EAL: FATAL: Invalid 'command line' arguments. EAL: Invalid 'command line' arguments. EAL: Error - exiting with code: 1 Cause: Cannot init EAL: Invalid argument EAL: Could not unmap shared memory config: Invalid argument -- David Marchand