patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Harry van Haaren <>
	Harry van Haaren <>,,
Subject: [dpdk-stable] [PATCH] examples/eventdev_pipeline: fix segfault on exit
Date: Tue,  5 May 2020 10:39:04 +0100
Message-ID: <> (raw)

This commit fixes a segfault on exit by using Ctrl^C if the master lcore
was also being used as a worker core. The root cause of the issue was
that the interrupt handler was cleaning up resources such as the ethdev
and eventdev ports, and once the interrupt handler would return, that
thread would continue working as an eventdev worker, and dereference the
memory which just had free() called on it.

Fixed by moving the cleanup code from the interrupt handler to the
cleanup stage of main(), which the master thread will execute once
it has returned from its worker() functionality.

Fixes: 085edac2ca38 ("examples/eventdev_pipeline: support Tx adapter")

Signed-off-by: Harry van Haaren <>


 examples/eventdev_pipeline/main.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index d0da51b1c..21958269f 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -301,12 +301,6 @@ signal_handler(int signum)
-		RTE_ETH_FOREACH_DEV(portid) {
-			rte_eth_dev_close(portid);
-		}
-		rte_event_dev_stop(0);
-		rte_event_dev_close(0);
 	if (signum == SIGTSTP)
 		rte_event_dev_dump(0, stdout);
@@ -469,5 +463,14 @@ main(int argc, char **argv)
+		rte_eth_dev_close(portid);
+	}
+	rte_event_dev_stop(0);
+	rte_event_dev_close(0);
+	rte_eal_cleanup();
 	return 0;

             reply	other threads:[~2020-05-05  9:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  9:39 Harry van Haaren [this message]
2020-05-07 10:07 ` Zhou, JunX W
2020-05-11 16:39   ` Thomas Monjalon

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:

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

  git send-email \ \ \ \ \ \ \

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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/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 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone