When use ovs-vsctl to delete vhostuserclient port while qemu destroy virtio, 
there is a deadlock between OVS main thread and the vhost-events thread.

openvswitch is 2.14 and dpdk is 20.11

Main thread:
ofport_remove
  -> netdev_unref
      -> netdev_dpdk_vhost_destruct
           -> rte_vhost_driver_unregister (If fdentry is busy, circle again 
until the fdentry is not busy)
               -> fdset_try_del  (fdentry is busy now, return -1. Goto again)

vhost-nets thread:
fdset_event_dispatch (set fdentry to busy. When destroy_device fuction return 
set the fdentry to no busy)
   -> vhost_user_read_cb 
     -> vhost_user_msg_handler
         -> vhost_user_get_vring_base
             ->destroy_device 
                -> ovsrcu_synchronize (Wait for other threads to quiesce)

The  vhost-nets thread wait for main thread to quiesce, but the main thread now 
is waiting for fdentry to no busy 
and circle all the time.  

Whether the ovsrcu_synchronize  is necessary in destrory_device or the 
rte_vhost_driver_unregister is correct in fdset_try_del ?

Best regards, Han Ding.


_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to