Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-06-29 Thread Lennart Poettering
On Wed, 24.06.09 14:18, Brian J. Murrell (br...@interlinx.bc.ca) wrote:

 On Sun, 2009-06-07 at 01:32 +0200, Lennart Poettering wrote:
  
  Hmm, could you try to play around with oprofile a bit to find out
  where exactly PA starts to spin?
  
  http://pulseaudio.org/wiki/HowToUseOProfile
 
 I tried this.  I had to use the --no-vmlinux option:
 
 $ sudo opcontrol --no-vmlinux
 
 Then I did:
 
 $ sudo opcontrol --start
 
 and then resumed my audio application.  Unfortunately it did not put PA
 into a loop, so I paused my audio app and did:
 
 $ sudo opcontrol --stop
 
 and then
 
 $ sudo opcontrol --start
 
 and then resumed my app.  Still no CPU eating loop.  I had to repeat the
 above a few times before PA would again chew the CPU.
 
 So I let PA and my audio app run for a while chewing the CPU, however:
 
 $ sudo opreport -l /usr/bin/pulseaudio
 
 only produces:
 
 opreport error: basic_string::erase

Looks like a bug in your distribution's packages. Please file a bug in
your distro's bug tracker and ask them to fix this.

Lennart

-- 
Lennart PoetteringRed Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/   GnuPG 0x1A015CC4
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-06-25 Thread Brian J. Murrell
On Wed, 2009-06-24 at 14:18 -0400, Brian J. Murrell wrote:
 
 opreport error: basic_string::erase

So, this appears to be an oprofile 0.9.3 bug.  I have rolled up an
0.9.4 .deb here and installed it and get much better results.  Although,
I'm not sure how useful they are:

$ sudo opreport -l /usr/bin/pulseaudio 
warning: [vdso] (tgid:8298 range:0xb7f37000-0xb7f38000) could not be found.
CPU: AMD64 processors, speed 2104.34 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask 
of 0x00 (No unit mask) count 10
samples  %image name   symbol name
33519100.000  [vdso] (tgid:8298 range:0xb7f37000-0xb7f38000) [vdso] 
(tgid:8298 range:0xb7f37000-0xb7f38000)

b.



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-06-24 Thread Brian J. Murrell
My apologies for responding so tardily here.  I somehow missed this
response from Lennart.

On Sun, 2009-06-07 at 01:32 +0200, Lennart Poettering wrote:
 
 Hmm, something causes PA to enter a spinning loop here.

Indeed.

 This is not accessible anymore as it seems.

Hrm.  I just tried it and it seems to work from here.

 Hmm, could you try to play around with oprofile a bit to find out
 where exactly PA starts to spin?
 
 http://pulseaudio.org/wiki/HowToUseOProfile
 
 It would be good if you could get me the oprofile output from the time
 where PA spins the loop only. i.e. instead of enabling oprofile right
 away, just enable it after pa started spinning. Then let it spin for a
 while and disable oprofile again. Then get me that oprofile data. Can
 you do that?

Sure can.

 Is the kernel you are using patched with all the recent ALSA timing
 patches that went into the fedora kernel?

I'm not sure TBH.  I use the Ubuntu 2.6.27-12-generic (Intrepid) kernel
on Jaunty.  I'd love to use the Jaunty kernel but it's broken.  I have
been considering upping to the Karmic kernel though for a plethora of
reasons.

 It would be good to verify
 that before anyone spends time on tracking down bugs that have already
 been fixed on the distro where all the actual development happens on.

Where/how do I find these timing patches that went into the Fedora
kernel, so that I can see if they have been applied to the Ubuntu
kernels?

b.



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-06-24 Thread Colin Guthrie

'Twas brillig, and Brian J. Murrell at 24/06/09 14:17 did gyre and gimble:

Where/how do I find these timing patches that went into the Fedora
kernel, so that I can see if they have been applied to the Ubuntu
kernels?


http://cvs.fedoraproject.org/viewvc/rpms/kernel/devel/

Although most of the patches should be wrapped up in .30 now IIRC, so 
you'll need to look at the history.


Col


--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-06-24 Thread Colin Guthrie

'Twas brillig, and Colin Guthrie at 24/06/09 16:57 did gyre and gimble:

'Twas brillig, and Brian J. Murrell at 24/06/09 14:17 did gyre and gimble:

Where/how do I find these timing patches that went into the Fedora
kernel, so that I can see if they have been applied to the Ubuntu
kernels?


http://cvs.fedoraproject.org/viewvc/rpms/kernel/devel/

Although most of the patches should be wrapped up in .30 now IIRC, so 
you'll need to look at the history.


Actually:

http://cvs.fedoraproject.org/viewvc/rpms/kernel/F-11/

This is probably a better link :)

Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-06-24 Thread Brian J. Murrell
On Wed, 2009-06-24 at 16:58 +0100, Colin Guthrie wrote:
 
  Although most of the patches should be wrapped up in .30 now IIRC, so 
  you'll need to look at the history.

So is that to say that if I use a .30 (say, 2.6.30 final) that I should
have all of the patches that Lennart was referring to?

 Actually:
 
 http://cvs.fedoraproject.org/viewvc/rpms/kernel/F-11/
 
 This is probably a better link :)

I see:

alsa-dont-reset-stream-at-each-prepare-callb.patch
alsa-hda-add-debugging.patch  1.1
alsa-hda-dont-reset-BDL-unnecessarily.patch
alsa-hda_intel-fix-unexpected-ring-buffer-positio.patch
alsa-pcm-always-reset-invalid-position.patch
alsa-pcm-fix-delta-calc-at-overlap.patch
alsa-pcm-midlevel-add-more-strict-buffer-position.patch
alsa-rewrite-hw_ptr-updaters.patch

I'm assuming all of the alsa patches would be prefixed by alsa-.

Any idea if any or all of these are in the kernel.org 2.6.30 final?

b.



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-06-24 Thread Brian J. Murrell
On Sun, 2009-06-07 at 01:32 +0200, Lennart Poettering wrote:
 
 Hmm, could you try to play around with oprofile a bit to find out
 where exactly PA starts to spin?
 
 http://pulseaudio.org/wiki/HowToUseOProfile

I tried this.  I had to use the --no-vmlinux option:

$ sudo opcontrol --no-vmlinux

Then I did:

$ sudo opcontrol --start

and then resumed my audio application.  Unfortunately it did not put PA
into a loop, so I paused my audio app and did:

$ sudo opcontrol --stop

and then

$ sudo opcontrol --start

and then resumed my app.  Still no CPU eating loop.  I had to repeat the
above a few times before PA would again chew the CPU.

So I let PA and my audio app run for a while chewing the CPU, however:

$ sudo opreport -l /usr/bin/pulseaudio

only produces:

opreport error: basic_string::erase

I must have gone wrong somewhere.  Any ideas?

b.



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-06-06 Thread Lennart Poettering
On Thu, 28.05.09 14:40, Brian J. Murrell (br...@interlinx.bc.ca) wrote:

 On Wed, 2009-05-27 at 21:31 +0200, Lennart Poettering wrote:
  
  Hmm, please try to reproduce this harder. The load limiter only becomes
  active when the load produced by PA is very high for a longer time. 
  
 
 As I write this, PA is consuming an entire core:
 
 Cpu0  : 14.9%us,  3.7%sy,  7.4%ni, 70.9%id,  3.0%wa,  0.0%hi,  0.1%si,  0.0%st
 Cpu1  : 22.2%us,  5.3%sy,  4.5%ni, 55.0%id, 10.8%wa,  0.8%hi,  1.4%si,  0.0%st
 Mem:   2851296k total,  2821896k used,29400k free,   169276k buffers
 Swap:  3145720k total,   782712k used,  2363008k free,   712272k cached
 
   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND  
   
 14311 brian  9 -11  174m 6280 4732 S   99  0.2  13:55.23
 pulseaudio 

Hmm, something causes PA to enter a spinning loop here.

  Hmm, so you seem to be using the tunnel stuff a lot. I am pretty sure
  this is related to the tunnel stuff since we already had other reports
  about that.
  
  Could you please disable this and reproduce?
 
 Done.  pacmd ls is at http://brian.interlinx.bc.ca/pacmd_ls2.txt if you
 want to inspect.

This is not accessible anymore as it seems.

 
 I've left it here at 100% of a core in case you want me to do any
 further inspection.

Hmm, could you try to play around with oprofile a bit to find out
where exactly PA starts to spin?

http://pulseaudio.org/wiki/HowToUseOProfile

It would be good if you could get me the oprofile output from the time
where PA spins the loop only. i.e. instead of enabling oprofile right
away, just enable it after pa started spinning. Then let it spin for a
while and disable oprofile again. Then get me that oprofile data. Can
you do that?

Is the kernel you are using patched with all the recent ALSA timing
patches that went into the fedora kernel? It would be good to verify
that before anyone spends time on tracking down bugs that have already
been fixed on the distro where all the actual development happens on.

Lennart

-- 
Lennart PoetteringRed Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/   GnuPG 0x1A015CC4
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-06-03 Thread Brian J. Murrell
Some further information...

When I have started an audio stream that has caused PA's CPU usage to
shoot up, here is what PA is saying while it's CPU hogging, and just
prior to my pausing the stream again to alleviate the CPU usage:


...
D: alsa-sink.c: Requested volume: 0:  63% 1:  63%
D: alsa-sink.c: Got hardware volume: 0:  65% 1:  65%
D: alsa-sink.c: Calculated software volume: 0:  98% 1:  98%
D: alsa-sink.c: Requested to rewind 14336 bytes.
D: alsa-sink.c: Limited to 10800 bytes.
D: alsa-sink.c: before: 2700
D: alsa-sink.c: after: 0
I: alsa-sink.c: Tried rewind, but was apparently not possible.
D: module-suspend-on-idle.c: Sink alsa_output.pci_10de_26c_sound_card_0 becomes 
idle.
D: core.c: Hmm, no streams around, trying to vacuum.
I: sink-input.c: Freeing input 230 audiotest wave
I: client.c: Freed 240 Rhythmbox
I: protocol-native.c: Connection died.
D: module-rtp-recv.c: Checking for dead streams ...

And here is where the CPU usage of it drops again, after the stream has
been paused:

I: module-suspend-on-idle.c: Sink alsa_output.pci_10de_26c_sound_card_0 idle 
for too long, suspending ...
I: alsa-sink.c: Device suspended...

Any further help?

b.



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-06-01 Thread Brian J. Murrell
On Sat, 2009-05-30 at 19:12 -0400, Brian J. Murrell wrote:
 
 Was any of this helpful?  Given that I have disabled tunnelling and the
 problem still reproduces, it must be something other than tunnelling,
 yes?  Any other ideas?  What can I do to help track it down?

I've also discovered that once a PA is in cpu-hogging mode (i.e. after
resuming an app., like rhythmbox), simply pausing whatever is driving it
(i.e. rhythmbox) and waiting for PA to settle down then resuming (i.e.
rhythmbox again) and PA will be again operating normally.

Maybe this helps trigger an idea/thought.

b.



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-05-30 Thread Brian J. Murrell
On Thu, 2009-05-28 at 14:40 -0400, Brian J. Murrell wrote:
 
 Done.  pacmd ls is at http://brian.interlinx.bc.ca/pacmd_ls2.txt if you
 want to inspect.
 
 I've left it here at 100% of a core in case you want me to do any
 further inspection.
 
 Currently pulseaudio is reporting a fair number of:
 
 D: protocol-native.c: Requesting rewind due to end of underrun.
 D: protocol-native.c: Underrun on ''...'', 0 bytes in queue.

Was any of this helpful?  Given that I have disabled tunnelling and the
problem still reproduces, it must be something other than tunnelling,
yes?  Any other ideas?  What can I do to help track it down?

b.



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-05-28 Thread Colin Guthrie

'Twas brillig, and Lennart Poettering at 27/05/09 21:51 did gyre and gimble:

On Wed, 27.05.09 15:51, Brian J. Murrell (br...@interlinx.bc.ca) wrote:


Hmm, so you seem to be using the tunnel stuff a lot.

If you mean making the server available to the network, yeah.  Just for
the ease of moving a stream from one machine to another.


I am pretty sure
this is related to the tunnel stuff since we already had other reports
about that.

Could you please disable this and reproduce?

How exactly should I do that?


Make sure ou don't enable the tunnel or zeroconf modules.


Chances are if you don't know how to disable it, you just want to fire 
up paprefs and untick the handy box. :p


--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-05-28 Thread Brian J. Murrell
On Wed, 2009-05-27 at 21:31 +0200, Lennart Poettering wrote:
 
 Hmm, please try to reproduce this harder. The load limiter only becomes
 active when the load produced by PA is very high for a longer time. 
 

As I write this, PA is consuming an entire core:

Cpu0  : 14.9%us,  3.7%sy,  7.4%ni, 70.9%id,  3.0%wa,  0.0%hi,  0.1%si,  0.0%st
Cpu1  : 22.2%us,  5.3%sy,  4.5%ni, 55.0%id, 10.8%wa,  0.8%hi,  1.4%si,  0.0%st
Mem:   2851296k total,  2821896k used,29400k free,   169276k buffers
Swap:  3145720k total,   782712k used,  2363008k free,   712272k cached

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
14311 brian  9 -11  174m 6280 4732 S   99  0.2  13:55.23 pulseaudio 

 Hmm, so you seem to be using the tunnel stuff a lot. I am pretty sure
 this is related to the tunnel stuff since we already had other reports
 about that.
 
 Could you please disable this and reproduce?

Done.  pacmd ls is at http://brian.interlinx.bc.ca/pacmd_ls2.txt if you
want to inspect.

I've left it here at 100% of a core in case you want me to do any
further inspection.

Currently pulseaudio is reporting a fair number of:

D: protocol-native.c: Requesting rewind due to end of underrun.
D: protocol-native.c: Underrun on ''...'', 0 bytes in queue.

b.



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-05-28 Thread Brian J. Murrell
As an additional data point...

Another long pause of rhythmbox (i.e. I got up and left the room and
came back an hour later) followed by a resume while PA was in this CPU
consumption and PA is now, no longer consuming gobs of CPU.

I didn't happen to notice how long after the pause that PA stopped
consuming so much CPU, or if in fact it did stopped when I paused RB, or
only when I resumed it again.  I only just happen to notice it was no
longer hogging after I had resumed RB again and went to see what the
result was looking like.

b.



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-05-27 Thread Brian J. Murrell
On Wed, 2009-05-27 at 01:10 +0200, Lennart Poettering wrote:
 Could you please to the following:
 
 1) Add a system load monitor applet to your panel, so that you can monitor if
 your CPU is idle or not.
 
 2) Terminate PA in a terminal:
 
 $ pulseaudio -k
 
 3) In the same terminal start PA with debbuging output on and the load 
 limiter off:
 
 $ pulseaudio -v -no-cpu-limit
 
 4) Try to reproduce the issue, watch the load monitor applet. Does CPU
 load go up to 100% for longer time? if so, please open another
 terminal, type pacmd ls and paste the output somwhere.

OK.  Reproduced this with no cpu limiting.  The one thing I noticed is
that the pulseaudio - output is very copiously:

I: memblock.c: Pool full
I: memblock.c: Pool full
I: memblock.c: Pool full
I: memblock.c: Pool full
I: memblock.c: Pool full
I: memblock.c: Pool full

The pacmd ls output is at http://brian.interlinx.bc.ca/pacmd_ls.txt

 Is this an USB audio device?

No.

  Driver?

snd_hda_intel

 Could you please dump the start
 of the PA log output somewhere (i.e. the part that shows the
 initialization phase)?

Sure.  http://brian.interlinx.bc.ca/pulseaudio_start.txt

 Which PA evrsion is this?

0.9.15-1ubuntu2~ppa1

b.



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-05-27 Thread Lennart Poettering
On Wed, 27.05.09 14:33, Brian J. Murrell (br...@interlinx.bc.ca) wrote:

 On Wed, 2009-05-27 at 01:10 +0200, Lennart Poettering wrote:
  Could you please to the following:
  
  1) Add a system load monitor applet to your panel, so that you can monitor 
  if
  your CPU is idle or not.
  
  2) Terminate PA in a terminal:
  
  $ pulseaudio -k
  
  3) In the same terminal start PA with debbuging output on and the load 
  limiter off:
  
  $ pulseaudio -v -no-cpu-limit
  
  4) Try to reproduce the issue, watch the load monitor applet. Does CPU
  load go up to 100% for longer time? if so, please open another
  terminal, type pacmd ls and paste the output somwhere.
 
 OK.  Reproduced this with no cpu limiting.  The one thing I noticed is
 that the pulseaudio - output is very copiously:

Hmm, please try to reproduce this harder. The load limiter only becomes
active when the load produced by PA is very high for a longer time. 

 Sure.  http://brian.interlinx.bc.ca/pulseaudio_start.txt

Hmm, so you seem to be using the tunnel stuff a lot. I am pretty sure
this is related to the tunnel stuff since we already had other reports
about that.

Could you please disable this and reproduce?

  Which PA evrsion is this?
 
 0.9.15-1ubuntu2~ppa1

Have the Ubuntu kernel guys fixed all the
snd_pcm_delay()/snd_pcm_avail() issues in the HDA driver? i.e. stole
those pacthes from the F11 kernel? If not, please make sure they
integrate them. Without those patches cpu load issues are very likely.

Lennart

-- 
Lennart PoetteringRed Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/   GnuPG 0x1A015CC4
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] exiting on resume of rhythmbox

2009-05-27 Thread Lennart Poettering
On Wed, 27.05.09 15:51, Brian J. Murrell (br...@interlinx.bc.ca) wrote:

  Hmm, so you seem to be using the tunnel stuff a lot.
 
 If you mean making the server available to the network, yeah.  Just for
 the ease of moving a stream from one machine to another.
 
  I am pretty sure
  this is related to the tunnel stuff since we already had other reports
  about that.
  
  Could you please disable this and reproduce?
 
 How exactly should I do that?

Make sure ou don't enable the tunnel or zeroconf modules.


Lennart

-- 
Lennart PoetteringRed Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/   GnuPG 0x1A015CC4
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss