From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5TTx-0005Tg-ON for qemu-devel@nongnu.org; Thu, 18 Jun 2015 02:39:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5TTs-0006nQ-Qj for qemu-devel@nongnu.org; Thu, 18 Jun 2015 02:39:25 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:45532 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5TTs-0006nG-FM for qemu-devel@nongnu.org; Thu, 18 Jun 2015 02:39:20 -0400 Message-ID: <55826789.6080008@kamp.de> Date: Thu, 18 Jun 2015 08:39:05 +0200 From: Peter Lieven MIME-Version: 1.0 References: <55803637.3060607@kamp.de> <20150617083539.GA4202@noname.str.redhat.com> In-Reply-To: <20150617083539.GA4202@noname.str.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Stefan Hajnoczi Cc: qemu-devel , qemu block Am 17.06.2015 um 10:35 schrieb Kevin Wolf: > Am 16.06.2015 um 17:34 hat Stefan Hajnoczi geschrieben: >> On Tue, Jun 16, 2015 at 3:44 PM, Peter Lieven wrote: >>> I wonder how difficult it would be to have the IDE CDROM run in its own >>> thread? >>> We usually have ISOs mounted on an NFS share as CDROM. Problem: If the NFS >>> Share >>> goes down, it takes down monitor, qmp, vnc etc. with it. >>> >>> Maybe its already possible to do this via cmdline args? >>> >>> Any ideas, comments? >> If QEMU hangs in the read/write/flush/discard code path due to NFS >> downtime it is a bug. >> >> QEMU is expected to hang in open/reopen because those are performed in >> a blocking fashion. >> >> Which of these cases applies to what you are seeing? Maybe it can be fixed. > Don't forget bdrv_drain_all(), which is called a lot by the monitor. So > no matter what you do (and this includes moving to a thread as in a > hypothetical "ATAPI dataplane"), you end up with a hang sooner or later. It seems like the mainloop is waiting here: #0 0x00007ffff606c89c in __lll_lock_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 No symbol table info available. #1 0x00007ffff6068065 in _L_lock_858 () from /lib/x86_64-linux-gnu/libpthread.so.0 No symbol table info available. #2 0x00007ffff6067eba in pthread_mutex_lock () from /lib/x86_64-linux-gnu/libpthread.so.0 No symbol table info available. #3 0x00005555559f2557 in qemu_mutex_lock (mutex=0x555555ed6d40) at util/qemu-thread-posix.c:76 err = 0 __func__ = "qemu_mutex_lock" #4 0x00005555556306ef in qemu_mutex_lock_iothread () at /usr/src/qemu-2.2.0/cpus.c:1123 No locals. #5 0x0000555555954a87 in os_host_main_loop_wait (timeout=79413589) at main-loop.c:242 ret = 1 spin_counter = 0 #6 0x0000555555954b5f in main_loop_wait (nonblocking=0) at main-loop.c:494 ret = 15 timeout = 4294967295 timeout_ns = 79413589 #7 0x000055555575e702 in main_loop () at vl.c:1882 nonblocking = false last_io = 1 Peter