Bug 480956 - RFE: patch to limit PA logging rate to prevent it from eating my HDD again
Summary: RFE: patch to limit PA logging rate to prevent it from eating my HDD again
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: pulseaudio
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-21 15:08 UTC by Muayyad Alsadi
Modified: 2009-01-23 23:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-23 23:12:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to limit logs -p1 (2.24 KB, patch)
2009-01-21 15:08 UTC, Muayyad Alsadi
no flags Details | Diff

Description Muayyad Alsadi 2009-01-21 15:08:00 UTC
Created attachment 329612 [details]
patch to limit logs -p1

Description of problem:
hi,
as I reported here
https://www.redhat.com/archives/fedora-devel-list/2009-January/msg01167.html
pulseaudio eat 0.7GB from my disk space

the reason was an upstream patch called
Patch20: 0020-warn-if-ALSA-wakes-us-up-and-there-is-actually-nothi.patch

I made a patch the limit logging that specific message to 5 consecutive logs and then disable that message for an hour

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


Additional info:
this patch uses two global variables
please tell me if this is safe

Comment 1 Muayyad Alsadi 2009-01-22 14:37:01 UTC
I have tests my patch for two days and it works

...
Jan 22 13:56:30 localhost pulseaudio[3013]: module-alsa-sink.c: ALSA woke us up 
to write new data to the device, but there was actually nothing to write! Most l
ikely this is an ALSA driver bug. Please report this issue to the PulseAudio dev
elopers.
Jan 22 13:56:30 localhost pulseaudio[3013]: module-alsa-sink.c: ALSA woke us up 
to write new data to the device, but there was actually nothing to write! Most l
ikely this is an ALSA driver bug. Please report this issue to the PulseAudio dev
elopers.
Jan 22 13:56:30 localhost pulseaudio[3013]: module-alsa-sink.c: the next message
 will be prevented from being logged again for awhile
Jan 22 13:56:30 localhost pulseaudio[3013]: module-alsa-sink.c: ALSA woke us up 
to write new data to the device, but there was actually nothing to write! Most l
ikely this is an ALSA driver bug. Please report this issue to the PulseAudio dev
elopers.

notice the above line
Jan 22 13:56:30 localhost pulseaudio[3013]: module-alsa-sink.c: the next message
 will be prevented from being logged again for awhile

it allowed consecutive logs which can be noticed from time (tells the alsa developers about the problem) and it won't flood my logs

ls -lh /var/log/messages 
-rw-r--r-- 1 root root 214K 2009-01-22 15:56 /var/log/messages

Comment 2 Lennart Poettering 2009-01-23 23:12:56 UTC
A slightly better patch (thread-safe and stuff) has now been merged upstream.


Note You need to log in before you can comment on or make changes to this bug.