[Alsaplayer-devel] Bad pause behavior, and thread counts...

Dominique Michel dominique.michel at citycable.ch
Thu Feb 15 13:54:09 GMT 2007


Le Thu, 15 Feb 2007 14:34:38 +0100,
Dominique Michel <dominique.michel at citycable.ch> a écrit :

> Le Wed, 14 Feb 2007 16:16:43 -0600,
> "Austin Bingham" <austin.bingham at gmail.com> a écrit :
> 
> > I've been using the svn head version for the past week or so, and I've
> > noticed a problem. If I pause for a long time (say an hour, but I
> > don't have hard numbers on this), when I unpause it, I get a wierd
> > "chattering" effect. It's as if the player is playing short
> > (sub-second) segments of the file with a short pause between each. I
> > can usually knock it out of this state by going to the next song in
> > the playlist, but it's weird. FWIW, I'm running the player in daemon
> > mode and communicating with it via a custom python interface using the
> > control.h methods.
> > 
> Which configure option do you use? Only --enable-debug or also
> --enable-maintainer-mode?
> 
> 
> > Also, in a mild attempt to look into this problem, I've been running
> > alsaplayer under gdb. I noticed that alsaplayer was using 38 threads!
> > What could it possibly be doing that would justify this? Maybe this is
> > the expected behavior, but it does seem a bit odd.
> >
> I don't know much about gdb usage. I just try to compile alsaplayer with
> --enable-debug and to run it under gdb.
> 
> In one console:
>  $ alsaplayer -i daemon
> In another one:
>  $ alsaplayer -e "01 - Sodade.mp3"
> 
> If I check with htop, I get only 3 threads.
> 
> And with gdb (for all 3 threads):
> 
>  Reading symbols
> from /usr/lib/alsaplayer/interface/libdaemon_interface.so...done. Loaded
> symbols for /usr/lib/alsaplayer/interface/libdaemon_interface.so 0xb7f73410
> in ?? ()
> 
> And the program stop. I run continue and it play again.
> At the end of the song:
> 
> [Thread -1231819872 (zombie) exited]
> 
> And gdm hang if I run continue. Nothing append either if I try to enqeue a
> new song. 
> 
> But if I enqueue a few song before the end of the first one, I get:
> 
> [Thread -1232360544 (zombie) exited]
> [New Thread -1232360544 (LWP 11868)]
> 
> And it is now four threads in htop. I get this with each new song, so each new
> song add a thread.
> 
> Dominique
> 
> > Anyhow, I'd be happy to look into either of these problems when I have
> > time, but some pointers on where to look would be helpful if anyone
> > has any idea what's going on.
> > 
> > Austin
> > 

I also found this:
http://lists.tartarus.org/pipermail/alsaplayer-devel/2004-March/001738.html

It seam to be a non well documented feature. If I run the following:
$ alsaplayer -s Test -i daemon

I get 3 threads.

$ alsaplayer -s Test -e "01 - Sodade.mp3"
and I get 2 more threads:
[New Thread -1231578208 (LWP 11936)]
[New Thread -1239970912 (LWP 11937)]

When a new song begin:
[Thread -1231578208 (zombie) exited]
[New Thread -1231578208 (LWP 11953)]

But it seam to work because I get only 5 threads in htop, and that even after a
few songs.

Dominique



More information about the alsaplayer-devel mailing list