Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 251098 - media-tv/mythtv-0.21_p19046 - mythbackend segfaults
Summary: media-tv/mythtv-0.21_p19046 - mythbackend segfaults
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: MythTV Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-16 09:06 UTC by Stefan G. Weichinger
Modified: 2010-05-26 16:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan G. Weichinger 2008-12-16 09:06:07 UTC
The box is a x86-gentoo-linux, mostly stable packages.
2 Hauppauge WinTV Nova-S Plus inside, with drivers out of kernel 2.6.26-gentoo-r3

mythbackend crashes from time to time, I now restart it by running it as a runit-service, but it would be much better if it wouldn't crash ... it happens that recordings are broken into parts because of the crashing backend.


I see stuff like this in "dmesg":

mythbackend[31696]: segfault at 20 ip 08070240 sp bf9586b0 error 4 in mythbackend[8048000+13c000]
mythbackend[2528]: segfault at 20 ip 08070240 sp bf82c560 error 4 in mythbackend[8048000+13c000]
mythbackend[2762]: segfault at b8 ip b67154ff sp b30dbfd0 error 4 in libqt-mt.so.3.3.8[b6223000+676000]
mythbackend[24482]: segfault at 80000004 ip 08070240 sp bfc844b0 error 4 in mythbackend[8048000+13c000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythfilldatabas[3049]: segfault at 38000020 ip 08189e93 sp b58acc9c error 6
mythbackend[3278]: segfault at 706f6853 ip 08070240 sp bfeb1ee0 error 4 in mythbackend[8048000+13c000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythbackend[3352]: segfault at 20 ip 08070240 sp bfdb9de0 error 4 in mythbackend[8048000+13c000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythbackend[6472]: segfault at 20 ip 08070240 sp bf7ff020 error 4 in mythbackend[8048000+13c000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythbackend[7011]: segfault at 50 ip 08070240 sp bfa7aaa0 error 4 in mythbackend[8048000+13c000]
mythbackend[12226]: segfault at 200067 ip 08070240 sp bf9cf9f0 error 4 in mythbackend[8048000+13c000]
mythfilldatabas[13820] general protection ip:816e3e2 sp:b5834c9c error:9508
mythbackend[13034]: segfault at 6c0075 ip 08070240 sp bfe95ec0 error 4 in mythbackend[8048000+13c000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythbackend[14540]: segfault at 20 ip 08070240 sp bfe09e30 error 4 in mythbackend[8048000+13c000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythbackend[16005]: segfault at 80000200 ip 08070240 sp bf8e3110 error 4 in mythbackend[8048000+13c000]
mythbackend[18746]: segfault at eb ip 08070240 sp bfa722a0 error 4 in mythbackend[8048000+13c000]
mythbackend[18339]: segfault at 80000004 ip 08070240 sp bfc2bc50 error 4 in mythbackend[8048000+13c000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythfilldatabas[21879]: segfault at 90817a2 ip 08178145 sp b5904c9c error 6
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythbackend[24134]: segfault at 7 ip 08070240 sp bfe2be50 error 4 in mythbackend[8048000+13c000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythbackend[24471]: segfault at 7 ip 08070240 sp bfc2dc50 error 4 in mythbackend[8048000+13c000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythbackend[25902]: segfault at b8 ip b67174ff sp b48e0fd0 error 4 in libqt-mt.so.3.3.8[b6225000+676000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
mythfilldatabas[26692] general protection ip:b5f0b1fa sp:b58dec9c error:3508


Reproducible: Sometimes

Steps to Reproduce:
1. run box 24/7
2. wait
3. look dmesg ;)

Actual Results:  
see segfaults in dmesg, see mythbackend crash

Expected Results:  
run through ...
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-12-16 14:02:15 UTC
Please post your `emerge --info' too.
Comment 2 Stefan G. Weichinger 2008-12-16 20:23:04 UTC
# emerge --info
Portage 2.1.6.1 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-tuxonice-r9 x86_64)
=================================================================
System uname: Linux-2.6.24-tuxonice-r9-x86_64-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Tue, 16 Dec 2008 09:00:02 +0000
distcc 3.0 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7-r1, 2.1.6
dev-lang/python:     2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=nocona -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LDFLAGS=""
LINGUAS="de en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/ramportage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/local/portage"
SYNC="rsync://172.32.99.6/gentoo-portage"
USE="X acl acpi alsa amd64 berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gnome-keyring gpm gstreamer gtk hal howl iconv isdnlog jpeg mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptlonly ogg opengl openmp oss pam pcre pda pdf perl png pppd python qt3support quicktime readline reflection sdl session spell spl sse sse2 ssl svg tcpd tetex tiff truetype truetype-fonts type1-fonts unicode vorbis xinerama xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x 	ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 	trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Steve Dibb (RETIRED) gentoo-dev 2008-12-17 04:45:19 UTC
So is it x86 or amd64?  Looks like amd64 ... just clarifying.

I'd try a newer kernel to see if updated IVTV drivers helps.
Comment 4 Stefan G. Weichinger 2008-12-17 08:57:49 UTC
(In reply to comment #3)
> So is it x86 or amd64?  Looks like amd64 ... just clarifying.

x86 as noted in the first line.
 
> I'd try a newer kernel to see if updated IVTV drivers helps.

oops! I posted the wrong info! The posted info belongs to my workstation, sorry ... (it was late ...)

Here the correct "emerge --info" for the backend.
I assume the kernel is new enough now:

# emerge --info
Portage 2.1.6.1 (default/linux/x86/2008.0/server, gcc-4.1.2, glibc-2.6.1-r0, 2.6.26-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.26-gentoo-r3-i686-Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-glibc2.0
Timestamp of tree: Tue, 16 Dec 2008 09:00:02 +0000
distcc 3.0 i686-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r2
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="   http://gentoo.osuosl.org/   http://distro.ibiblio.org/pub/linux/distributions/gentoo/   http://www.gtlib.gatech.edu/pub/gentoo   http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/   http://gentoo.seren.com/gentoo   http://gentoo.chem.wisc.edu/gentoo/   http://cudlug.cudenver.edu/gentoo/   http://gentoo.mirrors.pair.com/   http://gentoo.mirrors.tds.net/gentoo   http://gentoo.netnitco.net   http://mirror.espri.arizona.edu/gentoo/   http://mirrors.acm.cs.rpi.edu/gentoo/   http://gentoo.llarian.net/   http://mirror.datapipe.net/gentoo   http://gentoo.cs.lewisu.edu/gentoo/   http://prometheus.cs.wmich.edu/gentoo   http://mirror.usu.edu/mirrors/gentoo/   http://mirror.phy.olemiss.edu/mirror/gentoo   http://mirror.mcs.anl.gov/pub/gentoo/   http://gentoo.cites.uiuc.edu/pub/gentoo/   http://mirror.clarkson.edu/pub/distributions/gentoo/   http://www.las.ic.unicamp.br/pub/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl acpi berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv imagemagick isdnlog mailwrapper mcal midi mmx mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection samba session snmp spl sse sse3 ssl sysfs tcpd truetype unicode x86 xml xml2 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" DVB_CARDS="cx8800 cx8802" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Steve Dibb (RETIRED) gentoo-dev 2008-12-17 15:57:50 UTC
2.6.26.x is still gonna be minor bugfixes, try 2.6.27.x or up, and see if that changes anything.
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2008-12-17 16:01:11 UTC
It looks like there's something wrong with your card potentially since it's generating kernel errors in the driver with regard to the mpeg stream your card is creating. This bad mpeg stream is then being passed to mythbackend, which can't handle it. It could potentially be a driver issue, I know there were a few issues with the Hauppauge Nova-T cards with 2.6.26 which could cross over to the Nova-S cards.

How long has this been happening? What's the last combination that worked? What changed that started the issue? Do you have a backtrace of the crash? Did you compile MythTV with USE=debug? Have you looked into the cx8802_start_dma() errors that your card/driver is spitting out?

Those are just a few of the starting places for debugging this issue since we don't have the hardware to do testing on our end the info will have to come from you.

For getting backtraces from MythTV, please look at http://www.gentoo.org/proj/en/qa/backtraces.xml
Comment 7 Stefan G. Weichinger 2008-12-17 17:51:49 UTC
(In reply to comment #6)
> It looks like there's something wrong with your card potentially since it's
> generating kernel errors in the driver with regard to the mpeg stream your card
> is creating. This bad mpeg stream is then being passed to mythbackend, which
> can't handle it. It could potentially be a driver issue, I know there were a
> few issues with the Hauppauge Nova-T cards with 2.6.26 which could cross over
> to the Nova-S cards.

OK, I just now went up to 2.6.27-gentoo-r6, let's see.

> How long has this been happening? 

About since I migrated over to new hardware: a few weeks ...

> What's the last combination that worked? What
> changed that started the issue? 

The other box was a Pentium Dual Core, it used one of the Nova-S-cards already.
The old box wasn't on 24/7, but shut down and waked-on-lan when recordings were due. Maybe this didn't trigger the problem because it was never up that long, maybe it's the second DVB-S-card now used.

> Do you have a backtrace of the crash? 

No, not yet.

> Did you
> compile MythTV with USE=debug? 

No, not yet.

> Have you looked into the cx8802_start_dma()
> errors that your card/driver is spitting out?

Where should I look those up?

> Those are just a few of the starting places for debugging this issue since we
> don't have the hardware to do testing on our end the info will have to come
> from you.
> 
> For getting backtraces from MythTV, please look at
> http://www.gentoo.org/proj/en/qa/backtraces.xml

Phew, sounds a bit scary ;)

I took the easiest step for now and upgraded to the kernel 2.6.27-gentoo-r6 for a start. Just to see if those issues still happen then.

I'll be happy to recompile mythtv with "debug", yes.

The backtrace-issue seems to need more time, so I will only find time for this in a few days or so. You know, quiet christmas-time ...

Thanks so far, Stefan
Comment 8 Stefan G. Weichinger 2008-12-17 17:54:25 UTC
(In reply to comment #6)

> What's the last combination that worked? What
> changed that started the issue?

Ah, another thought:
On the old box I used the drivers out of the package media-tv/v4l-dvb-hg.
When I moved to the new one I decided to use the drivers in the kernel as it seemed to me that those would be the newer and better ones ... so this could also be the reason.
Comment 9 Stefan G. Weichinger 2008-12-18 08:19:56 UTC
(In reply to comment #7)

> OK, I just now went up to 2.6.27-gentoo-r6, let's see.

Just checked it this morning, the backend did run through, but mythfilldatabase segfaulted:

dmesg gives:
mythfilldatabas[19221]: segfault at 20000000 ip 0816f733 sp b582bc9c error 6

while mythbackend is up and running for ~53000 seconds (about 15 hrs, which is since last reboot):

# sv status mythbackend
run: mythbackend: (pid 7226) 52717s
Comment 10 Henry Wertz 2009-02-01 04:43:04 UTC
     Are you still crashing?  In my case, I suspect a compiler bug.

     I have an athlon-xp system with bt878, (-march=athlon-xp), it has run mythtv fine for years.

     My parents have a Sempron system (-march=athlon64).  It was running it fine then recently began crashing, a lot.  The error message you have MAY actually be because of myth crashing in mid-grab, the bt878 there began generating very odd error messages, which went after I rebuilt mythtv.

     Long story short I rebuild mythtv with gcc-4.2.4 and it was fine.  Don't forget to FEATURES="-distcc", I accidentaly built a copy that was distcc'd with a gcc-4.3 box and the result was not pretty 8-)


Comment 11 Stefan G. Weichinger 2009-02-02 08:18:20 UTC
(In reply to comment #10)

>      Long story short I rebuild mythtv with gcc-4.2.4 and it was fine.

I give that a try, recompiled yesterday with gcc-4.3.3, so far no more hiccups in "dmesg" or the logs. Will monitor this for a longer period, sure. Thanks. 

Comment 12 Stefan G. Weichinger 2009-02-06 08:24:46 UTC
Unfortunately no .... got this one again in dmesg:

mythfilldatabas[18801]: segfault at 0 ip 0816240b sp b58a0824 error 6
mythbackend[26747]: segfault at 0 ip b65380d6 sp a77ff140 error 4 in libqt-mt.so.3.3.8[b62be000+679000]
cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
Comment 13 Doug Goldstein (RETIRED) gentoo-dev 2009-11-10 16:10:24 UTC
Without having printk timers, there's no way of telling how far apart those errors happened. They could have been one after another or they could have been days apart.

mythfilldatabase is known to crash when /tmp runs out of space while its going. It actually takes a significant amount of spaces sometimes (its taken up almost 200mb for me). It also crashes if you haven't run mysql-optimize on your tables for a long time. It crashes just cause a breeze blew by your house after 4pm.

As far as the backend dying, I would still suspect its an issue with your drivers for your capture card given the error about the mpeg. Its possible that the drivers stop feeding data to the backend because something bad happened and the backend isn't handling this case gracefully and crashing. Then after trying to recover, the drivers spit out an error about the mpeg. Its probable that you've got line noise from your provider that's flipping some bits and causing the mpeg stream to be weird.
Comment 14 Doug Goldstein (RETIRED) gentoo-dev 2010-05-26 16:04:23 UTC
Have you been able to reconfirm this on a 0.22 version?