From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avRsq-0000KX-98 for qemu-devel@nongnu.org; Wed, 27 Apr 2016 12:00:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avRsk-000158-98 for qemu-devel@nongnu.org; Wed, 27 Apr 2016 12:00:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avRsk-00014k-4z for qemu-devel@nongnu.org; Wed, 27 Apr 2016 12:00:06 -0400 References: <1460689374-9690-1-git-send-email-saxenap.ltc@gmail.com> <1460689374-9690-3-git-send-email-saxenap.ltc@gmail.com> From: Eric Blake Message-ID: <5720E204.1090101@redhat.com> Date: Wed, 27 Apr 2016 10:00:04 -0600 MIME-Version: 1.0 In-Reply-To: <1460689374-9690-3-git-send-email-saxenap.ltc@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="m5VVBicom3hXiAgj9rxGXlJjOSfqRCCiI" Subject: Re: [Qemu-devel] [PATCH 2/2] Debug : Add error messages before a call to debug(). List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Prerna Saxena , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --m5VVBicom3hXiAgj9rxGXlJjOSfqRCCiI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/14/2016 09:02 PM, Prerna Saxena wrote: > Qemu code has abort() calls in various places which raises a SIGABRT; > This patch adds error messages before (most)calls to abort(), so that > it is easier to determine why QEMU died. The subject line says you are adding messages before debug(), but the rest of the patch is adding message before abort(). You'll need to fix that. Also, subject lines usually don't end in '.' > +++ b/block.c > @@ -3725,6 +3725,7 @@ void bdrv_remove_aio_context_notifier(BlockDriver= State *bs, > } > } > =20 > + error_report("Matching context notifier not found for removal. Abo= rting"); > abort(); The "Aborting" part of the message is redundant; it's pretty obvious that qemu aborted. I also wonder if you should be using g_assert_not_reached() instead of abort() in some (all?) of the places touched in this patch - at which point you don't have to worry about inventing a message that will never be printed. The reason I suggest it is that g_assert_not_reached() is self-documenting, and prints a nicer message than abort() if it does accidentally get reached. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --m5VVBicom3hXiAgj9rxGXlJjOSfqRCCiI 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/ iQEcBAEBCAAGBQJXIOIFAAoJEKeha0olJ0Nq3tkH/2sOQg9aKLIhl7Jt2do3IA5G 8nOjVrDz4YejjHNboKFluAG0VkOQQXwYtyqX6HrKdzv2yW2vLQkS7WX1zA0lDGGb KdlWzfJboa046Q9TrxP2nilLTA5s947qO0KrLup4WCU5f0am+GW5U/xD70l5+dQx ICzGTHzqtk0spcXN0wfegRRxMquMMRqVveT3nkQU5qZ/csSrswxs4g6piGtKx5IE ghSXAjac4fchGoMLkt4QijVT+Mqo/7uxWwpTulb1UzSfBFbsM2BOonAM0VFO8vhY 7F6oCznyglgiBFPGTNRQQaVbZWbufe3xon+si93tqqsyNBeASOEG1ZyUfhmNcMg= =YIhM -----END PGP SIGNATURE----- --m5VVBicom3hXiAgj9rxGXlJjOSfqRCCiI--