From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avOop-0005PV-D4 for qemu-devel@nongnu.org; Wed, 27 Apr 2016 08:43:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avOoo-0006jc-A8 for qemu-devel@nongnu.org; Wed, 27 Apr 2016 08:43:51 -0400 References: <1455546821-6671-1-git-send-email-berrange@redhat.com> <1455546821-6671-2-git-send-email-berrange@redhat.com> <8737q7ierk.fsf@dusky.pond.sub.org> <20160427095848.GA17937@redhat.com> From: Eric Blake Message-ID: <5720B3FF.8080405@redhat.com> Date: Wed, 27 Apr 2016 06:43:43 -0600 MIME-Version: 1.0 In-Reply-To: <20160427095848.GA17937@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WA6EVXIwBHrJwWpvm4HRhH9C5ChPkKmDS" Subject: Re: [Qemu-devel] [PATCH v6 01/10] qom: add helpers for UserCreatable object types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , Markus Armbruster Cc: qemu-devel@nongnu.org, Kevin Wolf , Paolo Bonzini , qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WA6EVXIwBHrJwWpvm4HRhH9C5ChPkKmDS Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/27/2016 03:58 AM, Daniel P. Berrange wrote: > On Wed, Apr 27, 2016 at 11:26:23AM +0200, Markus Armbruster wrote: >> This commit regresses error message quality from >> >> $ qemu-system-x86_64 -nodefaults -display none -object secret,id=3D= sec0,data=3Dletmein,format=3Draw,foo=3Dbar >> qemu-system-x86_64: -object secret,id=3Dsec0,data=3Dletmein,format= =3Draw,foo=3Dbar: Property '.foo' not found >> >> to just >> >> qemu-system-x86_64: Property '.foo' not found >=20 > I'm not seeing that behaviour myself in current git master, nor > immediately before or after 90998d58964cd17f8b0b03800b0a4508f8b543da > is applied. I always just get >=20 > $ ./x86_64-softmmu/qemu-system-x86_64 -nodefaults -display none -objec= t secret,id=3Dsec0,data=3Dletmein,format=3Draw,foo=3Dbar > qemu-system-x86_64: -object secret,id=3Dsec0,data=3Dletmein,format=3Dr= aw,foo=3Dbar: Property '.foo' not found >=20 > So it all appears to be working correctly. How reliably reproducable > is it for you ? I'm testing on Fedora 23 x86_64 host and can't > see the failure despite many invokations. I'm reproducing it on my F23 machine, where 90998d58 indeed flips the behavior I'm seeing. Maybe it's a factor of which malloc engine is in use, or level of compiler optimization? My config.status states: exec '/home/eblake/qemu/configure' '--enable-kvm' '--enable-system' '--disable-user' '--target-list=3Dx86_64-softmmu,ppc64-softmmu' '--enable-debug' >=20 >> Clue: cur_loc points to garbage. >> >> (gdb) p cur_loc >> $1 =3D (Location *) 0x7fffffffdc10 >> (gdb) p *cur_loc >> $2 =3D {kind =3D (unknown: 4294958128), num =3D 32767,=20 >> ptr =3D 0x555555b804a2 , prev =3D 0x5555565= d2770 } >> >> Looks like cur_loc is dangling. Happens when you forget to loc_pop() = a >> Location before it dies. This one is on the stack. >> >> *Might* be release critical. >=20 > This patch doesn't even touch any code which calls loc_push/loc_pop > so I'm kind of surprised if this patch breaks it. Given that it looks > like stack corruption though, I wonder if this commit has just exposed > an already latent non-deterministic bug for you ? IOW root cause could > be an earlier patch ? Could it be a latent bug in qemu_opts_foreach()? Your patch changes a call from qemu_opts_foreach(object_create) to qemu_opts_foreach(user_creatable_add_opts_foreach), where the new callback may expose different behavior to the stack and thus expose the latent problem. >>> @@ -4417,8 +4360,9 @@ int main(int argc, char **argv, char **envp) >>> } >>> =20 >>> if (qemu_opts_foreach(qemu_find_opts("object"), >>> - object_create, >>> - object_create_delayed, NULL)) { >>> + user_creatable_add_opts_foreach, >>> + object_create_delayed, &err)) { >>> + error_report_err(err); >>> exit(1); >>> } >=20 > Regards, > Daniel >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --WA6EVXIwBHrJwWpvm4HRhH9C5ChPkKmDS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXILP/AAoJEKeha0olJ0NqLKcH/1LAOaoZU8R78JxEtwUD8vPS 8qSoKYGdVtSvZXrYXhfp+gJTEEoqzT+h25T0iN1fpB3WX/3+G4jhOCS4ok3wokP/ GWO5qMFxnuvRv6kBZbN8+0VZmEiGMGM9C3LfSCyNYEO2ROwMTzaQ34csRmdTO7QX tFO5snc1TLs1e51DRK6R5COJuV6bntmKvRG8uQT1jLe8QvMru8Eamu8WaC2H76mo i8LBmsqWI/x/qkJibzM1/008gk/ovU69utjqbxO6hokvC33nMOUr3lUtGSniA+5s sA5WsCBLqHQSTczePDWBFaE5F5Bm26iJHmc/pdbwVnCqTmioBfV0Ecb26PgHOEY= =PYT0 -----END PGP SIGNATURE----- --WA6EVXIwBHrJwWpvm4HRhH9C5ChPkKmDS--