From owner-freebsd-x11@FreeBSD.ORG Thu Feb 13 14:23:06 2014 Return-Path: Delivered-To: freebsd-x11@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CC28179 for ; Thu, 13 Feb 2014 14:23:06 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id DEB5A18DE for ; Thu, 13 Feb 2014 14:23:05 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA25678 for ; Thu, 13 Feb 2014 16:23:03 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1WDxBv-000JOj-4f for freebsd-x11@FreeBSD.org; Thu, 13 Feb 2014 16:23:03 +0200 Message-ID: <52FCD50E.50605@FreeBSD.org> Date: Thu, 13 Feb 2014 16:22:06 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: freebsd-x11@FreeBSD.org Subject: support for printing stack traces in xorg server X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 14:23:06 -0000 Sometimes quite unpleasant messages like the following can be found in Xorg.log file: [mi] EQ overflowing. Additional events will be discarded until existing events are processed. [mi] These backtraces from mieqEnqueue may point to a culprit higher up the stack. Unfortunately, on FreeBSD we do not get any backtraces. configure.ac has the following snippet: dnl glibc backtrace support check (hw/xfree86/common/xf86Events.c) AC_CHECK_HEADER([execinfo.h],[ AC_CHECK_LIB(c, backtrace, [ AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support]) AC_DEFINE(HAVE_EXECINFO_H, 1, [Have execinfo.h]) ])] ) So it checks for presence of execinfo.h header file and for presence of backtrace() function in libc. On FreeBSD execinfo.h does exists, but backtrace() in in libexecinfo instead. At least this is what I see on FreeBSD head (11). But there is also devel/libexecinfo if any supported version of FreeBSD does not have libexecinfo in base. So, I think that it should be pretty easy to patch the xorg port to use libexecinfo. Should we do this? -- Andriy Gapon