Dear all:
        I am developing a vpp client built with govpp by using “AsyncConnect” 
function. The first time I run the client before or after vpp, everything is 
ok. After I restart vpp while keeping the client running, the CPU usage of the 
client becomes high to around 70%.
       I have found the problem and solved it. I didn’t find any Jira ticket 
entry, so I posted here and I hope the developers would solve it in next 
release. Thanks.

      I used “top -H” and gdb to find the high cpu usage thread which is 
“vac_timeout_thread_fn” in file “src/vpp-api/client/client.c”. The first time 
it blocked in “pthread_cond_wait”, which won’t take cpu.
     but in second time, it runs the loop all the time because 
“timeout_in_progress” becomes true and “read_timeout” is still zero, which make 
“pthread_cond_timedwait” always returns.

     I found the problem is in “vac_disconnect” , it calls “set_timeout(0)”, 
which will make the issue above happend.
      In fact, “vac_disconnect” should call “unset_timeout()” to make thread 
quit gracefully and keep the global variables connect.


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

View/Reply Online (#13253): https://lists.fd.io/g/vpp-dev/message/13253
Mute This Topic: https://lists.fd.io/mt/32015501/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