Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vhost: fix remove vf reconnect crash #36

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

yajwu
Copy link
Collaborator

@yajwu yajwu commented Aug 28, 2023

In rte_vhost_driver_unregister which is called from vdpa-rpc thread, vsocket should be removed from reconn_list again after remove vsocket from conn_list. Because vhost_user_read_cb which is called in vhost-events thread can add vsocket to reconn_list again.

When qemu close domain socket server, vhost_user_read_cb will be called to clean up vhost device.

vsocket->path is NULL

RM: 3585558

In rte_vhost_driver_unregister which is called from vdpa-rpc thread,
vsocket should be removed from reconn_list again after remove vsocket
from conn_list. Because vhost_user_read_cb which is called in vhost-events
thread can add vsocket to reconn_list again.

When qemu close domain socket server, vhost_user_read_cb will be called
to clean up vhost device.

vsocket->path is NULL

    #0  0x00007f07665834d1 in __strnlen_sse2 () from /lib64/libc.so.6
    Mellanox#1  0x00007f076aee79da in vhost_user_add_connection (fd=160, vsocket=0x7f070406d160) at ../lib/vhost/socket.c:226
    Mellanox#2  0x00007f076aee7d63 in vhost_user_client_reconnect (arg=<optimized out>) at ../lib/vhost/socket.c:481
    Mellanox#3  0x00007f07668cbdd5 in start_thread () from /lib64/libpthread.so.0
    Mellanox#4  0x00007f07665f4ead in clone () from /lib64/libc.so.6

RM: 3585558
Signed-off-by: Yajun Wu <yajunw@nvidia.com>
@kailiangz1 kailiangz1 merged commit 2bd0e06 into Mellanox:main Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants