Hi,

I am on VPP 18.01.

I see the following while loop in the
vlib_worker_thread_barrier_sync_int function
(src/vlib/threads.c)
 while (*vlib_worker_threads->workers_at_barrier != count)
    {
      if ((now = vlib_time_now (vm)) > deadline)
        {
          fformat (stderr, "%s: worker thread deadlock\n", __FUNCTION__);
          os_panic ();
        }
    }
Suppose I have 4 workers (and 1 main thread), so the value of count will be 4.
Each worker bumps up the workers_at_barrier by 1.
So if the while loop in its sampling misses seeing the value bumping
by the third worker, and the 4th worker bumps up the value, then
workers_at_barrier will become 5 and the while will never break
eventually missing the deadline.

I am seeing this happening occasionally on some of my setups.

Do you think it is safe to change the while like this instead  ?

while (*vlib_worker_threads->workers_at_barrier <= count)

Regards
-Prashant
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11218): https://lists.fd.io/g/vpp-dev/message/11218
Mute This Topic: https://lists.fd.io/mt/28122014/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to