[pulseaudio-discuss] module-null-sink broken with aplay on 0.9.13?

Nick Thompson rextanka at comcast.net
Wed Nov 19 13:49:15 PST 2008


Hiya,

On two different systems (arm and x86) I've seen an issue with module- 
null-sink.  When samples are streamed to a null sink using aplay, the  
cpu gets pinned.  From the arm system:

top - 04:01:05 up  1:14,  4 users,  load average: 1.42, 0.83, 0.60
Tasks:  82 total,   2 running,  80 sleeping,   0 stopped,   0 zombie
Cpu(s): 81.9%us, 18.1%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,   
0.0%si,  0.0%st
Mem:    252572k total,   245456k used,     7116k free,    10136k buffers
Swap:        0k total,        0k used,        0k free,   121888k cached

   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  1921 root      20   0 77468 1712 1480 R 90.1  0.7   0:57.44 aplay
  1895 root       9 -11  166m 4556 2976 S  1.0  1.8   0:02.67 pulseaudio
  1917 root      20   0  2440 1148  896 R  1.0  0.5   0:00.94 top
   110 root      15  -5     0    0    0 S  0.7  0.0   0:08.56  
omap2_mcspi
  1150 root     -97   0  126m 2880 2224 S  0.7  1.1   0:28.08 hidd
  1426 root      20   0 69216  21m 3916 S  0.7  8.7   0:52.38 java
     5 root      15  -5     0    0    0 S  0.3  0.0   0:05.82 events/0
  1209 root      20   0 14080 2148 1840 S  0.3  0.9   0:14.20 powerd
  1296 root      20   0 47612 1672 1256 S  0.3  0.7   0:01.64 extractfs
  1914 root      20   0  2588 1032  812 S  0.3  0.4   0:00.35 dropbear
     1 root      20   0  1892  964  688 S  0.0  0.4   0:00.42 upstart
     2 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd
     3 root      15  -5     0    0    0 S  0.0  0.0   0:00.01  
ksoftirqd/0
     4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0

I see similar on x86.

paplay barely shows up in top playing the same file, so it might seem  
something is hawked with the alsa interface.  Output from oprofile  
would also indicate something is up here:

CPU: ARM V7 PMNC, speed 0 MHz (estimated)
Counted CPU_CYCLES events (Number of CPU cycles) with a unit mask of  
0x00 (No unit mask) count 10000
  CPU_CYCLES:10000|
   samples|      %|
------------------
       444 81.3187 aplay
          CPU_CYCLES:10000|
           samples|      %|
         ------------------
               134 30.1802 libpulse.so.0.7.0
               103 23.1982 libasound.so.2.0.0
                84 18.9189 System.map-2.6.24-palm-joplin-3430
                61 13.7387 libpthread-2.5.so
                43  9.6847 libasound_module_pcm_pulse.so
                19  4.2793 libc-2.5.so

...

        12  2.1978 pulseaudio
	 CPU_CYCLES:10000|
	  samples|      %|
	------------------
	        3 25.0000 System.map-2.6.24-palm-joplin-3430
	        3 25.0000 libpulsecore.so.8.0.0
	        2 16.6667 libc-2.5.so
	        1  8.3333 libm-2.5.so
	        1  8.3333 libpthread-2.5.so
	        1  8.3333 librt-2.5.so
	        1  8.3333 libpstream.so

detail for aplay looks like this:

CPU: ARM V7 PMNC, speed 0 MHz (estimated)
Counted CPU_CYCLES events (Number of CPU cycles) with a unit mask of  
0x00 (No unit mask) count 10000
samples  %        image name               symbol name
61       13.7387  libpthread-2.5.so        (no symbols)
22        4.9550  libasound.so.2.0.05045  libpulse.so.0.7.0         
pa_stream_writable_size
19        4.2793  libc-2.5.so              (no symbols)
18        4.0541  libpulse.so.0.7.0        pa_thread_self
16        3.6036  libasound_module_pcm_pulse.so pulse_pointer
16        3.6036  libpulse.so.0.7.0        pa_thread_is_running
16        3.6036  libpulse.so.0.7.0        pa_threaded_mainloop_lock
15        3.3784  libasound.so.2.0.0       snd_pcm_ioplug_avail_update
13        2.9279  System.map-2.6.24-palm-joplin-3430 vector_swi
12        2.7027  libpulse.so.0.7.0        pa_mutex_lock
12        2.7027  libpulse.so.0.7.0        pa_threaded_mainloop_unlock
11        2.4775  libasound.so.2.0.0       snd_pcm_hwsync
11        2.4775  libpulse.so.0.7.0        pa_run_once
10        2.2523  libpulse.so.0.7.0        pa_context_get_state
9         2.0270  System.map-2.6.24-palm-joplin-3430 pipe_poll
9         2.0270  libasound.so.2.0.0       snd_pcm_ioplug_hw_ptr_update
8         1.8018  System.map-2.6.24-palm-joplin-3430 fget_light
8         1.8018  libasound_module_pcm_pulse.so pulse_pcm_poll_revents
8         1.8018  libasound_module_pcm_pulse.so update_ptr
7         1.5766  libasound.so.2.0.0       snd_pcm_bytes_to_frames
7         1.5766  libpulse.so.0.7.0        pa_once_begin
6         1.3514  System.map-2.6.24-palm-joplin-3430 fput
6         1.3514  libasound.so.2.0.0       .plt
6         1.3514  libasound.so.2.0.0       snd_pcm_wait
6         1.3514  libpulse.so.0.7.0        .plt
5         1.1261  System.map-2.6.24-palm-joplin-3430 poll_freewait
5         1.1261  System.map-2.6.24-palm-joplin-3430 sys_poll
5         1.1261  libasound_module_pcm_pulse.so pulse_check_connection
4         0.9009  libasound.so.2.0.0       snd_pcm_ioplug_hwsync
4         0.9009  libasound.so.2.0.0        
snd_pcm_poll_descriptors_count
4         0.9009  libasound.so.2.0.0        
snd_pcm_poll_descriptors_revents
4         0.9009  libasound_module_pcm_pulse.so check_active
3         0.6757  System.map-2.6.24-palm-joplin-3430 add_wait_queue
3         0.6757  System.map-2.6.24-palm-joplin-3430 remove_wait_queue
3         0.6757  System.map-2.6.24-palm-joplin-3430 ret_fast_syscall
3         0.6757  libasound.so.2.0.0       __udivsi3
3         0.6757  libasound.so.2.0.0       snd_pcm_avail_update
3         0.6757  libpulse.so.0.7.0        pa_tls_get
2         0.4505  System.map-2.6.24-palm-joplin-3430 fput_light
2         0.4505  libasound.so.2.0.0       snd1_pcm_write_areas
2         0.4505  libasound.so.2.0.0        
snd_pcm_ioplug_poll_descriptors_count
2         0.4505  libasound.so.2.0.0       snd_pcm_ioplug_poll_revents
2         0.4505  libasound.so.2.0.0       snd_pcm_poll_descriptors
2         0.4505  libasound_module_pcm_pulse.so .plt
2         0.4505  libpulse.so.0.7.0        pa_mutex_unlock
1         0.2252  System.map-2.6.24-palm-joplin-3430 __copy_to_user
1         0.2252  System.map-2.6.24-palm-joplin-3430 __do_softirq
1         0.2252  System.map-2.6.24-palm-joplin-3430 cpu_v7_switch_mm
1         0.2252  System.map-2.6.24-palm-joplin-3430 omap_32k_read
1         0.2252  System.map-2.6.24-palm-joplin-3430 schedule
1         0.2252  System.map-2.6.24-palm-joplin-3430 sys_sendto
1         0.2252  System.map-2.6.24-palm-joplin-3430 verify_iovec
1         0.2252  libasound.so.2.0.0        
snd_pcm_ioplug_poll_descriptors
1         0.2252  libpulse.so.0.7.0        __udivsi3

Let me know if more info would be useful.

Has anyone else seen issues with module-null-sink in 0.9.13?

Thanks!!

Nick





More information about the pulseaudio-discuss mailing list