[mythtv] Frontend hangs while watching tv / backend "out of free AUDIO buffers" error

Jason Tackaberry tack at auc.ca
Fri Apr 11 20:19:27 EDT 2003


As promised, here is the first of likely many bug reports. :)

Using cvs from today at about 3:30 EST.

I can reliably reproduce a hang in the frontend while watching tv.  I
load the frontend, go directly to "Watch TV", and then hit p to pause. 
Then I hit the up arrow to change channels.  The front end hangs.  Note
that I have a change_channel command set to a shell script which does
nothing but echos the channel passed on the command line.

After perhaps 5 seconds, the backend begins spewing repeatedly "ran out
of free AUDIO buffers :-("

I have attached gdb backtraces from both the frontend and the backend at
the point of the hang.  I have also attached fairly detailed info about
my system, but it's possible I've missed something.  

Let me know if you need more information.

Cheers,
Jason.

-- 
Jason Tackaberry  ::  tack at auc.ca  :: 705-949-2301 x330 
Academic Computing Support Specialist
Information Technology Services
Algoma University College  ::  www.auc.ca

-------------- next part --------------
System information:

--------------------------------------------------------------------------
OVERVIEW:


CPU: AMD Athlon 1400
Motherboard: FIC AD11
RAM: 786 MB PC100
Harddisk: Seagate ST380020A (80G, 5400RPM, 8.9ms seek, ATA100)
Video: Nvidia Geforce2 MX 64M dual head
Sound: Creative SoundBlaster Live!
Tuner card: Hauppage WinTV PCI

OS: Red Hat Linux 9 (XFree 4.3.0, Qt 3.1.1)
Video driver: Nvidia binary driver 1.0-4349
Sound driver: OSS emu10k1
Tuner driver: bttv version 0.7.96
Filesystem: ext3

Tuner input: Composite1 (fed by satellite receiver)

--------------------------------------------------------------------------
DETAILS:


[tack at viper tack]$ cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 4
model name      : AMD Athlon(tm) Processor
stepping        : 4
cpu MHz         : 1400.444
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
bogomips        : 2753.72




[root at viper root]# hdparm /dev/hda
 
/dev/hda:
 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 9729/255/63, sectors = 156301488, start = 0

[root at viper root]# hdparm -i /dev/hda
 
/dev/hda:
 
 Model=ST380020A, FwRev=3.31, SerialNo=3GC028VG
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: unknown setting WriteCache=enabled
 Drive conforms to: device does not report version:  1 2 3 4 5 6
 
[root at viper root]# hdparm -tT /dev/hda
 
/dev/hda:
 Timing buffer-cache reads:   128 MB in  0.57 seconds =222.66 MB/sec
 Timing buffered disk reads:  64 MB in  2.96 seconds = 21.60 MB/sec



[root at viper root]# dmesg | grep bttv
bttv: driver version 0.7.96 loaded
bttv: using 4 buffers with 2080k (8320k total) for capture
bttv: Host bridge is Advanced Micro Devices [AMD] AMD-760 [IGD4-1P] System
Controller
bttv: Bt8xx card found (0).
bttv0: Bt878 (rev 2) at 00:0a.0, irq: 12, latency: 32, mmio: 0xde002000
bttv0: detected: Hauppauge WinTV [card=10], PCI subsystem ID is 0070:13eb
bttv0: using: BT878(Hauppauge (bt878)) [card=10,autodetected]
bttv0: Hauppauge/Voodoo msp34xx: reset line init [5]
bttv0: Hauppauge eeprom: model=37281, tuner=Temic 4039FR5 (21), radio=yes
bttv0: using tuner=21
bttv0: i2c: checking for MSP34xx @ 0x80... found
bttv0: i2c attach [client=MSP3430G-A1,ok]
bttv0: i2c: checking for TDA9875 @ 0xb0... not found
bttv0: i2c: checking for TDA7432 @ 0x8a... not found
bttv0: i2c attach [client=tda9840,ok]
bttv0: i2c attach [client=Temic NTSC (4039 FR5),ok]
bttv0: registered device video0
bttv0: registered device vbi0
bttv0: registered device radio0
bttv0: PLL: 28636363 => 35468950 ... ok
bttv0: PLL: switching off



[root at viper root]# dmesg | grep -i emu10k
Creative EMU10K1 PCI Audio Driver, version 0.20, 18:39:36 Apr 10 2003
emu10k1: EMU10K1 rev 7 model 0x8061 found, IO at 0xe400-0xe41f, IRQ 10
emu10k1: SBLive! 5.1 card detected



[root at viper root]# cat /proc/interrupts
           CPU0
  0:   69151771          XT-PIC  timer
  1:       3327          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  5:      14598          XT-PIC  usb-uhci, usb-uhci
  8:          1          XT-PIC  rtc
 10:    6304608          XT-PIC  nvidia, EMU10K1
 11:     145554          XT-PIC  eth0
 12:       3620          XT-PIC  bttv
 14:      72148          XT-PIC  ide0
 15:        116          XT-PIC  ide1
NMI:          0
LOC:   69153908
ERR:      76816
MIS:          0

-------------- next part --------------
[tack at viper tack]$ gdb mythbackend
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(gdb) run
Starting program: /usr/local/bin/mythbackend
[New Thread 16384 (LWP 4506)]
Starting up as the master server.
Probed: /dev/video0 - Television
Probed: /dev/video0 - Composite1
Probed: /dev/video0 - S-Video
Probed: /dev/video0 - Composite3
External channel change: /usr/local/bin/change_channel.sh 611
[New Thread 32769 (LWP 4512)]
[New Thread 16386 (LWP 4513)]
[New Thread 32771 (LWP 4514)]
adding: viper as a player 1
adding: viper as a player 0
[New Thread 49156 (LWP 4521)]
adding: viper as a player 0
adding: viper as a remote ringbuffer
[New Thread 65541 (LWP 4522)]
Changing from None to WatchingLiveTV
[New Thread 81926 (LWP 4523)]
[New Thread 98311 (LWP 4524)]
[New Thread 114696 (LWP 4525)]
[Thread 49156 (LWP 4521) exited]
[New Thread 131081 (LWP 4529)]
External channel change: /usr/local/bin/change_channel.sh 612
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
ran out of free AUDIO buffers :-(
 
Program received signal SIGINT, Interrupt.
[Switching to Thread 131081 (LWP 4529)]
0x40af92f6 in nanosleep () from /lib/libc.so.6
(gdb) thread apply all bt
 
Thread 10 (Thread 131081 (LWP 4529)):
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
#1  0x00000000 in ?? ()
 
Thread 9 (Thread 114696 (LWP 4525)):
#0  0x40928fbb in read () from /lib/libpthread.so.0
#1  0x41856008 in ?? ()
#2  0x080b8d41 in NuppelVideoRecorder::AudioThread(void*) (param=0x41856008)
    at NuppelVideoRecorder.cpp:1472
#3  0x40922c40 in pthread_start_thread_event () from /lib/libpthread.so.0
 
Thread 8 (Thread 98311 (LWP 4524)):
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
#1  0x00000000 in ?? ()
 
Thread 7 (Thread 81926 (LWP 4523)):
#0  0x40b267e4 in ioctl () from /lib/libc.so.6
#1  0x41856008 in ?? ()
#2  0x08099d0a in SpawnEncode(void*) (param=0x41856008) at tv_rec.cpp:30
#3  0x40922c40 in pthread_start_thread_event () from /lib/libpthread.so.0
 
Thread 6 (Thread 65541 (LWP 4522)):
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
#1  0x00000000 in ?? ()
 
Thread 4 (Thread 32771 (LWP 4514)):
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
#1  0x00000000 in ?? ()
 
Thread 3 (Thread 16386 (LWP 4513)):
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
#1  0xffffffd8 in ?? ()
#2  0x0809e021 in TVRec::RunTV() (this=0x82e44a8) at tv_rec.cpp:687
#3  0x0809df9f in TVRec::EventThread(void*) (param=0x82e44a8) at tv_rec.cpp:661
#4  0x40922c40 in pthread_start_thread_event () from /lib/libpthread.so.0
 
Thread 2 (Thread 32769 (LWP 4512)):
#0  0x40b25487 in poll () from /lib/libc.so.6
#1  0x40921dee in __pthread_manager () from /lib/libpthread.so.0
#2  0x40921fe7 in __pthread_manager_event () from /lib/libpthread.so.0
 
Thread 1 (Thread 16384 (LWP 4506)):
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
#1  0xffffffd8 in ?? ()
#2  0x080a49f6 in TVRec::RequestRingBufferBlock(int) (this=0x82e44a8,
    size=128000) at tv_rec.cpp:1669
#3  0x08061590 in EncoderLink::RequestRingBufferBlock(int) (this=0x82e9190,
    size=128000) at encoderlink.cpp:512
#4  0x0806daba in MainServer::HandleRecorderQuery(QStringList&, QStringList&, PlaybackSock*) (this=0x82eb6c8, slist=@0xbfffe180, commands=@0xbfffe160,
    pbs=0x82ee890) at mainserver.cpp:1036
#5  0x0806630c in MainServer::readSocket() (this=0x82eb6c8)
    at mainserver.cpp:144
#6  0x0807ea33 in MainServer::qt_invoke(int, QUObject*) (this=0x82eb6c8,
    _id=6, _o=0xbfffe240) at moc_mainserver.cpp:97
#7  0x4041d0c9 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#8  0x4041cf6d in QObject::activate_signal(int) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#9  0x40729d6e in QSocket::readyRead() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#10 0x405ec643 in QSocket::sn_read(bool) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#11 0x40729e53 in QSocket::qt_invoke(int, QUObject*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#12 0x4041d0c9 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#13 0x4041d1a5 in QObject::activate_signal(int, int) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#14 0x406fd282 in QSocketNotifier::activated(int) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#15 0x404394b0 in QSocketNotifier::event(QEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#16 0x403bef24 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#17 0x403beb19 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#18 0x40399efa in QEventLoop::activateSocketNotifiers() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#19 0x403778d7 in QEventLoop::processEvents(unsigned) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#20 0x403d2cf6 in QEventLoop::enterLoop() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#21 0x403d2b98 in QEventLoop::exec() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#22 0x403bf151 in QApplication::exec() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#23 0x08064316 in main (argc=1, argv=0xbffff9c4) at main.cpp:223
#24 0x40a60917 in __libc_start_main () from /lib/libc.so.6
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
(gdb)


-------------- next part --------------
[tack at viper tack]$ gdb mythfrontend
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(gdb) run
Starting program: /usr/local/bin/mythfrontend
[New Thread 16384 (LWP 4516)]
connecting to backend server: 192.168.0.2:6543
[New Thread 32769 (LWP 4519)]
[New Thread 16386 (LWP 4520)]
Changing from None to WatchingLiveTV
[New Thread 32771 (LWP 4526)]
Over/underscanning. V: 0.050000, H: 0.050000, XOff: 0, YOff: 0
Using XV port 77
[New Thread 49156 (LWP 4527)]
[New Thread 65541 (LWP 4528)]
 
Program received signal SIGINT, Interrupt.
[Switching to Thread 65541 (LWP 4528)]
0x40af92f6 in nanosleep () from /lib/libc.so.6
(gdb) thread apply all bt
 
Thread 6 (Thread 65541 (LWP 4528)):
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
#1  0x00000000 in ?? ()
 
Thread 5 (Thread 49156 (LWP 4527)):
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
#1  0x00000000 in ?? ()
 
Thread 4 (Thread 32771 (LWP 4526)):
#0  0x40b27151 in select () from /lib/libc.so.6
#1  0x4081e27c in typeinfo for std::bad_alloc ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#2  0x405ebe2c in QSocket::waitForMore(int, bool*) const ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#3  0x405ebe7e in QSocket::waitForMore(int) const ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#4  0x400bca04 in ReadStringList(QSocket*, QStringList&) (socket=0x83ec748,
    list=@0xbf5ff94c) at util.cpp:65
#5  0x4009a5a6 in RemoteFile::RequestBlock(int) (this=0x83ec898, size=128000)
    at remotefile.cpp:187
#6  0x08116c17 in RingBuffer::safe_read(RemoteFile*, void*, unsigned) (
    this=0x83ea358, rf=0x83ec898, data=0x83fe85c, sz=12) at RingBuffer.cpp:440
#7  0x08116e37 in RingBuffer::Read(void*, int) (this=0x83ea358, buf=0x83fe85c,
    count=12) at RingBuffer.cpp:505
#8  0x081405fe in NuppelDecoder::GetFrame(int) (this=0x83fe800, onlyvideo=0)
    at nuppeldecoder.cpp:634
#9  0x080d9a42 in NuppelVideoPlayer::GetFrame(int, bool) (this=0x41746008,
    onlyvideo=0, unsafe=false) at NuppelVideoPlayer.cpp:759
#10 0x080dba8b in NuppelVideoPlayer::StartPlaying() (this=0x41746008)
    at NuppelVideoPlayer.cpp:1683
#11 0x0812450b in SpawnDecode(void*) (param=0x41746008) at tv_play.cpp:103
#12 0x40922c40 in pthread_start_thread_event () from /lib/libpthread.so.0
 
Thread 3 (Thread 16386 (LWP 4520)):
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
#1  0xffffffd8 in ?? ()
#2  0x080d80b6 in NuppelVideoPlayer::Pause() (this=0x41746008)
    at NuppelVideoPlayer.cpp:225
#3  0x0812c31f in NuppelVideoPlayer::TogglePause() (this=0x41746008)
    at NuppelVideoPlayer.h:55
#4  0x081291e5 in TV::DoPause() (this=0x83ff468) at tv_play.cpp:1211
#5  0x08127b5d in TV::ProcessKeypress(int) (this=0x83ff468, keypressed=112)
    at tv_play.cpp:855
#6  0x0812744e in TV::RunTV() (this=0x83ff468) at tv_play.cpp:709
#7  0x081272f5 in TV::EventThread(void*) (param=0x83ff468) at tv_play.cpp:673
#8  0x40922c40 in pthread_start_thread_event () from /lib/libpthread.so.0
 
Thread 2 (Thread 32769 (LWP 4519)):
#0  0x40b25487 in poll () from /lib/libc.so.6
#1  0x40921dee in __pthread_manager () from /lib/libpthread.so.0
#2  0x40921fe7 in __pthread_manager_event () from /lib/libpthread.so.0
 
Thread 1 (Thread 16384 (LWP 4516)):
#0  0x40a736a8 in sigsuspend () from /lib/libc.so.6
#1  0x40924c28 in __pthread_wait_for_restart_signal ()
   from /lib/libpthread.so.0
#2  0x40926ef0 in __pthread_alt_lock () from /lib/libpthread.so.0
#3  0x40923170 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x4066988c in QRecursiveMutexPrivate::lock() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#5  0x40669c94 in QMutex::lock() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#6  0x40377539 in QEventLoop::processEvents(unsigned) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#7  0x403d2d91 in QEventLoop::processEvents(unsigned, int) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#8  0x403bf080 in QApplication::processEvents(int) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#9  0x403bf047 in QApplication::processEvents() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#10 0x0806aa06 in startTV() () at main.cpp:114
#11 0x0806aa87 in TVMenuCallback(void*, QString&) (data=0x8394110,
    selection=@0x83cc438) at main.cpp:130
#12 0x400b647b in ThemedMenu::handleAction(QString&) (this=0x83cc300,
    action=@0x83fe614) at themedmenu.cpp:1469
#13 0x400b5b83 in ThemedMenu::keyPressEvent(QKeyEvent*) (this=0x83cc300,
    e=0xbffff350) at themedmenu.cpp:1391
#14 0x4045106c in QWidget::event(QEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#15 0x403bef24 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#16 0x403beab7 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#17 0x40366abe in QETWidget::translateKeyEvent(_XEvent const*, bool) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#18 0x40362d14 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#19 0x40377bda in QEventLoop::processEvents(unsigned) ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#20 0x403d2cf6 in QEventLoop::enterLoop() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#21 0x403bf1b1 in QApplication::enter_loop() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#22 0x40580691 in QDialog::exec() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
#23 0x0806b987 in RunMenu(QString) (themedir=
      {static null = {static null = <same as static member of an already seen type>, d = 0x8376868, static shared_null = 0x8376868}, d = 0x83cbf58, static shared_null = 0x8376868}) at main.cpp:225
#24 0x0806cf83 in main (argc=1, argv=0xbffff9c4) at main.cpp:350
#25 0x40a60917 in __libc_start_main () from /lib/libc.so.6
#0  0x40af92f6 in nanosleep () from /lib/libc.so.6
(gdb)


More information about the mythtv-dev mailing list