Opened 16 years ago

Closed 15 years ago

#5356 closed defect (invalid)

Internal DVD playback segfaults using multiple cores.

Reported by: john Owned by: skamithi
Priority: minor Milestone: 0.22
Component: DVD Playback Version: 0.21-fixes
Severity: medium Keywords: dual core dvd iso segfault
Cc: Ticket locked: no

Description

A large number of my dvd.iso files cause mythfrontend to segfault. I traced it down to being associated with using a playback profile that enabled load sharing across both cores (cpu =2 in the playback profile)

I attach a backtrace, from a segfault. Same iso plays when cpu = 1 in playback profile.

Also discussed : http://www.gossamer-threads.com/lists/mythtv/dev/333939#333939

John

Attachments (5)

gdb.txt (35.3 KB) - added by anonymous 16 years ago.
iso-segfault-traceback-2.txt (18.8 KB) - added by klaas.de.waal@… 15 years ago.
segfault traceback for iso image playback with standard decoder and 2 CPUs
gdb-log-songfestival.txt (29.0 KB) - added by klaas.de.waal@… 15 years ago.
gdb log for DVD "Songfestival" (fedora 8, mythtv svn 20069)
gdb-log-safini.txt (37.0 KB) - added by klaas.de.waal@… 15 years ago.
gdb log for DVD "A Safini" (fedora 8, mythtv svn 20069)
gdb-log-nederpop2.txt (26.3 KB) - added by klaas.de.waal@… 15 years ago.
gdb log for DVD "Nederpop2" (fedora 8, mythtv svn 20069)

Download all attachments as: .zip

Change History (22)

Changed 16 years ago by anonymous

Attachment: gdb.txt added

comment:1 Changed 16 years ago by skamithi

Component: mythvideomythtv
Resolution: worksforme
Status: newclosed

traceback appears to be on mmx functions. I think this is a system problem. perhaps your kernel is not configured correctly or mythtv is not compiled with the correct options. i have a dual-core frontend and dual core dev laptop. both of which have no issues when i select cpu = 2, and this is my default setting.

unless someone else reports the same issue, i'm going to mark this as a worksforme. I had problems once on my dual core frontend when I compiled mythtv with the pentiumpro option by mistake instead of pentium4 (32bit kernel). opengl vsync stopped working properly causing all sorts of hangs and lockups. when i compiled it with the correct cpu type, everything works like a champ.

comment:2 Changed 16 years ago by superm1@…

Resolution: worksforme
Status: closednew

I highly doubt this is the wrong CPU type this user is using.

CFLAGS="-g -O2 -fPIC -DPIC" ./configure --prefix=/usr --enable-lirc --enable-audio-alsa \

--enable-audio-oss --enable-audio-jack --enable-audio-arts --enable-dvb \ --enable-ivtv --enable-firewire --enable-joystick-menu \ --enable-opengl-vsync --with-bindings=perl --enable-opengl-video \ --enable-ffmpeg-pthreads\ --compile-type=profile --cpu=i686 --enable-mmx --enable-xvmc --enable-xvmc-vld --enable-xvmc-pro --enable-glx-procaddrarb --enable-libfaad --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-libfftw3

That's what he is compiled for.

comment:3 Changed 16 years ago by noisymime

I have confirmed this using both the vanilla Ubuntu 8.04 build as well as manual build using options in previous comment (ie cpu=i686).

One of my test machines is a P4 with hyperthreading. Switching hyperthreading on (in BIOS, resulting in the system seeing 2 CPUs) causes segfault during DVD playback. When this is switched off in BIOS however (With no other changes to the system, including kernel), then previously problematic DVDs will play without any issue.

comment:4 Changed 16 years ago by prj.vandenberg@…

I have the same issue when i use my (happauge) remote control. When i use a vnc client to contol MythTV, there are no problems playing the DVD.

comment:5 Changed 16 years ago by anonymous

the above comment was not the right conclusion, but just coinsidence. Sorry

comment:6 Changed 16 years ago by anonymous

I have the sort of the same problem. DVD playback on image files sometimes makes the internal player to segfault. I noticed this happens more often when beforehand playing anything with mplayer and then playing something with the internal player.

Logs just state: Segmentation fault without any more information.

comment:7 Changed 16 years ago by stuartm

Component: mythtvDVD Playback

comment:8 Changed 15 years ago by Dibblah

Status: newassigned

comment:9 Changed 15 years ago by Anduin Withers

Owner: changed from Anduin Withers to skamithi

comment:10 Changed 15 years ago by stuartm

Can we have some more backtraces from other people that are affected and with different DVDs? There are a couple of oddities in the original backtrace but they may be unrelated and I'd like to see if we can make any correlation.

Please give details of mythtv versions, distribution versions along with the DVD title and video profiles being used.

comment:11 Changed 15 years ago by stuartm

Status: assignedinfoneeded

comment:12 Changed 15 years ago by klaas.de.waal@…

I have reproduced this bug on my Intel dual core running Fedora 10 with the MythTV release-0-21-fixes svn revision 20038.
It does only segfault with "Decoder: standard" and with "MaxCPUs: 2". It does not segfault with only one CPU. It also does not segfault with "Decoder: libmpeg2" (1 or 2 CPU's). It only crashes on a few iso images, but it is 100% reproducible on those iso images.
Attachment iso-segfault-traceback-2.txt will be included.

Changed 15 years ago by klaas.de.waal@…

segfault traceback for iso image playback with standard decoder and 2 CPUs

Changed 15 years ago by klaas.de.waal@…

Attachment: gdb-log-songfestival.txt added

gdb log for DVD "Songfestival" (fedora 8, mythtv svn 20069)

Changed 15 years ago by klaas.de.waal@…

Attachment: gdb-log-safini.txt added

gdb log for DVD "A Safini" (fedora 8, mythtv svn 20069)

Changed 15 years ago by klaas.de.waal@…

Attachment: gdb-log-nederpop2.txt added

gdb log for DVD "Nederpop2" (fedora 8, mythtv svn 20069)

comment:13 Changed 15 years ago by klaas.de.waal@…

Added three attachments with gdb logs, now produced with the gdb settings as described in the MythTV documentation pages. This time the logs are made on an older machine with an E4600 CPU running Fedora 8. MythTV release-0-21-fixes svn 20069, compiled today.

If you run it without gdb then you get the following line in /var/log/messages:

Feb 28 10:56:33 zolder kernel: mythfrontend[15257]: segfault at 7fe7e41880d8 ip 7fe7eb2d282e sp 450d49d8 error 7 in libmythavcodec-0.21.so.0.21.0[7fe7eb099000+32b000]

Running from the commandline (without gdb) there are a lot of [mpeg2video] messages which suggest that the DVD image is not error-free. Here are the last lines:

2009-02-28 11:17:05.448 [mpeg2video @ 0x7f571b39f380]ac-tex damaged at 0 15
2009-02-28 11:17:05.448 [mpeg2video @ 0x7f571b39f380]00 motion_type at 10 16
2009-02-28 11:17:05.448 [mpeg2video @ 0x7f571b39f380]ac-tex damaged at 0 17
2009-02-28 11:17:05.473 [mpeg2video @ 0x7f571b39f380]Warning MVs not available
Segmentation fault

Also, the gdb tracebacks do always contain functions from file error_resilience.c which suggests that the buggy code might be trying to correct the [mpeg2video] errors.

Hope this helps! If there is a patch for this I can of course test it.

Klaas.

comment:14 Changed 15 years ago by danielk

Status: infoneededassigned

comment:15 Changed 15 years ago by stuartm

Milestone: unknown0.22

Can you reproduce with current trunk?

comment:16 Changed 15 years ago by stuartm

Status: assignedinfoneeded

comment:17 Changed 15 years ago by stuartm

Resolution: invalid
Status: infoneededclosed

No feedback from ticket submitter in 30 days

Note: See TracTickets for help on using tickets.