Skip to content

Conversation

@jinliu777
Copy link
Contributor

Issue description

An infinite loop can occur in the DPDK timer subsystem under the following conditions:

  1. A primary process and one or more secondary processes are running.
  2. A secondary process is terminated and then restarted.
  3. Upon restart, the secondary process enters an infinite loop.

Root cause

The head of the DPDK timer's linked list is located in shared memory, which is managed and owned by the primary process.

When a secondary process restarts, it re-executes its initialization routines, including the one for freebsd_clock. This routine attempts to add a timer to the linked list. However, since the list already exists and was never cleaned up from the secondary process's perspective, this operation incorrectly links the timer back to itself, creating a cycle in the list. Consequently, any code that subsequently traverses this corrupted list enters an infinite loop.

Solution

  1. Ensure the freebsd_clock timer is stopped and removed during graceful shutdown.
  2. Re-initialize the process-local timer state on startup to guarantee a clean start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant