From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAesa-00046W-2m for qemu-devel@nongnu.org; Thu, 02 Jul 2015 09:50:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAesW-0000IJ-5K for qemu-devel@nongnu.org; Thu, 02 Jul 2015 09:50:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAesW-0000Hn-05 for qemu-devel@nongnu.org; Thu, 02 Jul 2015 09:50:12 -0400 Date: Thu, 2 Jul 2015 14:50:07 +0100 From: Stefan Hajnoczi Message-ID: <20150702135007.GK21214@stefanha-thinkpad.home> References: <1435605913-23826-1-git-send-email-konrad.wilk@oracle.com> <1435605913-23826-7-git-send-email-konrad.wilk@oracle.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0FM4RQAc0jwHekq5" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH RFC 6/6] xen: Add backtrace for serious issues. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org, Konrad Rzeszutek Wilk --0FM4RQAc0jwHekq5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 01, 2015 at 02:06:30PM +0100, Stefano Stabellini wrote: > On Mon, 29 Jun 2015, Konrad Rzeszutek Wilk wrote: > > When debugging issues that caused the emulator to kill itself > > or skipping certain operations (unable to write to host > > registers) an stack trace will most definitly aid in debugging > > the problem. > >=20 > > As such this patch uses the most basic backtrace to print out > > details. > >=20 > > Signed-off-by: Konrad Rzeszutek Wilk >=20 > I think it could be useful, but it cannot be done as a xen-hvm.c thing. > It should be somewhere generic, maybe under util? Stefan, any > suggestions? Yes, it seems like a util/ thing. backtrace() and backtrace_symbols_fd() are glibc-specific so it must not break the build on other platforms. I think the reason we've surivived without backtraces so far is because fatal errors are typically handled with abort(3). It causes a core dump so you have the full process state, including backtraces. I'm fine with adding a backtrace function though since it's more lightweight and allows for graceful shutdown or error recovery. --0FM4RQAc0jwHekq5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVlUGPAAoJEJykq7OBq3PI9jcIAIWRBqOFyfm6Bitt46XTWWY3 Q2togF4ud72FYR+WL9Nabeo7U+S+GTMYt8wOi+a52eidAXOLQ2UtQafLYUujRalw q9//0G4I2g1mL0V8kh8OgQY5D/S9tDj8W1gg8Kwj1PVbtIDmYqoVLSgW6BWhnn1S SzRP/hwNexwV3kFlgZSUXPeg1nbweatDzSHwY8jIxa8UzkZ4osYeoWDQpHwO3ic0 Qyf7w1fzc+12GOf5vCh/FJ3ZK9Dt8645w14+jwFVGLVbHx+xEsmvhGF0kVs6IOcy TSdKgTYqMGEppMfmlWRMmAjvOiwtBuQ01p/JtM6hrs2itkA4jIvcZ+3OV+INNVM= =/PZE -----END PGP SIGNATURE----- --0FM4RQAc0jwHekq5--