From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqSZp-0001ox-R7 for qemu-devel@nongnu.org; Wed, 13 Apr 2016 17:43:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqSZo-0003OB-V8 for qemu-devel@nongnu.org; Wed, 13 Apr 2016 17:43:57 -0400 Received: from mail-vk0-x22c.google.com ([2607:f8b0:400c:c05::22c]:36283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqSZo-0003O4-Pt for qemu-devel@nongnu.org; Wed, 13 Apr 2016 17:43:56 -0400 Received: by mail-vk0-x22c.google.com with SMTP id c4so87622539vkb.3 for ; Wed, 13 Apr 2016 14:43:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20160413173231.GV3080@yliu-dev.sh.intel.com> References: <1459509388-6185-1-git-send-email-marcandre.lureau@redhat.com> <1459509388-6185-12-git-send-email-marcandre.lureau@redhat.com> <20160413024931.GM3080@yliu-dev.sh.intel.com> <38556601.765791.1460541075761.JavaMail.zimbra@redhat.com> <20160413173231.GV3080@yliu-dev.sh.intel.com> Date: Wed, 13 Apr 2016 23:43:56 +0200 Message-ID: From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yuanhan Liu Cc: "Michael S. Tsirkin" , QEMU , Ilya Maximets , jonshin@cisco.com, Tetsuya Mukawa On Wed, Apr 13, 2016 at 7:32 PM, Yuanhan Liu wrote: >> >> > I'm asking because I found a seg fault issue sometimes, >> > due to opaque is NULL. > > Oh, I was wrong, it's u being NULL, but not opaque. >> > >> >> I would be interested to see the backtrace or have a reproducer. > > It's a normal test steps: start a vhost-user switch (I'm using DPDK > vhost-switch example), kill it, and wait for a while (something like > more than 10s or even longer), then I saw a seg fault: > > (gdb) p dev > $4 =3D (struct vhost_dev *) 0x555556571bf0 > (gdb) p u > $5 =3D (struct vhost_user *) 0x0 > (gdb) where > #0 0x0000555555798612 in slave_read (opaque=3D0x555556571bf0) > at /home/yliu/qemu/hw/virtio/vhost-user.c:539 > #1 0x0000555555a343a4 in aio_dispatch (ctx=3D0x55555655f560) at /hom= e/yliu/qemu/aio-posix.c:327 > #2 0x0000555555a2738b in aio_ctx_dispatch (source=3D0x55555655f560, = callback=3D0x0, user_data=3D0x0) > at /home/yliu/qemu/async.c:233 > #3 0x00007ffff51032a6 in g_main_context_dispatch () from /lib64/libg= lib-2.0.so.0 > #4 0x0000555555a3239e in glib_pollfds_poll () at /home/yliu/qemu/mai= n-loop.c:213 > #5 0x0000555555a3247b in os_host_main_loop_wait (timeout=3D29875848)= at /home/yliu/qemu/main-loop.c:258 > #6 0x0000555555a3252b in main_loop_wait (nonblocking=3D0) at /home/y= liu/qemu/main-loop.c:506 > #7 0x0000555555846e35 in main_loop () at /home/yliu/qemu/vl.c:1934 > #8 0x000055555584e6bf in main (argc=3D31, argv=3D0x7fffffffe078, env= p=3D0x7fffffffe178) > at /home/yliu/qemu/vl.c:4658 > This patch set doesn't try to handle crashes from backend. This would require a much more detailed study of the existing code path. A lot of places assume the backend is fully working as expected. I think handling backend crashes should be a different, later, patch set. --=20 Marc-Andr=C3=A9 Lureau