Received: from eggs.gnu.org ([2001:4830:134:3::10]:40033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPKWt-0000pU-J4 for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:13:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPKWr-0002sL-Cl for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:13:02 -0400 Date: Tue, 19 Jul 2016 10:12:52 +0800 From: Fam Zheng Message-ID: <20160719021252.GB18103@ad.usersys.redhat.com> References: <1468876979-13537-1-git-send-email-vsementsov@virtuozzo.com> <578D4996.2050503@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <578D4996.2050503@virtuozzo.com> Subject: Re: [Qemu-devel] [PATCH] backup: block-job error BUG List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy Cc: qemu-block@nongnu.org, kwolf@redhat.com, jcody@redhat.com, qemu-devel , mreitz@redhat.com, stefanha@redhat.com, den@openvz.org On Tue, 07/19 00:26, Vladimir Sementsov-Ogievskiy wrote: > forget qemu-devel@nongnu.org.. add it. > > On 19.07.2016 00:22, Vladimir Sementsov-Ogievskiy wrote: > > Hi all! > > > > This is a variant of existing test case which produces test failure. > > > > It looks like the reason is: > > > > one block job is in backup_complete, in synchronous bdrv_flush (success job) > > other (job with injected io err) tries to synchronously cancel "success job" > > It looks like some kind of dead-lock > > > > -.......... > > +........EEE > > +====================================================================== > > +ERROR: test_transaction_failure (__main__.TestIncrementalBackup) > > +Test: Verify backups made from a transaction that partially fails. > > +---------------------------------------------------------------------- > > +Traceback (most recent call last): > > + File "124", line 478, in test_transaction_failure > > + self.wait_qmp_backup_cancelled(drive0['id']) > > + File "124", line 173, in wait_qmp_backup_cancelled > > + match={'data': {'device': device}}) > > + File "/work/src/qemu/tests/qemu-iotests/iotests.py", line 308, in event_wait > > + event = self._qmp.pull_event(wait=timeout) > > + File "/work/src/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 194, in pull_event > > + self.__get_events(wait) > > + File "/work/src/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 109, in __get_events > > + raise QMPTimeoutError("Timeout waiting for event") > > +QMPTimeoutError: Timeout waiting for event > > + > > +====================================================================== > > +ERROR: test_transaction_failure (__main__.TestIncrementalBackup) > > +Test: Verify backups made from a transaction that partially fails. > > +---------------------------------------------------------------------- > > +Traceback (most recent call last): > > + File "124", line 272, in tearDown > > + self.vm.shutdown() > > + File "/work/src/qemu/tests/qemu-iotests/iotests.py", line 260, in shutdown > > + self._qmp.cmd('quit') > > + File "/work/src/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 172, in cmd > > + return self.cmd_obj(qmp_cmd) > > + File "/work/src/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 157, in cmd_obj > > + return self.__json_read() > > + File "/work/src/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 66, in __json_read > > + data = self.__sockfile.readline() > > + File "/usr/lib64/python2.7/socket.py", line 447, in readline > > + data = self._sock.recv(self._rbufsize) > > +timeout: timed out > > + > > +====================================================================== > > +ERROR: test_incremental_failure (__main__.TestIncrementalBackupBlkdebug) > > +Test: Verify backups made after a failure are correct. > > +---------------------------------------------------------------------- > > +Traceback (most recent call last): > > + File "124", line 549, in setUp > > + self.vm.launch() > > + File "/work/src/qemu/tests/qemu-iotests/iotests.py", line 246, in launch > > + self._qmp = qmp.QEMUMonitorProtocol(self._monitor_path, server=True) > > + File "/work/src/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 44, in __init__ > > + self.__sock.bind(self.__address) > > + File "/usr/lib64/python2.7/socket.py", line 224, in meth > > + return getattr(self._sock,name)(*args) > > +error: [Errno 98] Address already in use > > + > > ---------------------------------------------------------------------- > > Ran 10 tests > > > > -OK > > +FAILED (errors=3) > > Failures: 124 > > > > Signed-off-by: Vladimir Sementsov-Ogievskiy > > --- > > tests/qemu-iotests/124 | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 > > index de7cdbe..74de117 100644 > > --- a/tests/qemu-iotests/124 > > +++ b/tests/qemu-iotests/124 > > @@ -448,9 +448,9 @@ class TestIncrementalBackup(TestIncrementalBackupBase): > > self.assertFalse(self.vm.get_qmp_events(wait=False)) > > # Emulate some writes > > - self.hmp_io_writes(drive0['id'], (('0xab', 0, 512), > > - ('0xfe', '16M', '256k'), > > - ('0x64', '32736k', '64k'))) > > + #self.hmp_io_writes(drive0['id'], (('0xab', 0, 512), > > + # ('0xfe', '16M', '256k'), > > + # ('0x64', '32736k', '64k'))) This patch doesn't make any sense to me. If this is a deadlock in QEMU, shouldn't we fix the code instead of randomly commenting out a few lines in the test case? I cannot reproduce this on master. Could you post a backtrace where the block job is stopped? Fam > > self.hmp_io_writes(drive1['id'], (('0xba', 0, 512), > > ('0xef', '16M', '256k'), > > ('0x46', '32736k', '64k'))) > > > -- > Best regards, > Vladimir > >