[Bug 1290] rte_exit will hang if called from worker or service thread

bugzilla at dpdk.org bugzilla at dpdk.org
Mon Sep 18 20:53:06 CEST 2023


https://bugs.dpdk.org/show_bug.cgi?id=1290

            Bug ID: 1290
           Summary: rte_exit will hang if called from worker or service
                    thread
           Product: DPDK
           Version: 23.07
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: dev at dpdk.org
          Reporter: stephen at networkplumber.org
  Target Milestone: ---

Calling rte_exit in a thread other than main thread won't work because
the cleanup code is calling rte_eal_cleanup, and inside that it ends
up waiting for all workers.  Since the thread you are calling from
is a worker, it ends up waiting for itself.

rte_exit()
        rte_eal_cleanup()
                rte_service_finalize()
                        rte_eal_mp_wait_lcore()


void
rte_eal_mp_wait_lcore(void)
{
        unsigned lcore_id;

        RTE_LCORE_FOREACH_WORKER(lcore_id) {
                rte_eal_wait_lcore(lcore_id);
        }
}

Either service handling needs to be smarter, the rte_exit() function
check if it is called from main lcore, and/or documentation needs update.
Not a simple fix because in order to safely do the cleanup logic
all threads have to gone to a quiescent state.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20230918/f70e0aa9/attachment.htm>


More information about the dev mailing list