xserver-multidpi/hw/dmx
Rami Ylimaki 5b9a52be7e os: Prevent core dump from being truncated.
The problem fixed by this patch can be reproduced on Linux with the
following steps.
- Access NULL pointer intentionally in ProcessOtherEvent on key press.
- Instead of saving core dump to a file, write it into a pipe.
  echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern
- Dump the core by pressing a key.

While the core is being dumped into the pipe, the smart schedule timer
will cause a pending SIGALRM. Linux kernel stops writing data to the
pipe when there are pending signals. This causes the core dump to be
truncated. On my system I'm expecting a 6 MB dump but the size will be
60 kB instead. The problem is solved if we block the SIGALRM caused by
expired smart schedule timer.

I haven't been able to reproduce this problem in the following cases.
- Save core dump to a file instead of a pipe.
- kill -SEGV `pidof Xorg`
- Press a key to dump core while gdb is attached to Xorg.
- Give option -dumbSched to Xorg.

Also note that the fix works only when NoTrapSignals has the default
value FALSE. The problem can still be reproduced if error signals
aren't trapped. In addition to pending SIGALRM, there is a similar
problem with pending SIGIO from the keyboard driver during core dump.

Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17 23:20:52 -08:00
..
config .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
doc config: replace custom code with reusable macro XORG_WITH_DOXYGEN 2010-01-24 12:52:20 -08:00
examples os: Prevent core dump from being truncated. 2010-02-17 23:20:52 -08:00
glxProxy Add type name argument to CreateNewResourceType 2009-12-18 17:44:12 -08:00
input dmx: when setting up device axis, use the correct counter number 2009-10-20 13:32:19 +10:00
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
dmx_glxvisuals.c Update to SGI FreeB 2.0. 2008-09-19 12:02:28 -04:00
dmx_glxvisuals.h Update to SGI FreeB 2.0. 2008-09-19 12:02:28 -04:00
dmx-config.h dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmx.c dmx: Correctly compute DMXGetScreenAttributes reply length 2009-10-26 10:39:35 -07:00
dmx.h dmx: Fix calloc macro confusion. 2008-12-19 09:51:52 -05:00
dmxcb.c Centralize declaration of ConnectionInfo. 2008-08-20 13:14:34 -04:00
dmxcb.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxclient.h XKB: Make XKB mandatory 2009-01-22 15:06:25 +11:00
dmxcmap.c devPrivates rework: since API is already broken, switch everything 2007-08-28 09:28:25 -04:00
dmxcmap.h devPrivates rework: since API is already broken, switch everything 2007-08-28 09:28:25 -04:00
dmxcursor.c dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmxcursor.h Add an array of integers for use as per-screen cursor private keys. 2008-08-27 19:27:13 -04:00
dmxdpms.c xace: restore the old SaveScreens function and introduce new API, since the 2007-11-19 16:59:34 -05:00
dmxdpms.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxextension.c dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmxextension.h dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmxfont.c Constify atom name strings 2009-02-03 10:06:00 -08:00
dmxfont.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxgc.c dmx: fix a segfault caused by GC devPrivates never being initalised. 2008-06-05 16:13:12 +09:30
dmxgc.h devPrivates rework: since API is already broken, switch everything 2007-08-28 09:28:25 -04:00
dmxgcops.c dmx: don't include panoramiXsrv.h if building w/o Xinerama 2009-09-16 11:44:08 +10:00
dmxgcops.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxinit.c Define ddxBeforeReset stubs in platform-neutral DDXs 2009-10-15 08:06:53 -07:00
dmxinit.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxinput.c dix: move config_init into the DDX. 2010-02-15 09:15:18 +10:00
dmxinput.h dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmxlog.c Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac 2008-04-25 16:49:35 +09:30
dmxlog.h Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac 2008-04-25 16:49:35 +09:30
dmxpict.c dmx: silence 'implicit declaration of function ‘XFixesSetPictureClipRegion’ 2009-09-21 09:23:16 +10:00
dmxpict.h devPrivates rework: since API is already broken, switch everything 2007-08-28 09:28:25 -04:00
dmxpixmap.c Merge branch 'master' into XACE-SELINUX 2007-11-19 18:10:46 -05:00
dmxpixmap.h Merge branch 'master' into XACE-SELINUX 2007-11-05 19:08:36 -05:00
dmxprop.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxprop.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxscrinit.c dmx: only free the default pixmaps that we actually allocated. 2009-09-22 12:28:17 +10:00
dmxscrinit.h devPrivates rework: since API is already broken, switch everything 2007-08-28 09:28:25 -04:00
dmxshadow.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxshadow.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxstat.c dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmxstat.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxsync.c dmx: remove doxygen-generated files. 2009-10-20 13:32:16 +10:00
dmxsync.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxvisual.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxvisual.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxwindow.c dmxDestroyWindow() - must call the X's native DetroyWindow() 2009-10-20 13:32:21 +10:00
dmxwindow.h Shape extension is built-in and mandatory. 2008-07-24 15:46:08 -04:00
Makefile.am dmx: reshuffle linker order to avoid errors when MITSHM is undefined. 2009-09-26 13:09:52 +10:00
Xdmx.man Add Distributed Multihead X (DMX) support 2004-06-30 20:06:56 +00:00