Skip to content

Wait for workers before cleaning up#787

Open
PlagueCZ wants to merge 1 commit into
mainfrom
fix/quit-wait
Open

Wait for workers before cleaning up#787
PlagueCZ wants to merge 1 commit into
mainfrom
fix/quit-wait

Conversation

@PlagueCZ

Copy link
Copy Markdown
Contributor

During heavy packet processing, if dpservice is being stopped, it is possible for the main thread to start cleaning up before workers are done with the last packet (before checking force_quit). In this case the code could touch some memory that is already freed.

I guess this is rare and really an edge case, but this is the right pattern when working with worker threads.

Only downside I can see is that rte_eal_mp_wait_lcore() could block forever. But we are running as a pod, so kubernetes will simply SIGKILL after 30s anyway. Which is not ideal, but again, this seems like a rare case.

Discovered during testing #784

@PlagueCZ PlagueCZ requested a review from a team as a code owner June 21, 2026 20:14
@github-actions github-actions Bot added bug Something isn't working size/XS labels Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size/XS

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant