Bug 480956 - RFE: patch to limit PA logging rate to prevent it from eating my HDD again
RFE: patch to limit PA logging rate to prevent it from eating my HDD again
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: pulseaudio (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-21 10:08 EST by Muayyad Alsadi
Modified: 2009-01-23 18:12 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-23 18:12:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Muayyad Alsadi 2009-01-21 10:08:00 EST
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 09:37:01 EST
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 18:12:56 EST
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.