xserver-multidpi/glx
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
..
dispatch.h GLX: Changes resulting from changes to Mesa generator scripts / data 2008-12-14 18:58:33 -08:00
extension_string.c GLX/DRI2: add INTEL_swap_event support 2010-01-11 16:17:15 -05:00
extension_string.h GLX/DRI2: add INTEL_swap_event support 2010-01-11 16:17:15 -05:00
g_disptab.h Update to SGI FreeB 2.0. 2008-09-19 12:02:28 -04:00
glapi.c Suppress certain GCC warnings in auto-generated code. 2009-10-28 18:59:07 -07:00
glapi.h GLX: Changes resulting from changes to Mesa generator scripts / data 2008-12-14 18:58:33 -08:00
glapioffsets.h Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00
glapitable.h GLX: Changes resulting from changes to Mesa generator scripts / data 2008-12-14 18:58:33 -08:00
glapitemp.h glx: Sun compilers now support some gcc __attribute__ values 2010-01-25 11:10:00 -08:00
glprocs.h Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00
glthread.c os: Prevent core dump from being truncated. 2010-02-17 23:20:52 -08:00
glthread.h Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00
glxbyteorder.h Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00
glxcmds.c DRI2: add support for new DRI2 protocol requests 2010-01-11 16:16:35 -05:00
glxcmdsswap.c Remove some libXfont leftovers 2009-06-02 13:40:14 -04:00
glxcontext.h DRI2: add support for new DRI2 protocol requests 2010-01-11 16:16:35 -05:00
glxdrawable.h DRI2: add support for new DRI2 protocol requests 2010-01-11 16:16:35 -05:00
glxdri.c DRI2: add support for new DRI2 protocol requests 2010-01-11 16:16:35 -05:00
glxdri2.c dri2: Fix order of operations issue in __glXdriSwapEvent test. 2010-01-27 14:06:59 -08:00
glxdricommon.c Fix driGetConfigAttribIndex unaligned access to GLboolean. 2008-08-26 11:07:32 -04:00
glxdricommon.h Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00
glxdriswrast.c DRI2: add support for new DRI2 protocol requests 2010-01-11 16:16:35 -05:00
glxext.c GLX/DRI2: add INTEL_swap_event support 2010-01-11 16:17:15 -05:00
glxext.h glx: Fix drawable private leak on destroy 2009-04-13 13:17:53 -04:00
glxscreens.c GLX/DRI2: add INTEL_swap_event support 2010-01-11 16:17:15 -05:00
glxscreens.h GLX: More clearly document the GLX protocol version handling 2009-10-01 23:13:40 -07:00
glxserver.h GLX/DRI2: add INTEL_swap_event support 2010-01-11 16:17:15 -05:00
glxutil.h glx: Fix drawable private leak on destroy 2009-04-13 13:17:53 -04:00
indirect_dispatch_swap.c Fix "warning: cast to pointer from integer of different size" 2009-02-04 09:42:02 +10:00
indirect_dispatch.c Fix "warning: cast to pointer from integer of different size" 2009-02-04 09:42:02 +10:00
indirect_dispatch.h glx: Sun compilers now support some gcc __attribute__ values 2010-01-25 11:10:00 -08:00
indirect_program.c Warning fix (GL likes to call strings GLubyte * instead of char *). 2008-12-12 10:37:40 -08:00
indirect_reqsize.c GLX: Make sure the types match for ALIAS in indirect_reqsize.c 2009-06-06 22:24:18 -07:00
indirect_reqsize.h glx: Sun compilers now support some gcc __attribute__ values 2010-01-25 11:10:00 -08:00
indirect_size_get.c glx: Sun compilers now support some gcc __attribute__ values 2010-01-25 11:10:00 -08:00
indirect_size_get.h glx: Sun compilers now support some gcc __attribute__ values 2010-01-25 11:10:00 -08:00
indirect_size.h glx: Sun compilers now support some gcc __attribute__ values 2010-01-25 11:10:00 -08:00
indirect_table.c Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00
indirect_table.h Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00
indirect_texture_compression.c Fix "possibly uninitialized" warnings in glx 2009-10-08 13:36:44 +11:00
indirect_util.c glx: switch to byte counting functions 2009-07-14 10:13:44 +10:00
indirect_util.h Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00
Makefile.am Supply all code using dl*() with DLOPEN_LIBS 2009-10-29 14:15:02 -07:00
render2.c Warning fix: Remove dead glXDisp{,Swap}_DrawArraysEXT definitions. 2008-12-12 10:37:40 -08:00
render2swap.c Warning fix: Remove dead glXDisp{,Swap}_DrawArraysEXT definitions. 2008-12-12 10:37:40 -08:00
renderpix.c Remove #define NEED_EVENTS and NEED_REPLIES 2008-12-12 11:43:32 +10:00
renderpixswap.c Remove #define NEED_EVENTS and NEED_REPLIES 2008-12-12 11:43:32 +10:00
rensize.c glx: switch to byte counting functions 2009-07-14 10:13:44 +10:00
single2.c GLX: Avoid a crash when we have an uninitialized GL context 2009-01-15 14:23:48 +00:00
single2swap.c Remove #define NEED_EVENTS and NEED_REPLIES 2008-12-12 11:43:32 +10:00
singlepix.c GLX: note the implicit flushes with ReadPixels in indirect contexts. 2009-06-24 10:41:47 +10:00
singlepixswap.c GLX: note the implicit flushes with ReadPixels in indirect contexts. 2009-06-24 10:41:47 +10:00
singlesize.c Update to SGI FreeB 2.0. 2008-09-19 12:02:28 -04:00
singlesize.h Update to SGI FreeB 2.0. 2008-09-19 12:02:28 -04:00
swap_interval.c DRI2: add support for new DRI2 protocol requests 2010-01-11 16:16:35 -05:00
unpack.h Suppress GCC warnings like "the address of u1' will always evaluate as true'". 2009-10-28 18:56:09 -07:00
xfont.c Convert remaining GLX LookupIDByType() calls 2009-04-07 16:28:26 -04:00