rpms/xorg-x11-server/F-9 xserver-1.5.1-global-backtrace.patch, NONE, 1.1 xserver-1.5.2-mieq-backtrace.patch, NONE, 1.1 .cvsignore, 1.51, 1.52 import.log, 1.5, 1.6 sources, 1.45, 1.46 xorg-x11-server.spec, 1.344, 1.345 xserver-1.5.0-no-evdev-keyboards-kthnx.patch, 1.5, 1.6 xserver-1.5.0-xkb-core-kbd-map-fix.patch, 1.1, NONE
Adam Jackson
ajax at fedoraproject.org
Mon Oct 13 14:27:13 UTC 2008
- Previous message: rpms/pitivi/F-9 .cvsignore, 1.9, 1.10 pitivi.spec, 1.24, 1.25 sources, 1.9, 1.10
- Next message: comps comps-f10.xml.in, 1.135, 1.136 comps-f8.xml.in, 1.271, 1.272 comps-f9.xml.in, 1.398, 1.399
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ajax
Update of /cvs/pkgs/rpms/xorg-x11-server/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25903/F-9
Modified Files:
.cvsignore import.log sources xorg-x11-server.spec
xserver-1.5.0-no-evdev-keyboards-kthnx.patch
Added Files:
xserver-1.5.1-global-backtrace.patch
xserver-1.5.2-mieq-backtrace.patch
Removed Files:
xserver-1.5.0-xkb-core-kbd-map-fix.patch
Log Message:
xserver 1.5.2
xserver-1.5.1-global-backtrace.patch:
--- NEW FILE xserver-1.5.1-global-backtrace.patch ---
>From 7a8a31c041b52d87c1522e684cb301b07ea6ad9b Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax at redhat.com>
Date: Fri, 10 Oct 2008 15:53:48 -0400
Subject: [PATCH] Move xorg_backtrace() up to the OS level so we can call it from DIX.
---
hw/xfree86/common/xf86Events.c | 173 ----------------------------------
include/os.h | 2 +
os/Makefile.am | 1 +
os/backtrace.c | 202 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 205 insertions(+), 173 deletions(-)
create mode 100644 os/backtrace.c
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 6ca0ae7..a2c206e 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -358,179 +358,6 @@
xf86SigIllHandler = sigillhandler;
}
-#ifdef HAVE_BACKTRACE
-#include <execinfo.h>
-
-static __inline__ void xorg_backtrace(void)
-{
- void *array[32]; /* deeper nesting than this means something's wrong */
- size_t size, i;
- char **strings;
- ErrorF("\nBacktrace:\n");
- size = backtrace(array, 32);
- strings = backtrace_symbols(array, size);
- for (i = 0; i < size; i++)
- ErrorF("%d: %s\n", i, strings[i]);
- free(strings);
-}
-
-#else /* not glibc or glibc < 2.1 */
-
-# if defined(sun) && defined(__SVR4)
-# define HAVE_PSTACK
-# endif
-
-# if defined(HAVE_WALKCONTEXT) /* Solaris 9 & later */
-
-# include <ucontext.h>
-# include <signal.h>
-# include <dlfcn.h>
-# include <sys/elf.h>
-
-#ifdef _LP64
-# define ElfSym Elf64_Sym
-#else
-# define ElfSym Elf32_Sym
-#endif
-
-/* Called for each frame on the stack to print it's contents */
-static int xorg_backtrace_frame(uintptr_t pc, int signo, void *arg)
-{
- Dl_info dlinfo;
- ElfSym *dlsym;
- char header[32];
- int depth = *((int *) arg);
-
- if (signo) {
- char signame[SIG2STR_MAX];
-
- if (sig2str(signo, signame) != 0) {
- strcpy(signame, "unknown");
- }
-
- ErrorF("** Signal %d (%s)\n", signo, signame);
- }
-
- snprintf(header, sizeof(header), "%d: 0x%lx", depth, pc);
- *((int *) arg) = depth + 1;
-
- /* Ask system dynamic loader for info on the address */
- if (dladdr1((void *) pc, &dlinfo, (void **) &dlsym, RTLD_DL_SYMENT)) {
- unsigned long offset = pc - (uintptr_t) dlinfo.dli_saddr;
- const char *symname;
-
- if (offset < dlsym->st_size) { /* inside a function */
- symname = dlinfo.dli_sname;
- } else { /* found which file it was in, but not which function */
- symname = "<section start>";
- offset = pc - (uintptr_t)dlinfo.dli_fbase;
- }
- ErrorF("%s: %s:%s+0x%lx\n", header, dlinfo.dli_fname,
- symname, offset);
-
- } else {
- /* Couldn't find symbol info from system dynamic loader, should
- * probably poke elfloader here, but haven't written that code yet,
- * so we just print the pc.
- */
- ErrorF("%s\n", header);
- }
-
- return 0;
-}
-# endif /* HAVE_WALKCONTEXT */
-
-# ifdef HAVE_PSTACK
-static int xorg_backtrace_pstack(void) {
- pid_t kidpid;
- int pipefd[2];
-
- if (pipe(pipefd) != 0) {
- return -1;
- }
-
- kidpid = fork1();
-
- if (kidpid == -1) {
- /* ERROR */
- return -1;
- } else if (kidpid == 0) {
- /* CHILD */
- char parent[16];
-
- seteuid(0);
- close(STDIN_FILENO);
- close(STDOUT_FILENO);
- dup2(pipefd[1],STDOUT_FILENO);
- closefrom(STDERR_FILENO);
-
- snprintf(parent, sizeof(parent), "%d", getppid());
- execle("/usr/bin/pstack", "pstack", parent, NULL);
- exit(1);
- } else {
- /* PARENT */
- char btline[256];
- int kidstat;
- int bytesread;
- int done = 0;
-
- close(pipefd[1]);
-
- while (!done) {
- bytesread = read(pipefd[0], btline, sizeof(btline) - 1);
-
- if (bytesread > 0) {
- btline[bytesread] = 0;
- ErrorF("%s", btline);
- }
- else if ((bytesread < 0) ||
- ((errno != EINTR) && (errno != EAGAIN)))
- done = 1;
- }
- close(pipefd[0]);
- waitpid(kidpid, &kidstat, 0);
- if (kidstat != 0)
- return -1;
- }
- return 0;
-}
-# endif /* HAVE_PSTACK */
-
-
-# if defined(HAVE_PSTACK) || defined(HAVE_WALKCONTEXT)
-
-static __inline__ void xorg_backtrace(void) {
-
- ErrorF("\nBacktrace:\n");
-
-# ifdef HAVE_PSTACK
-/* First try fork/exec of pstack - otherwise fall back to walkcontext
- pstack is preferred since it can print names of non-exported functions */
-
- if (xorg_backtrace_pstack() < 0)
-# endif
- {
-# ifdef HAVE_WALKCONTEXT
- ucontext_t u;
- int depth = 1;
-
- if (getcontext(&u) == 0)
- walkcontext(&u, xorg_backtrace_frame, &depth);
- else
-# endif
- Error("Failed to get backtrace info");
- }
- ErrorF("\n");
-}
-
-# else
-
-/* Default fallback if we can't find any way to get a backtrace */
-static __inline__ void xorg_backtrace(void) { return; }
-
-# endif
-#endif
-
/*
* xf86SigHandler --
* Catch unexpected signals and exit or continue cleanly.
diff --git a/include/os.h b/include/os.h
--- a/include/os.h
+++ b/include/os.h
@@ -517,4 +517,6 @@
extern void Error(char *str);
extern void LogPrintMarkers(void);
+extern void xorg_backtrace(void);
+
#endif /* OS_H */
diff --git a/os/Makefile.am b/os/Makefile.am
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -11,6 +11,7 @@
WaitFor.c \
access.c \
auth.c \
+ backtrace.c \
connection.c \
io.c \
mitauth.c \
diff --git a/os/backtrace.c b/os/backtrace.c
new file mode 100644
--- /dev/null
+++ b/os/backtrace.c
@@ -0,0 +1,201 @@
+/*
+ * Copyright 2008 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software")
+ * to deal in the software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * them Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTIBILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "os.h"
+#include "misc.h"
+
+#ifdef HAVE_BACKTRACE
+#include <execinfo.h>
+
+void xorg_backtrace(void)
+{
+ void *array[32]; /* deeper nesting than this means something's wrong */
+ size_t size, i;
+ char **strings;
+ ErrorF("\nBacktrace:\n");
+ size = backtrace(array, 32);
+ strings = backtrace_symbols(array, size);
+ for (i = 0; i < size; i++)
+ ErrorF("%d: %s\n", i, strings[i]);
+ free(strings);
+}
+
+#else /* not glibc or glibc < 2.1 */
+
+# if defined(sun) && defined(__SVR4)
+# define HAVE_PSTACK
+# endif
+
+# if defined(HAVE_WALKCONTEXT) /* Solaris 9 & later */
+
+# include <ucontext.h>
+# include <signal.h>
+# include <dlfcn.h>
+# include <sys/elf.h>
+
+#ifdef _LP64
+# define ElfSym Elf64_Sym
+#else
+# define ElfSym Elf32_Sym
+#endif
+
+/* Called for each frame on the stack to print it's contents */
+static int xorg_backtrace_frame(uintptr_t pc, int signo, void *arg)
+{
+ Dl_info dlinfo;
+ ElfSym *dlsym;
+ char header[32];
+ int depth = *((int *) arg);
+
+ if (signo) {
+ char signame[SIG2STR_MAX];
+
+ if (sig2str(signo, signame) != 0) {
+ strcpy(signame, "unknown");
+ }
+
+ ErrorF("** Signal %d (%s)\n", signo, signame);
+ }
+
+ snprintf(header, sizeof(header), "%d: 0x%lx", depth, pc);
+ *((int *) arg) = depth + 1;
+
+ /* Ask system dynamic loader for info on the address */
+ if (dladdr1((void *) pc, &dlinfo, (void **) &dlsym, RTLD_DL_SYMENT)) {
+ unsigned long offset = pc - (uintptr_t) dlinfo.dli_saddr;
+ const char *symname;
+
+ if (offset < dlsym->st_size) { /* inside a function */
+ symname = dlinfo.dli_sname;
+ } else { /* found which file it was in, but not which function */
+ symname = "<section start>";
+ offset = pc - (uintptr_t)dlinfo.dli_fbase;
+ }
+ ErrorF("%s: %s:%s+0x%lx\n", header, dlinfo.dli_fname,
+ symname, offset);
+
+ } else {
+ /* Couldn't find symbol info from system dynamic loader, should
+ * probably poke elfloader here, but haven't written that code yet,
+ * so we just print the pc.
+ */
+ ErrorF("%s\n", header);
+ }
+
+ return 0;
+}
+# endif /* HAVE_WALKCONTEXT */
+
+# ifdef HAVE_PSTACK
+static int xorg_backtrace_pstack(void) {
+ pid_t kidpid;
+ int pipefd[2];
+
+ if (pipe(pipefd) != 0) {
+ return -1;
+ }
+
+ kidpid = fork1();
+
+ if (kidpid == -1) {
+ /* ERROR */
+ return -1;
+ } else if (kidpid == 0) {
+ /* CHILD */
+ char parent[16];
+
+ seteuid(0);
+ close(STDIN_FILENO);
+ close(STDOUT_FILENO);
+ dup2(pipefd[1],STDOUT_FILENO);
+ closefrom(STDERR_FILENO);
+
+ snprintf(parent, sizeof(parent), "%d", getppid());
+ execle("/usr/bin/pstack", "pstack", parent, NULL);
+ exit(1);
+ } else {
+ /* PARENT */
+ char btline[256];
+ int kidstat;
+ int bytesread;
+ int done = 0;
+
+ close(pipefd[1]);
+
+ while (!done) {
+ bytesread = read(pipefd[0], btline, sizeof(btline) - 1);
+
+ if (bytesread > 0) {
+ btline[bytesread] = 0;
+ ErrorF("%s", btline);
+ }
+ else if ((bytesread < 0) ||
+ ((errno != EINTR) && (errno != EAGAIN)))
+ done = 1;
+ }
+ close(pipefd[0]);
+ waitpid(kidpid, &kidstat, 0);
+ if (kidstat != 0)
+ return -1;
+ }
+ return 0;
+}
+# endif /* HAVE_PSTACK */
+
+
+# if defined(HAVE_PSTACK) || defined(HAVE_WALKCONTEXT)
+
+void xorg_backtrace(void) {
+
+ ErrorF("\nBacktrace:\n");
+
+# ifdef HAVE_PSTACK
+/* First try fork/exec of pstack - otherwise fall back to walkcontext
+ pstack is preferred since it can print names of non-exported functions */
+
+ if (xorg_backtrace_pstack() < 0)
+# endif
+ {
+# ifdef HAVE_WALKCONTEXT
+ ucontext_t u;
+ int depth = 1;
+
+ if (getcontext(&u) == 0)
+ walkcontext(&u, xorg_backtrace_frame, &depth);
+ else
+# endif
+ Error("Failed to get backtrace info");
+ }
+ ErrorF("\n");
+}
+
+# else
+
+/* Default fallback if we can't find any way to get a backtrace */
+void xorg_backtrace(void) { return; }
+
+# endif
+#endif
--
1.6.0.1
xserver-1.5.2-mieq-backtrace.patch:
--- NEW FILE xserver-1.5.2-mieq-backtrace.patch ---
>From b736f477f5324f79af30fc0f941ba0714a34ccda Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax at redhat.com>
Date: Fri, 10 Oct 2008 16:33:24 -0400
Subject: [PATCH] mieq: Backtrace when the queue overflows.
Since we're probably stuck down in a driver somewhere, let's at least
try to point out where. This will need to be rethought when the input
thread work lands though.
---
mi/mieq.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/mi/mieq.c b/mi/mieq.c
index 0a1b740..062dede 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -169,6 +169,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e)
oldtail = (oldtail - 1) % QUEUE_SIZE;
}
else {
+ static int stuck = 0;
newtail = (oldtail + 1) % QUEUE_SIZE;
/* Toss events which come in late. Usually this means your server's
* stuck in an infinite loop somewhere, but SIGIO is still getting
@@ -176,8 +177,13 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e)
if (newtail == miEventQueue.head) {
ErrorF("[mi] EQ overflowing. The server is probably stuck "
"in an infinite loop.\n");
+ if (!stuck) {
+ xorg_backtrace();
+ stuck = 1;
+ }
return;
}
+ stuck = 0;
miEventQueue.tail = newtail;
}
--
1.6.0.1
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/F-9/.cvsignore,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- .cvsignore 12 Sep 2008 14:14:43 -0000 1.51
+++ .cvsignore 13 Oct 2008 14:26:42 -0000 1.52
@@ -1 +1 @@
-xorg-server-1.5.0.tar.bz2
+xorg-server-1.5.2.tar.bz2
Index: import.log
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/F-9/import.log,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- import.log 12 Sep 2008 14:14:43 -0000 1.5
+++ import.log 13 Oct 2008 14:26:42 -0000 1.6
@@ -1,3 +1,4 @@
xorg-x11-server-1_4_99_905-2_20080702_fc9:F-9:xorg-x11-server-1.4.99.905-2.20080702.fc9.src.rpm:1215018868
xorg-x11-server-1_4_99_906-1_fc9:F-9:xorg-x11-server-1.4.99.906-1.fc9.src.rpm:1216909882
xorg-x11-server-1_5_0-1_fc9:F-9:xorg-x11-server-1.5.0-1.fc9.src.rpm:1221228853
+xorg-x11-server-1_5_2-1_fc9:F-9:xorg-x11-server-1.5.2-1.fc9.src.rpm:1223907985
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/F-9/sources,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- sources 12 Sep 2008 14:14:43 -0000 1.45
+++ sources 13 Oct 2008 14:26:42 -0000 1.46
@@ -1 +1 @@
-9a817e5f7374d45b4dbe64b21bc0fb61 xorg-server-1.5.0.tar.bz2
+376a1c790f7519f3ab3e047409c659f0 xorg-server-1.5.2.tar.bz2
Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/F-9/xorg-x11-server.spec,v
retrieving revision 1.344
retrieving revision 1.345
diff -u -r1.344 -r1.345
--- xorg-x11-server.spec 7 Oct 2008 03:16:51 -0000 1.344
+++ xorg-x11-server.spec 13 Oct 2008 14:26:42 -0000 1.345
@@ -18,8 +18,8 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
-Version: 1.5.0
-Release: 3%{?dist}
+Version: 1.5.2
+Release: 1%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@@ -53,10 +53,8 @@
Patch5007: xserver-1.5.0-bad-fbdev-thats-mine.patch
Patch5009: xserver-1.5.0-no-evdev-keyboards-kthnx.patch
-
-# FDO bug 14373 (FIXED), RH bug #460545
-Patch5010: xserver-1.5.0-xkb-core-kbd-map-fix.patch
-
+Patch5010: xserver-1.5.1-global-backtrace.patch
+Patch5011: xserver-1.5.2-mieq-backtrace.patch
%define moduledir %{_libdir}/xorg/modules
%define drimoduledir %{_libdir}/dri
@@ -462,14 +460,10 @@
%changelog
-* Tue Oct 7 2008 Peter Hutterer <peter.hutterer at redhat.com> 1.5.0-3
-- xserver-1.5.0-xkb-core-kbd-map-fix.patch: don't invent groups when mapping
- from xkb to core and back, and squash canonical types into explicit ones on
- core reconstruction (2 patches). #460545
-
-* Thu Sep 18 2008 Peter Hutterer <peter.hutterer at redhat.com> 1.5.0-2
-- xserver-1.5.0-no-evdev-keyboards-kthnx.patch: update to force
- AllowEmptyInput off by default. #462606
+* Mon Oct 13 2008 Adam Jackson <ajax at redhat.com> 1.5.2-1
+- xserver 1.5.2
+- xserver-1.5.1-global-backtrace.patch: Make backtracing globally available.
+- xserver-1.5.2-mieq-backtrace.patch: bt when the input queue overflows.
* Fri Sep 12 2008 Adam Jackson <ajax at redhat.com> 1.5.0-1
- xserver 1.5.0
xserver-1.5.0-no-evdev-keyboards-kthnx.patch:
Index: xserver-1.5.0-no-evdev-keyboards-kthnx.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/F-9/xserver-1.5.0-no-evdev-keyboards-kthnx.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- xserver-1.5.0-no-evdev-keyboards-kthnx.patch 18 Sep 2008 02:09:43 -0000 1.5
+++ xserver-1.5.0-no-evdev-keyboards-kthnx.patch 13 Oct 2008 14:26:42 -0000 1.6
@@ -1,14 +1,11 @@
-From c5714d2d77e872344d0ef8b4665f50cd43e467d8 Mon Sep 17 00:00:00 2001
+From d70615e602361be7204552327f1fd5fa6d170cd0 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax at redhat.com>
Date: Fri, 12 Sep 2008 10:12:55 -0400
Subject: [PATCH] config: disable evdev for keyboards
-If we ignore evdev keyboards, then we must have AEI off by default to allow
-for kbd to start if no xorg.conf is present.
---
- config/hal.c | 28 ++++++++++++++++++++++++++++
- hw/xfree86/common/xf86Config.c | 5 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ config/hal.c | 28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/config/hal.c b/config/hal.c
index 0e0505b..76e8c45 100644
@@ -56,22 +53,6 @@
driver = get_prop_string(hal_ctx, udi, "input.x11_driver");
if (!driver){
/* verbose, don't tell the user unless they _want_ to see it */
-diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
-index a1c2e34..67cc783 100644
---- a/hw/xfree86/common/xf86Config.c
-+++ b/hw/xfree86/common/xf86Config.c
-@@ -1088,8 +1088,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
- }
- #endif
-
-- /* AllowEmptyInput is automatically true if we're hotplugging */
-- xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
-+ /* Disable AEI by default, so setups with no config file force the kbd
-+ * driver */
-+ xf86Info.allowEmptyInput = FALSE;
- xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput);
-
- xf86Info.useDefaultFontPath = TRUE;
--
-1.5.5.2
+1.6.0.1
--- xserver-1.5.0-xkb-core-kbd-map-fix.patch DELETED ---
- Previous message: rpms/pitivi/F-9 .cvsignore, 1.9, 1.10 pitivi.spec, 1.24, 1.25 sources, 1.9, 1.10
- Next message: comps comps-f10.xml.in, 1.135, 1.136 comps-f8.xml.in, 1.271, 1.272 comps-f9.xml.in, 1.398, 1.399
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list