Bug 480304

Summary: Pulseaudio DoS (Filling disk + eating RAM)
Product: [Fedora] Fedora Reporter: D.S. Ljungmark <spider>
Component: pulseaudioAssignee: Lennart Poettering <lpoetter>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: afberendsen, lkundrak, lpoetter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-23 22:15:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description D.S. Ljungmark 2009-01-16 11:46:44 UTC
Description of problem:
After a client crash pulseaudio went into a loop and started to fill my disk with log messages while it uses full CPU.


Version-Release number of selected component (if applicable):
pulseaudio-0.9.13-6.fc10.i386
totem-2.24.3-1.fc10.i386


How reproducible:

	boot normally
	stat totem with an audio, note that pulseaudio takes 25% cpu, totem running visualization takes 10% cpu
	start projectM-pulseaudio, see it crash ( "Closed: WORKSFORME" according to Fedora bugzilla)
	Watch pulseaudio take 50% or more cpu and thrash your system to disk.


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 1797 root      20   0 34736 1648  856 S 48.2  0.1  11:22.82 rsyslogd           
 3714 spider     9 -11 1272m 825m 2440 S 47.5 65.4  11:46.83 pulseaudio         

[root@Weaver log]# ls -alh /var/log/messages
-rw------- 1 root root 582M 2009-01-16 12:39 /var/log/messages

[root@Weaver log]# tail -n 20 /var/log/messages
Jan 16 12:39:32 localhost pulseaudio[3714]: asyncq.c: q overrun, queuing locally
Jan 16 12:39:32 localhost pulseaudio[3714]: memblock.c: Pool full
Jan 16 12:39:32 localhost pulseaudio[3714]: asyncq.c: q overrun, queuing locally
Jan 16 12:39:32 localhost pulseaudio[3714]: memblock.c: Pool full
Jan 16 12:39:32 localhost pulseaudio[3714]: asyncq.c: q overrun, queuing locally
Jan 16 12:39:32 localhost pulseaudio[3714]: memblock.c: Pool full
Jan 16 12:39:32 localhost pulseaudio[3714]: asyncq.c: q overrun, queuing locally
Jan 16 12:39:32 localhost pulseaudio[3714]: memblock.c: Pool full
Jan 16 12:39:32 localhost pulseaudio[3714]: asyncq.c: q overrun, queuing locally
Jan 16 12:39:32 localhost pulseaudio[3714]: memblock.c: Pool full
Jan 16 12:39:32 localhost pulseaudio[3714]: asyncq.c: q overrun, queuing locally
Jan 16 12:39:32 localhost pulseaudio[3714]: memblock.c: Pool full
Jan 16 12:39:32 localhost pulseaudio[3714]: asyncq.c: q overrun, queuing locally
Jan 16 12:39:32 localhost pulseaudio[3714]: memblock.c: Pool full
Jan 16 12:39:32 localhost pulseaudio[3714]: asyncq.c: q overrun, queuing locally
Jan 16 12:39:32 localhost pulseaudio[3714]: memblock.c: Pool full
Jan 16 12:39:32 localhost pulseaudio[3714]: asyncq.c: q overrun, queuing locally
Jan 16 12:39:32 localhost pulseaudio[3714]: memblock.c: Pool full
Jan 16 12:39:32 localhost pulseaudio[3714]: asyncq.c: q overrun, queuing locally
Jan 16 12:39:32 localhost pulseaudio[3714]: memblock.c: Pool full


Solution:   Swear, Reboot computer? I dont know.  
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)

Comment 1 Andreas Berendsen 2009-03-02 07:25:50 UTC
Similar behaviour but using kernel 2.6.28.7. After awhile, sound doesn't work any more.

top - 20:24:03 up 26 min,  4 users,  load average: 8.92, 12.40, 9.32
Tasks: 323 total,   4 running, 318 sleeping,   0 stopped,   1 zombie
Cpu0  : 30.6%us, 16.8%sy,  1.6%ni, 32.6%id, 16.8%wa,  0.3%hi,  1.3%si,  0.0%st
Cpu1  : 14.1%us, 34.1%sy,  6.6%ni,  4.6%id, 38.0%wa,  0.3%hi,  2.3%si,  0.0%st
Mem:   8198564k total,  8153476k used,    45088k free,   135504k buffers
Swap: 20217840k total,    46720k used, 20171120k free,  4192028k cached

  PID P USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP CODE DATA nFLT nDRT WCHAN     COMMAND                                                            
 8950 1 andreas   20   0 2101m 1.1g  20m S 28.7 14.7   7:10.38 928m   36 1.5g   88    0 futex_wai java                                                               
 6015 1 andreas    9 -11  378m  11m 9364 S 14.8  0.1   1:32.55 366m   76  81m   24    0 -         pulseaudio                                                         
 8673 1 andreas   20   0 1373m 563m  26m S 13.9  7.0   4:34.01 810m   20 620m   96    0 sys_poll  VirtualBox

Comment 2 Lennart Poettering 2009-04-23 22:15:44 UTC
The version of PA in Rawhide should not generate these messages anymore and also rate limits the log output.

(That said, I believe that it is actually rsyslog's job to do rate limiting. Which I opened a bug about a while back)