Received: from eggs.gnu.org ([2001:4830:134:3::10]:35854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drjs9-0002a2-Aq for qemu-devel@nongnu.org; Tue, 12 Sep 2017 08:01:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drjs3-0003wT-Bt for qemu-devel@nongnu.org; Tue, 12 Sep 2017 08:00:57 -0400 Received: from fanzine.igalia.com ([91.117.99.155]:44865) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1drjs3-00034l-01 for qemu-devel@nongnu.org; Tue, 12 Sep 2017 08:00:51 -0400 From: Alberto Garcia In-Reply-To: <59B7C252.1070004@huawei.com> References: <59B7C252.1070004@huawei.com> Date: Tue, 12 Sep 2017 14:00:04 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] =?utf-8?q?question=EF=BC=9A_I_found_a_bug_which_wil?= =?utf-8?q?l_lead_to_qemu_crash?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "WangJie (Captain)" , Kevin Wolf , stefanha@redhat.com, famz@redhat.comwangjie88@huawei.com Cc: qemu-devel@nongnu.org, pbonzini@redhat.com On Tue 12 Sep 2017 01:17:38 PM CEST, WangJie (Captain) wrote: > Hi, Kevin. > > I found a bug about qemu-kvm(version 2.7.0-rc0 adn 2.8.1). but qemu 2.6.0= and current master is OK. > So I git-bisect the master branch=EF=BC=8Cand I found the patch you commi= ted (block: Decouple throttling from BlockDriverState) lead the bug into qe= mu. > > The patch which lead the bug into qemu: (https://github.com/qemu/qemu/com= mit/7ca7f0f6db1fedd28d490795d778cf23979a2aa7#diff-ea36ba0f79150cc299732696a= 069caba) > > Because the current master is OK. So I think you had fixed it , can you t= ell me which patch fixed the bug? Thank you :> > > > the bug is that: qemu will crash when loop to attach and detach a disk wh= ich configured qos to a VM for a while. > > > *Segmentation fault info(qemu 2.7.0-rc0):* > Using host libthread_db library "/lib64/libthread_db.so.1". > Core was generated by `/usr/bin/qemu-kvm -name guest=3Dwangjie-i-clone203= _rhel_7.3_64_guestosdev,debug-t'. > Program terminated with signal 11, Segmentation fault. > #0 0x00007fe960413e3c in throttle_group_next_blk (blk=3D0x11) at block/t= hrottle-groups.c:160 That's clearly an invalid pointer, so the code is iterating over a BlockBackend that has either been freed or is not on the throttle_groups list anymore. Commit 6bf77e1c2dc24da1bade16e8a9a637f3b127314d fixed a problem in which the code was not iterating the list correctly, although I don't think that would have caused any crash. Did you try using git-bisect to find the commit that fixed the bug? Berto