xserver-multidpi/hw/xfree86
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
..
common os: Prevent core dump from being truncated. 2010-02-17 23:20:52 -08:00
ddc EDID: CEA extension support 2009-10-29 14:04:55 -04:00
dixmods Add type name argument to CreateNewResourceType 2009-12-18 17:44:12 -08:00
doc xfree86: Reorder InputClass option priorities 2010-02-15 15:27:42 +10:00
dri Add type name argument to CreateNewResourceType 2009-12-18 17:44:12 -08:00
dri2 DRI2: Bump the dri2 module version to 1.2.0 to reflect recent API changes. 2010-01-28 14:58:04 -08:00
exa EXA: Allow optimized migration to be enabled with mixed pixmaps. 2009-12-28 22:01:42 -08:00
fbdevhw .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
i2c Don't cast double to int: use default conversions or explicitly round. 2009-10-28 18:56:42 -07:00
int10 Fix builds with --with-int10=stub 2009-12-15 10:23:16 -08:00
loader .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
modes xfree86/modes: only call gamma_set if its non NULL 2010-01-27 14:10:48 -08:00
os-support Solaris xf86OSRingBell() off-by-one error in filling iov[] array 2010-02-17 23:15:34 -08:00
parser parser: corrected xf86getBoolValue to use case insensitive compare 2010-02-17 23:16:25 -08:00
ramdac .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
shadowfb s/MIN/min/, s/MAX/max/ (#2968) 2009-06-03 13:45:42 -04:00
utils Update Sun license notices to current X.Org standard form 2009-12-16 17:11:35 -08:00
vbe Update to xextproto 7.0.99.1. 2009-07-15 17:00:05 +10:00
vgahw Revert "alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus" 2009-10-06 20:40:20 -04:00
x86emu Use C-style comments in x86emu 2010-02-17 23:13:04 -08:00
xaa .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
xf8_16bpp Update several of my and/or Red Hat's licenses to standard form. 2009-05-14 07:02:44 -04:00
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
Makefile.am Use $(MAKE) instead of "make" to build Solaris inline assembly 2009-11-05 13:31:16 -08:00
xorgconf.cpp Update xorg.conf man page & sample for changes in Xorg 1.7 2009-09-14 16:03:18 +10:00