[apport] mythfrontend.real crashed with SIGSEGV in XRRGetScreenInfo()

Bug #104262 reported by Patrick Dempsey
This bug report is a duplicate of:  Bug #109227: Mythfrontend, mythtv-setup segfault. Edit Remove
8
Affects Status Importance Assigned to Milestone
mythtv (Ubuntu)
In Progress
Undecided
Mario Limonciello

Bug Description

Binary package hint: mythtv

Upgraded to feisty64, mythbackend starts but mythfrontend crashes
Using XOrg "ati" driver, not fglrx

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
        FontPath "/usr/share/X11/fonts/misc"
        FontPath "/usr/share/X11/fonts/cyrillic"
        FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
        FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
        FontPath "/usr/share/X11/fonts/Type1"
        FontPath "/usr/share/X11/fonts/100dpi"
        FontPath "/usr/share/X11/fonts/75dpi"
        FontPath "/usr/share/fonts/X11/misc"
        # path to defoma fonts
        FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
        Load "i2c"
        Load "bitmap"
        Load "ddc"
        Load "dri"
        Load "extmod"
        Load "freetype"
        Load "glx"
        Load "int10"
        Load "type1"
        Load "vbe"
EndSection

Section "InputDevice"
        Identifier "Generic Keyboard"
        Driver "kbd"
        Option "CoreKeyboard"
        Option "XkbRules" "xorg"
        Option "XkbModel" "pc105"
        Option "XkbLayout" "us"
        Option "XkbOptions" "lv3:ralt_switch"
EndSection

Section "InputDevice"
        Identifier "Configured Mouse"
        Driver "mouse"
        Option "CorePointer"
        Option "Device" "/dev/input/mice"
        Option "Protocol" "ExplorerPS/2"
        Option "ZAxisMapping" "4 5"
        Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
  Driver "wacom"
  Identifier "stylus"
  Option "Device" "/dev/wacom" # Change to
                                                      # /dev/input/event
                                                      # for USB
  Option "Type" "stylus"
  Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
  Driver "wacom"
  Identifier "eraser"
  Option "Device" "/dev/wacom" # Change to
                                                      # /dev/input/event
                                                      # for USB
  Option "Type" "eraser"
  Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
  Driver "wacom"
  Identifier "cursor"
  Option "Device" "/dev/wacom" # Change to
                                                      # /dev/input/event
                                                      # for USB
  Option "Type" "cursor"
  Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Device"
        Identifier "ATI Technologies, Inc. Radeon RV250 If [Radeon 9000 Pro] 0"
        Driver "ati"
        BusID "PCI:1:0:0"
        Screen 0
EndSection

Section "Device"
        Identifier "ATI Technologies, Inc. Radeon RV250 If [Radeon 9000 Pro] 1"
        Driver "ati"
        BusID "PCI:1:0:0"
        Screen 1
EndSection

Section "Monitor"
        Identifier "Generic Monitor"
        Option "DPMS"
EndSection

Section "Screen"
        Identifier "Default Screen 0"
        Device "ATI Technologies, Inc. Radeon RV250 If [Radeon 9000 Pro] 0"
        Monitor "Generic Monitor"
        DefaultDepth 24
        SubSection "Display"
                Depth 1
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
        SubSection "Display"
                Depth 4
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
        SubSection "Display"
                Depth 8
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
        SubSection "Display"
                Depth 15
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
        SubSection "Display"
                Depth 16
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
        SubSection "Display"
                Depth 24
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
EndSection

Section "Screen"
        Identifier "Default Screen 1"
        Device "ATI Technologies, Inc. Radeon RV250 If [Radeon 9000 Pro] 1"
        Monitor "Generic Monitor"
        DefaultDepth 24
        SubSection "Display"
                Depth 1
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
        SubSection "Display"
                Depth 4
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
        SubSection "Display"
                Depth 8
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
        SubSection "Display"
                Depth 15
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
        SubSection "Display"
                Depth 16
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
        SubSection "Display"
                Depth 24
                Modes "1600x1200" "1280x1024" "1152x921" "1152x900" "1024x768" "960x720" "832x624" "800x600" "720x400" "640x480"
        EndSubSection
EndSection

Section "ServerLayout"
        Identifier "Default Layout"
        Screen "Default Screen 1"
        Screen "Default Screen 0" RightOf "Default Screen 1"
        InputDevice "Generic Keyboard"
        InputDevice "Configured Mouse"
        InputDevice "stylus" "SendCoreEvents"
        InputDevice "cursor" "SendCoreEvents"
        InputDevice "eraser" "SendCoreEvents"
EndSection

Section "ServerFlags"
    Option "Xinerama" "On"
    Option "RandR" "on"
EndSection

Section "DRI"
        Mode 0666
EndSection

ProblemType: Crash
Architecture: amd64
CrashCounter: 1
Date: Sat Apr 7 17:11:15 2007
DistroRelease: Ubuntu 7.04
ExecutablePath: /usr/bin/mythfrontend.real
Package: mythtv-frontend 0.20-svn20070122-0.0ubuntu4
PackageArchitecture: amd64
ProcCmdline: /usr/bin/mythfrontend.real
ProcCwd: /home/rock
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 11
SourcePackage: mythtv
StacktraceTop:
 ?? () from /usr/lib/libXrandr.so.2
 XRRGetScreenInfo () from /usr/lib/libXrandr.so.2
 ?? () from /usr/lib/libmyth-0.20.so.0
 DisplayResX::GetVideoModes ()
 DisplayRes::Initialize ()
Uname: Linux sparky 2.6.20-14-generic #2 SMP Mon Apr 2 16:32:46 UTC 2007 x86_64 GNU/Linux
UserGroups: adm admin audio cdrom dialout dip fax floppy fuse lpadmin mythtv plugdev scanner tape video

Revision history for this message
Patrick Dempsey (dempseyp) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:XRRGetScreenInfo (dpy=0x8cd590, window=104) at ../../src/XrrConfig.c:351
GetScreenConfig (display=@0x7fff74136c90) at DisplayResX.cpp:124
DisplayResX::GetVideoModes (this=0x8cad00) at DisplayResX.cpp:86
DisplayRes::Initialize (this=0x8cad00) at DisplayRes.cpp:73

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Revision history for this message
Richard (richardbe) wrote :

I'm having the same problem with mythfrontend, the backend is on another computer.

I'm using feisty 32-bit instead of 64-bit. This was installed with the alternative install cd (final). I also have 2 nvidia cards instead of an ATI card but I am also using xinerama. I'm using mythfrontend version 0.20.20060828-4

Mythfrontend fails with a segmentation fault. If I use gdb to run it it terminates with a SIGSEGV with libXrandr.so.2. If I turn xinerama off mythfrontend runs perfectly.

Is there a workaround to this problem?

Revision history for this message
Patrick Dempsey (dempseyp) wrote : Re: [Bug 104262] Re: [apport] mythfrontend.real crashed with SIGSEGV in XRRGetScreenInfo()

Ahh, I have not tried with xinerama off.
I have been out of town for work and have not done any more troubleshooting.

I did a dist upgrade from 6.10 to 7.04 and the myth frontend broke.
The backend still works after I upgraded the IVTV driver as shows are still
piling up on the HD and I can watch them with VLC.
MythTV frontend and backend worked properly before the upgrade.

I will have to try and see if I can make any progress on sunday

good luck.

On 4/20/07, Richard <email address hidden> wrote:
>
> I'm having the same problem with mythfrontend, the backend is on another
> computer.
>
> I'm using feisty 32-bit instead of 64-bit. This was installed with the
> alternative install cd (final). I also have 2 nvidia cards instead of an
> ATI card but I am also using xinerama. I'm using mythfrontend version
> 0.20.20060828-4
>
> Mythfrontend fails with a segmentation fault. If I use gdb to run it it
> terminates with a SIGSEGV with libXrandr.so.2. If I turn xinerama off
> mythfrontend runs perfectly.
>
> Is there a workaround to this problem?
>
> --
> [apport] mythfrontend.real crashed with SIGSEGV in XRRGetScreenInfo()
> https://bugs.launchpad.net/bugs/104262
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Richard (richardbe) wrote :

I found a workaround although it isn't a particularly pretty one.

I downloaded the edgy libxrandr2 package from here: http://packages.ubuntu.com/edgy/libs/libxrandr2 and opened it with the archive manager. Extracted the data.tar.gz files and put it in a folder in my home directory. I then wrote a simple bash script:

#!/bin/bash
env LD_LIBRARY_PATH=/home/aandr/oldlibs/usr/lib mythfrontend

/home/aandr/oldlibs/usr/lib being the directory where the libXrandr.so.2 and libXrandr.so.2.0.0 files are located.

It seems to work without issues (at least I haven't encountered any). Granted, it isn't a perfect (or permanent) solution but I didn't have a chance to see what was changed from the edgy version of libXrandr to the one in feisty. It seems like it should work with ati video cards as well.

At least I can use it for now. I hope this helps.

Richard

Revision history for this message
Patrick Dempsey (dempseyp) wrote :

Ahh, that is good to know.
I wonder what has changed...

Thank you,
Patrick

On 4/20/07, Richard <<email address hidden> > wrote:
>
> I found a workaround although it isn't a particularly pretty one.
>
> I downloaded the edgy libxrandr2 package from here:
> http://packages.ubuntu.com/edgy/libs/libxrandr2 and opened it with the
> archive manager. Extracted the data.tar.gz files and put it in a folder
> in my home directory. I then wrote a simple bash script:
>
> #!/bin/bash
> env LD_LIBRARY_PATH=/home/aandr/oldlibs/usr/lib mythfrontend
>
> /home/aandr/oldlibs/usr/lib being the directory where the libXrandr.so.2
> and libXrandr.so.2.0.0 files are located.
>
> It seems to work without issues (at least I haven't encountered any).
> Granted, it isn't a perfect (or permanent) solution but I didn't have a
> chance to see what was changed from the edgy version of libXrandr to the
> one in feisty. It seems like it should work with ati video cards as
> well.
>
> At least I can use it for now. I hope this helps.
>
> Richard
>
> --
> [apport] mythfrontend.real crashed with SIGSEGV in XRRGetScreenInfo()
> https://bugs.launchpad.net/bugs/104262
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
gergnz (gergnz) wrote :

I can also confirm this problem.

Great workaround Richard! thanks.

Revision history for this message
Pete (pete123) wrote :

I can confirm this works across multiple screens / GPU's on feisty also. The frontend runs fine if I have a simple single monitor setup, and using that work around, which is something!

Revision history for this message
Richard (richardbe) wrote :

I had a look at the source to see what changes I can find between libXrandr2 in edgy (1.1.1) and in feisty (1.2.0) specifically in regards to XRRGetScreenInfo(). It seems there is an additional parameter in 1.2.0, XExtDisplayInfo. In addition, where XRRGetScreenInfo is called, 1.2.0 has "window window" instead of "Drawable draw"

The specific lines are:

Version 1.1.1:

In Xrandr.h, line 73:

XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy,
                                                              Drawable draw);

In Xrandr.c, line 435:

static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy, Window window)

Version 1.2.0:

In Xrandr.h, line 127:

XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy,
                                                                           Window window);

In XrrConfig.c (which contains part of Xrandr.c of 1.1.1), line 200:

static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy,
                                              XExtDisplayInfo *info,
                                              Window window)

According to this page: http://www.gossamer-threads.com/lists/mythtv/users/265609 compiling mythtv with --disable-xrandr will allow it to work without using the old libraries (which I posted above). I haven't tried it myself but I see no reason why it wouldn't work. I don't know what effect that has on mythtv though.

Revision history for this message
Mario Limonciello (superm1) wrote :

Looking closer at this, it appears that we are already calling
XRRGetScreenInfo with the correct parameters for the new xrandr version:
this is libs/libmyth/DisplayResX.cpp:

static XRRScreenConfiguration *GetScreenConfig(Display*& display)
> {
> display = MythXOpenDisplay();
> if (!display)
> {
> cerr<<"DisplaResX: MythXOpenDisplay call failed"<<endl;
> return NULL;
> }
>
> X11L;
> Window root = RootWindow(display, DefaultScreen(display));
> XRRScreenConfiguration *cfg = XRRGetScreenInfo(display, root);
> if (!cfg)
> {
> if (display)
> XCloseDisplay(display);
> cerr<<"DisplaResX: Unable to XRRgetScreenInfo"<<endl;
> }
> X11U;
>
> return cfg;
> }
>
>

Revision history for this message
daryl (daryl-weblane) wrote :

i just made a comment (follows) regarding bug #85701, but (thanks to Mario Limonciello) i believe it may
also be pertinent here. in addition to the comment that follows i just have to add that i am running mythtv-setup
from a remote server to my local X display (export DISPLAY=...)

original comment:

this sounds like the problem i am currently having with ubuntu feisty mythtv-setup, on a brand new install.
it does a sigsegv almost right away. if i run mythtv-setup with "-v all" i get the following right before it
dies:

:
:
2007-05-07 17:15:38.356 MSqlQuery: SELECT data FROM settings WHERE value = 'TVVidModeHeight0' AND hostname = 'ixtac' ;
2007-05-07 17:15:38.358 MSqlQuery: SELECT data FROM settings WHERE value = 'TVVidModeHeight0' AND hostname IS NULL;
Segmentation fault (core dumped)

and if i run if from gdb (even though i dont have a version with debug
symbols) it reports the following:

:
:
(no debugging symbols found)
2007-05-07 16:54:24.174 New DB connection, total: 1
2007-05-07 16:54:24.192 Connected to database 'mythconverg' at host: ixtac
2007-05-07 16:54:24.195 Total desktop dim: 1680x1050, with 1 screen[s].
2007-05-07 16:54:24.206 Using screen 0, 1680x1028 at 0,22
2007-05-07 16:54:24.257 Current Schema Version: 1160

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1248511776 (LWP 9789)]
0xb6750454 in ?? () from /usr/lib/libXrandr.so.2
(gdb)

this is repeatable and consistent. if i can help in any way please let
me know.

daryl

Revision history for this message
David Morris (dave-greenacre) wrote :

Happend when using ximemria since this disables the XRandR modules

Changed in mythtv:
status: Unconfirmed → Confirmed
Revision history for this message
Patrick Dempsey (dempseyp) wrote :

Yes, so I guess that MythTV requires XRandR now?

On 6/4/07, David Morris <email address hidden> wrote:
>
> Happend when using ximemria since this disables the XRandR modules
>
> ** Changed in: mythtv (Ubuntu)
> Status: Unconfirmed => Confirmed
>
> --
> [apport] mythfrontend.real crashed with SIGSEGV in XRRGetScreenInfo()
> https://bugs.launchpad.net/bugs/104262
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
David Morris (dave-greenacre) wrote :

Well thanks to Paladine for this info

"Well the problem is Xinerama disables XRandR extension in xorg, so if
something requires XRandR and Xinerama is running, it will fail due to
XRandR not being available. This is actually partially fixed by XRandR
1.2 which now has it's own Xinerama controls built in, however,
currently only Intel and I think ATI FOSS drivers support the XRandR 1.2
spec. I was talking to the NVidia proprietry driver devs yesterday
regarding XRandR 1.2 support and they said they are planning to make the
official drivers XRandR 1.2 compliant but there is no scheduled release
date at this time (it is quite a new spec).

This means once the drivers support the new spec, users will not need to
enable Xinerama in their xorg.conf as it will be handled by XRandR and
thus XRandR won't be disabled by the traditional Xinerama running."

Also there is a patch been worked on at mythtv which has put checks before making the call which segfaults - http://svn.mythtv.org/trac/ticket/3401

Superm1 can you check out the status of the patch and see if we can apply it to the debs

Changed in mythtv:
assignee: nobody → superm1
status: Confirmed → In Progress
Revision history for this message
Patrick Dempsey (dempseyp) wrote :

Awesome, thanks!

I will have to check to see if the new ATI xorg drivers and XRandR have made
it into testing yet and try it out.

At least the XRandR 1.2 will mean I can run 1 Xorg configuration on my
laptops in the near future.
In my opinion this has been one of the major stumbling blocks to getting X
operating perfectly, and one of the very few areas where "gasp" Microsoft is
better at something.

Thanks to everyone for their great support!

Patrick

On 6/4/07, David Morris <email address hidden> wrote:
>
> Well thanks to Paladine for this info
>
> "Well the problem is Xinerama disables XRandR extension in xorg, so if
> something requires XRandR and Xinerama is running, it will fail due to
> XRandR not being available. This is actually partially fixed by XRandR
> 1.2 which now has it's own Xinerama controls built in, however,
> currently only Intel and I think ATI FOSS drivers support the XRandR 1.2
> spec. I was talking to the NVidia proprietry driver devs yesterday
> regarding XRandR 1.2 support and they said they are planning to make the
> official drivers XRandR 1.2 compliant but there is no scheduled release
> date at this time (it is quite a new spec).
>
> This means once the drivers support the new spec, users will not need to
> enable Xinerama in their xorg.conf as it will be handled by XRandR and
> thus XRandR won't be disabled by the traditional Xinerama running."
>
> Also there is a patch been worked on at mythtv which has put checks
> before making the call which segfaults -
> http://svn.mythtv.org/trac/ticket/3401
>
> Superm1 can you check out the status of the patch and see if we can
> apply it to the debs
>
>
>
> ** Changed in: mythtv (Ubuntu)
> Assignee: (unassigned) => Mario Limonciello
> Status: Confirmed => In Progress
>
> --
> [apport] mythfrontend.real crashed with SIGSEGV in XRRGetScreenInfo()
> https://bugs.launchpad.net/bugs/104262
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Patrick Dempsey (dempseyp) wrote :

So I turned off Xinerama by commenting it out of xorg.conf leaving me with 2
desktops on 2 heads, and Myth Front End works, but there is a video problem
when I am watching TV or a recording on one head and any video on the other
head. Both pictures flicker and the cpu usage goes to 90-100%.

Using the same xorg.conf except un-commenting Xinerama and the workaround
above with the old RandR library, I can view videos full screen on both
heads with 15-20% cpu.

There is no crash either way, but it is an odd behavior.

On 6/18/07, Apport retracing service <email address hidden> wrote:
>
> ** Attachment removed: "CoreDump.gz"
>
> http://launchpadlibrarian.net/7215630/CoreDump.gz
>
> --
> [apport] mythfrontend.real crashed with SIGSEGV in XRRGetScreenInfo()
> https://bugs.launchpad.net/bugs/104262
> You received this bug notification because you are a direct subscriber
> of the bug.
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.