Public bug reported:

Background:

I just recently switched from Gentoo to Ubuntu Hardy, and have run into
a few problems here and there.  Most of them I have already solved, but
at least one has me stumped: mythtv.  I am currently using mythtv 0.21
as supplied by the Ubuntu repositories.  My capture card, a Kworld
ATSC-120, requires drivers from the linuxtv.org v4l-dvb repository.
Thus, I picked up the latest kernel (2.6.25.2), and built it using the
config file I was using in Gentoo.  As I expected, the kernel works fine
(including SMP support, as usual), and I can access my capture card
through the DVB interface thanks to that v4l-dvb driver.

With that "custom" kernel being in place, I fetched the latest nVidia
driver (173.14.09) from nvidia.com and installed it, figuring that the
one in the Ubuntu repository would insist on building against an Ubuntu
kernel rather than my "custom" one.  As expected, the nVidia driver
seems to work as it always has.  OpenGL apps like Google Earth behave
normally, 2D accel seems to work, and video-playing apps seem to work
fine (as far as I can tell anyway)....  Except mythtv.

My machine is based around an AMD 64x2 3800+ CPU with 1GB of RAM, a
reasonably fast SATA hard disk (actual speeds of close to 50 MB/sec on
writes, and upwards of 60 MB/sec reads), and an nVidia GeForce 6800
video card.

As per information I've read elsewhere, I have already edited
/etc/X11/XvMCConfig so that it contains only this one line:

libXvMCNVIDIA_dynamic.so.1

If I do not change this from the default, I see an error about a missing
symbol (probably generated by ld rather than mythfrontend), but as that
has already been covered elsewhere, it need not be further addressed
here.

On this setup, every type of standard-definition-sized video that I've
tried seems to work fine in xine and mplayer, using about 20% of one
core even at full screen.  Ditto for my husband's box, which is
identical but with a slower video card (an nVidia MX4000).

In order to play high definition video (i.e. from the ATSC side of my
capture card), with mythtv, I need to use the "Standard XvMC" decoders,
with the "xvmc-blit" video renderer, "ia44blend" for the OSD renderer
(since nVidia dropped support for chromakeys), and bob deinterlacing.
If I allow MythTV to use only one core for the decoder, the video
stutters badly, the audio is choppy, and the actual video content is
mildly corrupted near the bottom...  a sort of "stretching" effect that
looks like it only affects one of the two fields, similar to what you
get if you play a VHS video tape with the tracking slightly off.  The
console output from the program in this instance looks like this:

==========
[EMAIL PROTECTED]:~$ mythfrontend
2008-07-16 15:11:54.932 Using runtime prefix = /usr, libdir = /usr/lib
2008-07-16 15:11:56.356 XScreenSaver support enabled
2008-07-16 15:11:56.356 DPMS is disabled.
2008-07-16 15:11:56.357 Empty LocalHostName.
2008-07-16 15:11:56.357 Using localhost value of rainbird
2008-07-16 15:11:56.377 New DB connection, total: 1
2008-07-16 15:11:56.385 Connected to database 'mythconverg' at host: localhost
2008-07-16 15:11:56.387 Closing DB connection named 'DBManager0'
2008-07-16 15:11:56.389 Total desktop dim: 2560x1024, over 2 screen[s].
2008-07-16 15:11:56.390 Screen 0 dim: 1280x1024.
2008-07-16 15:11:56.390 Screen 1 dim: 1280x1024.
2008-07-16 15:11:56.390 Primary screen 0.
2008-07-16 15:11:56.390 Connected to database 'mythconverg' at host: localhost
2008-07-16 15:11:56.394 Running in a window
2008-07-16 15:11:56.394 Using screen 1, 1280x1024 at 1280,0
2008-07-16 15:11:56.411 New DB connection, total: 2
2008-07-16 15:11:56.412 Connected to database 'mythconverg' at host: localhost
2008-07-16 15:11:56.419 mythfrontend version: 0.21.20080304-1 www.mythtv.org
2008-07-16 15:11:56.420 Enabled verbose msgs:  important general
2008-07-16 15:11:56.553 Unable to parse themeinfo.xml for glass-wide
2008-07-16 15:11:56.554 The theme (glass-wide) is missing a themeinfo.xml file
2008-07-16 15:11:56.840 Unable to parse themeinfo.xml for glass-wide
2008-07-16 15:11:56.841 The theme (glass-wide) is missing a themeinfo.xml file
2008-07-16 15:11:57.323 Total desktop dim: 2560x1024, over 2 screen[s].
2008-07-16 15:11:57.323 Screen 0 dim: 1280x1024.
2008-07-16 15:11:57.323 Screen 1 dim: 1280x1024.
2008-07-16 15:11:57.323 Primary screen 0.
2008-07-16 15:11:57.324 Running in a window
2008-07-16 15:11:57.324 Using screen 1, 1280x1024 at 1280,0
2008-07-16 15:11:57.329 Switching to square mode (MythCenter)
2008-07-16 15:11:57.373 Using the OpenGL painter
2008-07-16 15:11:57.374 JoystickMenuClient Error: Joystick disabled - Failed to 
read /home/vanessa/.mythtv/joystickmenurc
mythtv: could not connect to socket
mythtv: No such file or directory
2008-07-16 15:11:57.374 lirc_init failed for mythtv, see preceding messages
2008-07-16 15:11:59.528 Loading from: 
/usr/share/mythtv/themes/MythCenter/base.xml
2008-07-16 15:11:59.612 Loading from: /usr/share/mythtv/themes/default/base.xml
2008-07-16 15:11:59.694 Registering Internal as a media playback plugin.
2008-07-16 15:12:00.440 Using NV NPOT texture extension
2008-07-16 15:12:03.384 Connecting to backend server: 127.0.0.1:6543 (try 1 of 
5)
2008-07-16 15:12:03.386 Using protocol version 40
2008-07-16 15:12:03.396 TV: Attempting to change from None to WatchingLiveTV
2008-07-16 15:12:03.397 Using protocol version 40
2008-07-16 15:12:04.560 New DB connection, total: 3
2008-07-16 15:12:04.561 Connected to database 'mythconverg' at host: localhost
2008-07-16 15:12:04.604 NVP: Disabling Audio, params(-1,2,44100)
2008-07-16 15:12:04.648 VideoOutputXv: Desired video renderer 'xvmc-blit' not 
available.
                        codec 'None' makes 'xv-blit,xshm,opengl,xlib,' 
available, using 'xv-blit' instead.
2008-07-16 15:12:04.652 VideoOutputXv: XVideo Adaptor Name: 'NV17 Video Texture'
2008-07-16 15:12:04.727 OSD Theme Dimensions W: 640 H: 480
2008-07-16 15:12:05.247 TV: Changing from None to WatchingLiveTV
2008-07-16 15:12:05.255 Realtime priority would require SUID as root.
2008-07-16 15:12:05.354 OpenGLVideoSync()
2008-07-16 15:12:05.657 Video timing method: SGI OpenGL
2008-07-16 15:12:07.548 VideoOutputXv: XvMC Adaptor Name: 'NV17 Video Texture'
2008-07-16 15:12:07.927 VideoOutputXv: ProcessFrameXvMC: Tried to reuse frame 
but failed
2008-07-16 15:12:07.928 VideoOutputXv: ProcessFrameXvMC: Called without frame
2008-07-16 15:12:07.928 AFD: Opened codec 0x9a371e0, id(MPEG2VIDEO_XVMC) 
type(Video)
2008-07-16 15:12:07.928 AFD: codec AC3 has 6 channels
2008-07-16 15:12:07.930 AFD: Opened codec 0x9a37550, id(AC3) type(Audio)
2008-07-16 15:12:08.021 Opening audio device 'default'. ch 2(2) sr 48000
2008-07-16 15:12:08.021 Opening ALSA audio device 'default'.
2008-07-16 15:12:08.057 NVP: Enabling Audio
2008-07-16 15:12:08.086 XvMC: picture structure FRAME
2008-07-16 15:12:08.289 NVP: prebuffering pause
2008-07-16 15:12:08.371 NVP: prebuffering pause
2008-07-16 15:12:08.446 WriteAudio: buffer underrun
2008-07-16 15:12:08.454 NVP: prebuffering pause

[deleted a bunch of exact repeats]

2008-07-16 15:12:10.520 NVP: prebuffering pause
2008-07-16 15:12:10.547 WriteAudio: buffer underrun
2008-07-16 15:12:11.412 TV: Attempting to change from WatchingLiveTV to None
2008-07-16 15:12:11.421 ~OpenGLVideoSync() -- begin
2008-07-16 15:12:11.422 ~OpenGLVideoSync() -- middle
2008-07-16 15:12:11.423 ~OpenGLVideoSync() -- end
2008-07-16 15:12:11.854 TV: Changing from WatchingLiveTV to None
2008-07-16 15:13:06.381 Deleting UPnP client...
==========

However, if I allow two cores, with no other changes whatsoever, and
then "Watch TV" again, it goes to the video display, displays the OSD,
waits a moment while it acquires a channel lock, blacks the window
again, and then segfaults, without ever displaying even one frame from
the video stream.  Here is the output from the controlling terminal in
this case:

==========
[EMAIL PROTECTED]:~$ mythfrontend
2008-07-16 14:41:35.352 Using runtime prefix = /usr, libdir = /usr/lib
2008-07-16 14:41:36.776 XScreenSaver support enabled
2008-07-16 14:41:36.777 DPMS is active.
2008-07-16 14:41:36.777 Empty LocalHostName.
2008-07-16 14:41:36.778 Using localhost value of rainbird
2008-07-16 14:41:36.796 New DB connection, total: 1
2008-07-16 14:41:36.803 Connected to database 'mythconverg' at host: localhost
2008-07-16 14:41:36.806 Closing DB connection named 'DBManager0'
2008-07-16 14:41:36.808 Total desktop dim: 2560x1024, over 2 screen[s].
2008-07-16 14:41:36.808 Screen 0 dim: 1280x1024.
2008-07-16 14:41:36.809 Screen 1 dim: 1280x1024.
2008-07-16 14:41:36.809 Primary screen 0.
2008-07-16 14:41:36.809 Connected to database 'mythconverg' at host: localhost
2008-07-16 14:41:36.813 Running in a window
2008-07-16 14:41:36.813 Using screen 1, 1280x1024 at 1280,0
2008-07-16 14:41:36.834 New DB connection, total: 2
2008-07-16 14:41:36.836 Connected to database 'mythconverg' at host: localhost
2008-07-16 14:41:36.840 mythfrontend version: 0.21.20080304-1 www.mythtv.org
2008-07-16 14:41:36.840 Enabled verbose msgs:  important general
2008-07-16 14:41:36.971 Unable to parse themeinfo.xml for glass-wide
2008-07-16 14:41:36.971 The theme (glass-wide) is missing a themeinfo.xml file
2008-07-16 14:41:37.262 Unable to parse themeinfo.xml for glass-wide
2008-07-16 14:41:37.262 The theme (glass-wide) is missing a themeinfo.xml file
2008-07-16 14:41:37.746 Total desktop dim: 2560x1024, over 2 screen[s].
2008-07-16 14:41:37.747 Screen 0 dim: 1280x1024.
2008-07-16 14:41:37.747 Screen 1 dim: 1280x1024.
2008-07-16 14:41:37.747 Primary screen 0.
2008-07-16 14:41:37.748 Running in a window
2008-07-16 14:41:37.748 Using screen 1, 1280x1024 at 1280,0
2008-07-16 14:41:37.753 Switching to square mode (MythCenter)
2008-07-16 14:41:37.797 Using the OpenGL painter
2008-07-16 14:41:37.798 JoystickMenuClient Error: Joystick disabled - Failed to 
read /home/vanessa/.mythtv/joystickmenurc
mythtv: could not connect to socket
mythtv: No such file or directory
2008-07-16 14:41:37.798 lirc_init failed for mythtv, see preceding messages
2008-07-16 14:41:39.979 Loading from: 
/usr/share/mythtv/themes/MythCenter/base.xml
2008-07-16 14:41:40.071 Loading from: /usr/share/mythtv/themes/default/base.xml
2008-07-16 14:41:40.147 Registering Internal as a media playback plugin.
2008-07-16 14:41:40.884 Using NV NPOT texture extension
2008-07-16 14:41:42.272 Connecting to backend server: 127.0.0.1:6543 (try 1 of 
5)
2008-07-16 14:41:42.273 Using protocol version 40
2008-07-16 14:41:42.288 TV: Attempting to change from None to WatchingLiveTV
2008-07-16 14:41:42.290 Using protocol version 40
2008-07-16 14:41:43.642 DPMS Deactivated
2008-07-16 14:41:43.644 New DB connection, total: 3
2008-07-16 14:41:43.645 Connected to database 'mythconverg' at host: localhost
2008-07-16 14:41:43.678 NVP: Disabling Audio, params(-1,2,44100)
2008-07-16 14:41:43.719 VideoOutputXv: Desired video renderer 'xvmc-blit' not 
available.
                        codec 'None' makes 'xv-blit,xshm,opengl,xlib,' 
available, using 'xv-blit' instead.
2008-07-16 14:41:43.723 VideoOutputXv: XVideo Adaptor Name: 'NV17 Video Texture'
2008-07-16 14:41:43.787 OSD Theme Dimensions W: 640 H: 480
2008-07-16 14:41:44.482 TV: Changing from None to WatchingLiveTV
2008-07-16 14:41:44.490 Realtime priority would require SUID as root.
2008-07-16 14:41:44.590 OpenGLVideoSync()
2008-07-16 14:41:44.894 Video timing method: SGI OpenGL
2008-07-16 14:41:47.522 VideoOutputXv: XvMC Adaptor Name: 'NV17 Video Texture'
2008-07-16 14:41:48.176 VideoOutputXv: ProcessFrameXvMC: Tried to reuse frame 
but failed
2008-07-16 14:41:48.176 VideoOutputXv: ProcessFrameXvMC: Called without frame
2008-07-16 14:41:48.213 AFD Error: Could not open codec 0x93edca0, 
id(MPEG2VIDEO_XVMC) type(Video) aborting. reason -1
Segmentation fault
==========

This all used to work fine within Gentoo, using about 65-70% of total
CPU (across both cores) to watch a full 1920x1080i stream with no
crashes.

I can freely switch between one or two cores and repeat these two
different error conditions with 100% reliability.

What should happen:

The video stream should play normally and mythfrontend shouldn't
segfault :-)

** Affects: mythtv (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Segfault on XvMC + SMP (if two or more cores are enabled)
https://bugs.launchpad.net/bugs/249203
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to