support for printing stack traces in xorg server
Andriy Gapon
avg at FreeBSD.org
Thu Feb 13 14:23:06 UTC 2014
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
More information about the freebsd-x11
mailing list