# help with generating a core dump when an Xsession crashs

## nivw

hi,

the main issue is with the application media-tv/mythtv-0.21_p19961-r1 . when I quit the client , my previous running X seesion from which I ran the client, crashes.

then xdm restarts, and I can log on again.

I am using the ATI radeon open source driver  and the issue is always reproduced. as it never happens with nvidia , it may be a xf86 driver ati issue.

I used the http://www.gentoo.org/proj/en/qa/backtraces.xml link and build the package with -ggdb and also with the debug flag.

I started a screen session, then I run gdb /usr/bin/mythfrontend and got:

 *Quote:*   

> [Thread 0xb50b8b90 (LWP 15049) exited]
> 
> Program received signal SIGPIPE, Broken pipe.
> 
> [Switching to Thread 0xb5ac06e0 (LWP 15045)]
> ...

 

I relogged to xdm and reloged to my screen session.

when I add  handle SIGPIPE nostop noprint noignore pass

 *Quote:*   

> [Thread 0xb3cd8b90 (LWP 15225) exited]
> 
> 2009-03-30 20:48:33.402 Deleting UPnP client...
> 
> [Thread 0xb5869b90 (LWP 15216) exited]
> ...

 

and then:

 *Quote:*   

> (gdb) bt full
> 
> No stack.
> 
> 

 

I then tried to allow core dumps with  ulimit -c unlimited , but no core file was created, as this signal is probably handled.

what should I do next?

----------

## Hu

First, we need to find why it is dying.  SIGPIPE is a relatively harmless signal and does not generate a coredump.  It is probably not relevant to your problem.  What is the output of emerge --pretend --verbose x11-drivers/xf86-video-ati x11-base/xorg-server ; emerge --info?  Based on the output shown, MythTV is exiting in response to the X crash.  MythTV is not crashing.  You need to attach to the X server and debug why it is crashing.  Since the X server will pause when you attach, you need to attach from outside.  Ideally, start sshd, log in remotely, and debug the X server that way.

----------

## nivw

These are the packages that would be merged, in order:

Calculating dependencies   ^H^H... done!

[ebuild   R   ] x11-base/xorg-server-1.3.0.0-r6  USE="dri nptl xorg -3dfx -debu$

[ebuild   R   ] x11-drivers/xf86-video-ati-6.12.1  USE="dri -debug" 0 kB

Total: 2 packages (2 reinstalls), Size of downloads: 0 kB

 *Quote:*   

> Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r7 i686)
> 
> =================================================================
> 
> System uname: Linux-2.6.27-gentoo-r7-i686-Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-glibc2.0
> ...

 

----------

## nivw

to debug I did this:

1. /etc/init.d/xdm stop

2. screen -S debug.myth

3. gdb xinit

4. ctrl-c and created a new screen session, in it I ran gdb xterm.

5. now I clicked ctrl-alt-f8 and got to the X screen , there I clicked the xterm and ran mythfrontend

6. I then quit the frontend to repreduce the crash.

7. at the gdb xinit screen I see a the lines X generates when loading that end with the last line:

 *Quote:*   

> Leaving Restore TV
> 
> X connection to :0.0 broken (explicit kill or server shutdown).
> 
> Program exited with code 01.
> ...

 

8. I open a new screen session and there I run pstree:

 *Quote:*   

> 
> 
>  ~ $ pstree -p 4321 |more
> 
> screen(4321)-+-bash(4322)---gdb(4327)---xinit(4328)---X(4331)
> ...

 

9.then the X at pid 4331 gave this (it is still running but gives me the gdb commad prompt , how can this be?)

 *Quote:*   

> (gdb) bt full
> 
> #0  0xffffe424 in __kernel_vsyscall ()
> 
> No symbol table info available.
> ...

 

I now rebuild xorg with ggdb and will do this test again, any ponters?

----------

