| 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@dpdk.org |
| Reporter | stephen@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.