Mailing List Archive

MythMusic problems
Hello all,

I'm trying to figure out what is going on with my MythMusic setup. It
will start playing and then chokes when starting a new song. It will
sometimes play 4 or 5 songs and then when it goes to start the last
song it freezes. The GUI switches to the next song but the elapsed
time stays at 0:00 and the interface responds very slowly. It exits
eventually if I hit escape. Top says that mythmusic is using 85% of
the CPU and I'm seeing a lot of hard disk access. I originally thought
thought the problem was with my soundcard (builtin via82xx). I
switched to USB audio and have the same problem (though the audio
quality is much better).

I am running debian unstable with kernel 2.4.20 and ALSA sound.
The machine is a Shuttle FV-25 with a 1 ghz VI C3 and a WinTV PVR -250.

I'm playing mp3 files that are mounted over NFS from my MacOS X
machine. I'm currently copying some files to my MythTV machine to make
sure the network isn't causing the problem...

I was just wondering if anyone had any quick suggestions before I start
trying to debug... I'm a little rusty with my debugging skills
(especially with C++).

Thanks,

-Jeremy
Re: MythMusic problems [ In reply to ]
> I was just wondering if anyone had any quick suggestions before I start
> trying to debug... I'm a little rusty with my debugging skills
> (especially with C++).

I've been having similar problems with my setup (redhat 9, asus pundit),
both with network and non-network files. As I've been told, the cvs
version of mythmusic is a lot faster/better. Hopefully I'll have some
time to compile it tonight.

-Chris
Re: MythMusic problems [ In reply to ]
I forgot to note that I am using the CVS version (from a day or two
ago).
The CVS version is quicker but I still have the same problems.

-Jeremy
On Tuesday, May 13, 2003, at 01:48 PM, Chris Petersen wrote:

>> I was just wondering if anyone had any quick suggestions before I
>> start
>> trying to debug... I'm a little rusty with my debugging skills
>> (especially with C++).
>
> I've been having similar problems with my setup (redhat 9, asus
> pundit),
> both with network and non-network files. As I've been told, the cvs
> version of mythmusic is a lot faster/better. Hopefully I'll have some
> time to compile it tonight.
>
> -Chris
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: MythMusic problems [ In reply to ]
On Tuesday 13 May 2003 04:10 pm, Jeremy Green wrote:
> I forgot to note that I am using the CVS version (from a day or two
> ago).
> The CVS version is quicker but I still have the same problems.

Right -- what you described is totally different from his issues. The first
step in debugging it will be to figure out what it's doing when it goes
bonkers like that.

Isaac
Re: MythMusic problems [ In reply to ]
I guess I'll recompile it for debugging...

I just verified that it does happen with local files, not just over the
network.

Are there any command line options for mythmusic to get some debugging
output?

-Jeremy


On Tuesday, May 13, 2003, at 04:30 PM, Isaac Richards wrote:

> On Tuesday 13 May 2003 04:10 pm, Jeremy Green wrote:
>> I forgot to note that I am using the CVS version (from a day or two
>> ago).
>> The CVS version is quicker but I still have the same problems.
>
> Right -- what you described is totally different from his issues. The
> first
> step in debugging it will be to figure out what it's doing when it goes
> bonkers like that.
>
> Isaac
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: MythMusic problems [ In reply to ]
> Right -- what you described is totally different from his issues. The
> first step in debugging it will be to figure out what it's doing when it
> goes bonkers like that.

Some of it was the same. I experience the huge lag in GUI, and hitting
esc a bunch that eventually (after up to a minute) brings me back to the
mythmusic entry page.

Anyway, I'm hoping to have time to poke around in the mythmusic code
tonight, though I'll admit that my database skills are far better than
my raw C++ skills, so I'll be focusing my efforts there.

-Chris
Re: MythMusic problems [ In reply to ]
On Tuesday 13 May 2003 04:44 pm, Chris Petersen wrote:
> > Right -- what you described is totally different from his issues. The
> > first step in debugging it will be to figure out what it's doing when it
> > goes bonkers like that.
>
> Some of it was the same. I experience the huge lag in GUI, and hitting
> esc a bunch that eventually (after up to a minute) brings me back to the
> mythmusic entry page.

Naw =) I'm almost completely certain that what you're seeing was something
else that should now be fixed in CVS. A couple other people reported the 'UI
freezes for long periods of time but music plays fine' bug, and one of them
actually did some debugging on it.

Isaac
Re: MythMusic problems [ In reply to ]
On Tuesday 13 May 2003 04:43 pm, Jeremy Green wrote:
> I guess I'll recompile it for debugging...
>
> I just verified that it does happen with local files, not just over the
> network.
>
> Are there any command line options for mythmusic to get some debugging
> output?
>

Jeremy,

If you could try and run in debugging, hit Ctrl-C when it's locked and send a
backtrace, we can probably track this down.

One thing to look out fro seems to be Redhat 8.x'ish with a wonky thread
library and Qt 3.0.x. Few people with sluggish interfaces in these
circumstances have reported much improved situation after upgrading to Qt
3.1.x.

- thor
Re: MythMusic problems [ In reply to ]
Ok,

You'll have to excuse me, it's been a while since I've used a debugger.
I ran mythmusic with the debugger, it got stuck at the beginning of the
second song. The elapsed time never changes from zero. The interface
is working although to terrible quick. When I look in top it shows
that mythmusic is using a lot of resources:

775 mythtv 15 0 343m 143m 1416 R 19.2 83.7 0:52.69 mythmusic

343 megs of swap?

The backtrace gave me this:

Program received signal SIGINT, Interrupt.
0x40a8aad2 in sigsuspend () from /lib/libc.so.6
(gdb) backtrace
#0 0x40a8aad2 in sigsuspend () from /lib/libc.so.6
#1 0x40948f35 in __pthread_wait_for_restart_signal ()
from /lib/libpthread.so.0
#2 0x40945f05 in pthread_cond_wait () from /lib/libpthread.so.0
#3 0x40701b61 in QWaitCondition::wait(QMutex*, unsigned long) ()
from /usr/lib/libqt-mt.so.3
#4 0x08074a2c in MadDecoder::flush(bool) (this=0x82c2768, final=false)
at maddecoder.cpp:293
#5 0x0807536b in MadDecoder::madOutput() (this=0x82c2768)
at maddecoder.cpp:500
#6 0x0807507d in MadDecoder::run() (this=0x82c2768) at
maddecoder.cpp:409
#7 0x40499e3e in QProc::~QProc() () from /usr/lib/libqt-mt.so.3
#8 0x40946d53 in pthread_start_thread () from /lib/libpthread.so.0
#9 0x40946d99 in pthread_start_thread_event () from
/lib/libpthread.so.0

I continued it and a minute later it exited with this:
Cannot find user-level thread for LWP 775: generic error
(gdb)

Any ideas?
Thanks,

-Jeremy

On Wednesday, May 14, 2003, at 07:53 PM, thor wrote:

> On Tuesday 13 May 2003 04:43 pm, Jeremy Green wrote:
>> I guess I'll recompile it for debugging...
>>
>> I just verified that it does happen with local files, not just over
>> the
>> network.
>>
>> Are there any command line options for mythmusic to get some debugging
>> output?
>>
>
> Jeremy,
>
> If you could try and run in debugging, hit Ctrl-C when it's locked
> and send a
> backtrace, we can probably track this down.
>
> One thing to look out fro seems to be Redhat 8.x'ish with a wonky
> thread
> library and Qt 3.0.x. Few people with sluggish interfaces in these
> circumstances have reported much improved situation after upgrading to
> Qt
> 3.1.x.
>
> - thor
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: MythMusic problems [ In reply to ]
On Wednesday 14 May 2003 11:27 pm, Jeremy Green wrote:
> Ok,
>
> You'll have to excuse me, it's been a while since I've used a debugger.
> I ran mythmusic with the debugger, it got stuck at the beginning of the
> second song. The elapsed time never changes from zero. The interface
> is working although to terrible quick. When I look in top it shows
> that mythmusic is using a lot of resources:
>
> 775 mythtv 15 0 343m 143m 1416 R 19.2 83.7 0:52.69 mythmusic
>
> 343 megs of swap?

Yeah, that's not quite normal =)

> The backtrace gave me this:

Could you get the rest of the threads? Instructions are:
http://www.mythtv.org/docs/mythtv-HOWTO-18.html#ss18.9

Isaac
Re: MythMusic problems [ In reply to ]
So, even when it is behaving normally and playing fine it is using 82
megs of ram. It seems like there must be a memory leak somewhere that
is making it hog up all the memory until it starts thrashing and dies.

It never happens in the middle of a song. Only when starting a new
song.

Here's the whole backtrace:

GNU gdb 5.3-debian
Copyright 2002 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-linux"...
(gdb) run
Starting program: /home/jag/mythtv/mythmusic/mythmusic/mythmusic
[New Thread 16384 (LWP 833)]
[New Thread 32769 (LWP 836)]
[New Thread 16386 (LWP 837)]
[New Thread 32771 (LWP 838)]
[New Thread 49156 (LWP 839)]
[New Thread 65541 (LWP 840)]
[New Thread 81926 (LWP 841)]
[New Thread 98311 (LWP 842)]
[New Thread 114696 (LWP 843)]
[New Thread 131081 (LWP 844)]
[New Thread 147466 (LWP 845)]
[New Thread 163851 (LWP 851)]

Program received signal SIGINT, Interrupt.
[Switching to Thread 163851 (LWP 851)]
0x40a8aad2 in sigsuspend () from /lib/libc.so.6
(gdb) thread apply all bt full

Thread 12 (Thread 163851 (LWP 851)):
#0 0x40a8aad2 in sigsuspend () from /lib/libc.so.6
No symbol table info available.
#1 0x40948f35 in __pthread_wait_for_restart_signal ()
from /lib/libpthread.so.0
No symbol table info available.
#2 0x40945f05 in pthread_cond_wait () from /lib/libpthread.so.0
No symbol table info available.
#3 0x40701b61 in QWaitCondition::wait(QMutex*, unsigned long) ()
from /usr/lib/libqt-mt.so.3
No symbol table info available.
#4 0x08074a2c in MadDecoder::flush(bool) (this=0x82bf9c8, final=false)
at maddecoder.cpp:293
min = 2048
#5 0x0807536b in MadDecoder::madOutput() (this=0x82bf9c8)
at maddecoder.cpp:500
sample = 110
samples = 382
channels = 2
left = (const mad_fixed_t *) 0x82c3bdc
right = (const mad_fixed_t *) 0x82c4ddc
#6 0x0807507d in MadDecoder::run() (this=0x82bf9c8) at
maddecoder.cpp:409
---Type <return> to continue, or q <return> to quit---
No locals.
#7 0x40499e3e in QProc::~QProc() () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#8 0x40946d53 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#9 0x40946d99 in pthread_start_thread_event () from
/lib/libpthread.so.0
No symbol table info available.

Thread 10 (Thread 131081 (LWP 844)):
#0 0x40b1ba04 in write () from /lib/libc.so.6
No symbol table info available.
#1 0x4094fb50 in __JCR_LIST__ () from /lib/libpthread.so.0
No symbol table info available.
#2 0x0805f05f in AudioOutput::run() (this=0x81be600) at
audiooutput.cpp:345
afd = {fds_bits = {32768, 0 <repeats 31 times>}}
tv = {tv_sec = 5, tv_usec = 0}
b = (Buffer *) 0x818dac0
done = false
n = 4294911965
m = 4294967295
l = 2048
#3 0x40499e3e in QProc::~QProc() () from /usr/lib/libqt-mt.so.3
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#4 0x40946d53 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#5 0x40946d99 in pthread_start_thread_event () from
/lib/libpthread.so.0
No symbol table info available.

Thread 2 (Thread 32769 (LWP 836)):
#0 0x40b20248 in poll () from /lib/libc.so.6
No symbol table info available.
#1 0x40946a8e in __pthread_manager () from /lib/libpthread.so.0
No symbol table info available.
#2 0x40946c55 in __pthread_manager_event () from /lib/libpthread.so.0
No symbol table info available.

Thread 1 (Thread 16384 (LWP 833)):
#0 0x40b21a9e in select () from /lib/libc.so.6
No symbol table info available.
#1 0x4086c544 in typeinfo for QCommonStyle () from
/usr/lib/libqt-mt.so.3
No symbol table info available.
#2 0x404b57c7 in QEventLoop::enterLoop() () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#3 0x404a4454 in QApplication::enter_loop() () from
/usr/lib/libqt-mt.so.3
No symbol table info available.
#4 0x40633dae in QDialog::exec() () from /usr/lib/libqt-mt.so.3
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#5 0x08077ace in startPlayback(PlaylistsContainer*, AllMusic*) (
all_playlists=0x8169750, all_music=0x8169780) at main.cpp:238
pbb = (class PlaybackBox *) 0x81c1318
#6 0x08077d16 in MusicCallback(void*, QString&) (data=0xbffff930,
selection=@0x816a5e0) at main.cpp:285
mdata = (MusicData *) 0xbffff930
sel = {static null = {
static null = <same as static member of an already seen type>,
d = 0x8140278, static shared_null = 0x8140278}, d = 0x81bc8a8,
static shared_null = 0x8140278}
#7 0x4022c5e2 in ThemedMenu::handleAction(QString&) ()
from /usr/local/lib/libmyth-0.9.so.0
No symbol table info available.
#8 0x4022bbc4 in ThemedMenu::keyPressEvent(QKeyEvent*) ()
from /usr/local/lib/libmyth-0.9.so.0
No symbol table info available.
#9 0x4052562b in QWidget::event(QEvent*) () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#10 0x404a4206 in QApplication::internalNotify(QObject*, QEvent*) ()
from /usr/lib/libqt-mt.so.3
No symbol table info available.
#11 0x404a3def in QApplication::notify(QObject*, QEvent*) ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib/libqt-mt.so.3
No symbol table info available.
#12 0x404542af in QETWidget::translateKeyEvent(_XEvent const*, bool) ()
from /usr/lib/libqt-mt.so.3
No symbol table info available.
#13 0x4045095a in QApplication::x11ProcessEvent(_XEvent*) ()
from /usr/lib/libqt-mt.so.3
No symbol table info available.
#14 0x404636cd in QEventLoop::processEvents(unsigned) ()
from /usr/lib/libqt-mt.so.3
No symbol table info available.
#15 0x404b57c7 in QEventLoop::enterLoop() () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#16 0x404a4454 in QApplication::enter_loop() () from
/usr/lib/libqt-mt.so.3
No symbol table info available.
#17 0x40633dae in QDialog::exec() () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#18 0x08078144 in runMenu(QString, QSqlDatabase*, QString, QString,
PlaylistsContainer*, AllMusic*) (themedir=
{static null = {static null = <same as static member of an
already seen type>, d = 0x8140278, static shared_null = 0x8140278}, d =
0x8169d10, static shared_null = 0x8140278}, db=0x8163208, paths=
{static null = {static null = <same as static member of an
already seen ty---Type <return> to continue, or q <return> to quit---
static shared_null = 0x8140278}, startdir=
{static null = {static null = <same as static member of an
already seen type>, d = 0x8140278, static shared_null = 0x8140278}, d =
0x81691b0, static shared_null = 0x8140278}, all_playlists=0x8169750,
all_music=0x8169780)
at main.cpp:338
diag = (struct ThemedMenu *) 0x816a4a8
data = {paths = {static null = {
static null = <same as static member of an already seen type>,
d = 0x8140278, static shared_null = 0x8140278}, d = 0x8169ae8,
static shared_null = 0x8140278}, db = 0x8163208, startdir = {
static null = {
static null = <same as static member of an already seen type>,
d = 0x8140278, static shared_null = 0x8140278}, d = 0x81691b0,
static shared_null = 0x8140278}, all_playlists = 0x8169750,
all_music = 0x8169780}
#19 0x08078dfc in main (argc=1, argv=0xbffffb64) at main.cpp:414
a = <incomplete type>
db = (struct QSqlDatabase *) 0x8163208
lcd_host = {static null = {
static null = <same as static member of an already seen type>,
d = 0x8140278, static shared_null = 0x8140278}, d = 0x8168f38,
static shared_null = 0x8140278}
---Type <return> to continue, or q <return> to quit---
lcd_port = {static null = {
static null = <same as static member of an already seen type>,
d = 0x8140278, static shared_null = 0x8140278}, d = 0x8168fd8,
static shared_null = 0x8140278}
lcd_port_number = 0
count_query = <incomplete type>
musicdata_exists = true
startdir = {static null = {
static null = <same as static member of an already seen type>,
d = 0x8140278, static shared_null = 0x8140278}, d = 0x81691b0,
static shared_null = 0x8140278}
paths = {static null = {
static null = <same as static member of an already seen type>,
d = 0x8140278, static shared_null = 0x8140278}, d = 0x8169ae8,
static shared_null = 0x8140278}
all_music = (AllMusic *) 0x8169780
themename = {static null = {
static null = <same as static member of an already seen type>,
d = 0x8140278, static shared_null = 0x8140278}, d = 0x8169c58,
static shared_null = 0x8140278}
themedir = {static null = {
static null = <same as static member of an already seen type>,
d = 0x8140278, static shared_null = 0x8140278}, d = 0x8169d10,
---Type <return> to continue, or q <return> to quit---
static shared_null = 0x8140278}
all_playlists = (PlaylistsContainer *) 0x8169750
#0 0x40a8aad2 in sigsuspend () from /lib/libc.so.6


On Wednesday, May 14, 2003, at 11:35 PM, Isaac Richards wrote:

> On Wednesday 14 May 2003 11:27 pm, Jeremy Green wrote:
>> Ok,
>>
>> You'll have to excuse me, it's been a while since I've used a
>> debugger.
>> I ran mythmusic with the debugger, it got stuck at the beginning of
>> the
>> second song. The elapsed time never changes from zero. The interface
>> is working although to terrible quick. When I look in top it shows
>> that mythmusic is using a lot of resources:
>>
>> 775 mythtv 15 0 343m 143m 1416 R 19.2 83.7 0:52.69
>> mythmusic
>>
>> 343 megs of swap?
>
> Yeah, that's not quite normal =)
>
>> The backtrace gave me this:
>
> Could you get the rest of the threads? Instructions are:
> http://www.mythtv.org/docs/mythtv-HOWTO-18.html#ss18.9
>
> Isaac
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: MythMusic problems [ In reply to ]
On Thursday 15 May 2003 12:26 am, Jeremy Green wrote:
> So, even when it is behaving normally and playing fine it is using 82
> megs of ram. It seems like there must be a memory leak somewhere that
> is making it hog up all the memory until it starts thrashing and dies.
>
> It never happens in the middle of a song. Only when starting a new
> song.
>
> Here's the whole backtrace:
>

This looks very much like a Redhat 8.x problem. As far as I understand what
you're experiencing, you have a RH 8.x OS which is complaining about memory
loss. This is probably a threads vs. Redhat 8.x exception. The pthread
library (which is the core of the Qt library) is only a few ***years*** old.

Redhat blows serious fu*kin* chunks.

They are the worst distribution to have ever come down the Linux pipe.
Mythmusic assumes that threads work correctly. Try going to 9.0. If that
doesn't clean things up, think about going to a distribution that understands
interface-level dependencies. If you can't do that, write a letter to the
fuckers that got $65 dollars from you last purchase of GPL code.

- thor
Re: MythMusic problems [ In reply to ]
Except I've got Debian Unstable...
I have qt 3.1.1-7 (the debian package)
Any other ideas?

-Jeremy


On Thursday, May 15, 2003, at 05:24 AM, thor wrote:

> On Thursday 15 May 2003 12:26 am, Jeremy Green wrote:
>> So, even when it is behaving normally and playing fine it is using 82
>> megs of ram. It seems like there must be a memory leak somewhere that
>> is making it hog up all the memory until it starts thrashing and dies.
>>
>> It never happens in the middle of a song. Only when starting a new
>> song.
>>
>> Here's the whole backtrace:
>>
>
> This looks very much like a Redhat 8.x problem. As far as I
> understand what
> you're experiencing, you have a RH 8.x OS which is complaining about
> memory
> loss. This is probably a threads vs. Redhat 8.x exception. The pthread
> library (which is the core of the Qt library) is only a few
> ***years*** old.
>
> Redhat blows serious fu*kin* chunks.
>
> They are the worst distribution to have ever come down the Linux pipe.
> Mythmusic assumes that threads work correctly. Try going to 9.0. If
> that
> doesn't clean things up, think about going to a distribution that
> understands
> interface-level dependencies. If you can't do that, write a letter to
> the
> fuckers that got $65 dollars from you last purchase of GPL code.
>
> - thor
>
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
RE: MythMusic problems [ In reply to ]
Actually, I thought RH 9 was the one with the wonky threads (backported from
the 2.5 development kernel).

I run RH 8 with no problems, though I did upgrade my Qt to 3.1.2. I'm also
not running a RedHat kernel, but a vanilla 2.4.20 from kernel.org.

-JAC

> -----Original Message-----
> From: mythtv-users-bounces@snowman.net
> [mailto:mythtv-users-bounces@snowman.net]On Behalf Of thor
> Sent: Thursday, May 15, 2003 5:24 AM
> To: Discussion about mythtv
> Subject: Re: [mythtv-users] MythMusic problems
>
>
> This looks very much like a Redhat 8.x problem. As far as I
> understand what
> you're experiencing, you have a RH 8.x OS which is complaining
> about memory
> loss. This is probably a threads vs. Redhat 8.x exception. The pthread
> library (which is the core of the Qt library) is only a few
> ***years*** old.
Re: MythMusic problems [ In reply to ]
It seems to happen randomly. I'll try to do some more research. I'm
heading out of town for a week so it might just have to be on hold
until I get back...

Thanks,

-Jeremy


> So much for my RH ranting.
>
> Brief inspection of the backtrace suggets a problem with the Mad
> libraries.
>
> Does your problem occur no matter that you're playing, or is only
> crapping
> out on certain mp3's?
>
> - thor
>
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: MythMusic problems [ In reply to ]
On Thursday 15 May 2003 10:11 am, Jeremy Green wrote:
> Except I've got Debian Unstable...
> I have qt 3.1.1-7 (the debian package)
> Any other ideas?
>

So much for my RH ranting.

Brief inspection of the backtrace suggets a problem with the Mad libraries.

Does your problem occur no matter that you're playing, or is only crapping
out on certain mp3's?

- thor
Re: MythMusic problems [ In reply to ]
On Thursday 15 May 2003 12:00 pm, Jeremy Green wrote:
> It seems to happen randomly. I'll try to do some more research. I'm
> heading out of town for a week so it might just have to be on hold
> until I get back...

When you get back and have a chance, try some oggs. Just curiousity on my
part ... wondering if it's a MAD/mp3 thing or something more fundamental.

- thor