@@ -412,7 +412,6 @@ VHostNetState *get_vhost_net(NetClientState *nc)
break;
case NET_CLIENT_DRIVER_VHOST_USER:
vhost_net = vhost_user_get_vhost_net(nc);
- assert(vhost_net);
(gdb) bt
#0 qemu_chr_disconnect (chr=0x0) at qemu-char.c:4081
#1 0x00007fdb4f538cf0 in net_vhost_user_watch (chan=<optimized out>, cond=<optimized out>, opaque=<optimized out>) at net/vhost-user.c:195
#2 0x00007fdb4cd617aa in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#3 0x00007fdb4f5798f0 in glib_pollfds_poll () at main-loop.c:213
#4 os_host_main_loop_wait (timeout=<optimized out>) at main-loop.c:258
#5 main_loop_wait (nonblocking=<optimized out>) at main-loop.c:506
#6 0x00007fdb4f2dbfa7 in main_loop () at vl.c:1909
#7 main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:4618
I think it`s because vhost-user client mode , 2.7+ version new function(reconnect). After qemu char-remove, the watch fd process didn`t stop. When ovs-dpdk remove port and close watch fd, qemu crashed.
Thanks
Huanghuai
At 2017-01-11 23:02:26, "Marc-André Lureau" <marcandre.lureau@gmail.com> wrote:
Hi
On Wed, Jan 11, 2017 at 3:32 PM 黄淮 <h158309@126.com> wrote:
From: Huai Huang<h158309@126.com>
Could you describe a bit more the crash and provide a backtrace?
@@ -412,7 +412,6 @@ VHostNetState *get_vhost_net(NetClientState *nc)
break;
case NET_CLIENT_DRIVER_VHOST_USER:
vhost_net = vhost_user_get_vhost_net(nc);
- assert(vhost_net);
This was recently added, in commit 1a5b68cee8a2b165ffd61b2e0641a4da3990f242.
How is it related?
I remember the rest of the vhost-user code expected get_vhost_net() to be non-null, did that change?
break;
default:
break;
@@ -160,7 +160,10 @@ static void vhost_user_cleanup(NetClientState *nc)
qemu_chr_fe_release(s->chr);
s->chr = NULL;
}
-
+ if (s->watch) {
+ g_source_remove(s->watch);
+ s->watch = 0;
+ }