DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>
Cc: dev <dev@dpdk.org>, Jie Zhou <jizh@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH v2] mem: fix cleanup when multi-process is disabled
Date: Fri, 9 Apr 2021 14:00:11 +0200
Message-ID: <CAJFAV8yso7MM6Gr8F21wwZzg+Pxev5nbecR3_E2A_8_0byE-yQ@mail.gmail.com> (raw)
In-Reply-To: <20210324193227.15497-1-dmitry.kozliuk@gmail.com>

On Wed, Mar 24, 2021 at 8:32 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> 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


      parent reply	other threads:[~2021-04-09 12:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 18:01 [dpdk-dev] [PATCH] mem: fix cleanup on Windows Dmitry Kozlyuk
2021-03-24 18:35 ` David Marchand
2021-03-24 19:32 ` [dpdk-dev] [PATCH v2] mem: fix cleanup when multi-process is disabled Dmitry Kozlyuk
2021-03-25 15:39   ` Ranjit Menon
2021-03-26 12:34   ` Burakov, Anatoly
2021-03-26 16:15   ` David Marchand
2021-04-09 12:00   ` David Marchand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJFAV8yso7MM6Gr8F21wwZzg+Pxev5nbecR3_E2A_8_0byE-yQ@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=jizh@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git