Bug 470563 - konsole bell sound blows up memory usage of pipewire-pulse
Summary: konsole bell sound blows up memory usage of pipewire-pulse
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 22.12.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-02 19:11 UTC by dmattes
Modified: 2024-01-02 13:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-3882156-0.html (3.72 KB, text/html)
2023-06-03 08:12 UTC, tcanabrava
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dmattes 2023-06-02 19:11:15 UTC
SUMMARY

If konsole plays bell sounds in quick succession, the memory usage of the pipewire-pulse background process grows without limits. The memory usage does not go down over time. The pipewire-pulse process has to be restarted to reclaim the memory.

STEPS TO REPRODUCE

1. Open konsole.
2. Open the Settings -> Configure Notifications ... dialog. Select "Bell in focused session" from the list of events. Check "Play a sound" and select an existing sound file. Apply.
3. Press Ctrl+Esc to open the "System Activity" monitor - or any other too that is able to show the memory consumption of background processes.
4. In the console window, press and hold backspace key for a few seconds to generate a quick succession of bell sounds.
5. Watch how the memory consumption of pipewire-pulse behaves.

OBSERVED RESULT

The memory consumption grows to several hundred megabytes and stays high afterwards. When releasing the key, the memory consumption goes down a little bit but stays high. This behavior may also be caused by other applications that play sound. When I play audio using audacious or watching a video in firefox, the memory consumption of pipewire-pulse stays very low (a few megabytes). When I discovered the problem, pipewire-pulse permanently occupied over 600 MiB. After a reboot, the memory consumption was on the normal level of a few megabytes.

EXPECTED RESULT

I would expect that the memory consumption grows a bit while playing the possibly overlapping bell sounds and then
goes down to a few megabytes after the internal buffers have been freed.

SOFTWARE/OS VERSIONS
Linux kernel: 6.2.0-20-generic (64-bit)
KDE Plasma Version: 5.27.5 (backports on Kubuntu 23.04)
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.8
pipewire/pipewire-pulse Version: 0.3.65-3
libpulse0 Version: 1:16.1+dfsg1-2ubuntu3

ADDITIONAL INFORMATION

The bug may be anywhere between konsole and pipewire-pulse. I filed this bug under konsole because it can be reproduced in the konsole window and I couldn't identify other applications that let the memory consumption grow that much.
Comment 1 tcanabrava 2023-06-03 08:12:56 UTC
Created attachment 159428 [details]
attachment-3882156-0.html

This is a helpful bug report, thanks. I'll try to simulate here and talk
with the pipewire folks.

On Fri, Jun 2, 2023 at 9:11 PM <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=470563
>
>             Bug ID: 470563
>            Summary: konsole bell sound blows up memory usage of
>                     pipewire-pulse
>     Classification: Applications
>            Product: konsole
>            Version: 22.12.3
>           Platform: Kubuntu
>                 OS: Linux
>             Status: REPORTED
>           Severity: normal
>           Priority: NOR
>          Component: general
>           Assignee: konsole-devel@kde.org
>           Reporter: dmattes@gmx.de
>   Target Milestone: ---
>
> SUMMARY
>
> If konsole plays bell sounds in quick succession, the memory usage of the
> pipewire-pulse background process grows without limits. The memory usage
> does
> not go down over time. The pipewire-pulse process has to be restarted to
> reclaim the memory.
>
> STEPS TO REPRODUCE
>
> 1. Open konsole.
> 2. Open the Settings -> Configure Notifications ... dialog. Select "Bell in
> focused session" from the list of events. Check "Play a sound" and select
> an
> existing sound file. Apply.
> 3. Press Ctrl+Esc to open the "System Activity" monitor - or any other too
> that
> is able to show the memory consumption of background processes.
> 4. In the console window, press and hold backspace key for a few seconds to
> generate a quick succession of bell sounds.
> 5. Watch how the memory consumption of pipewire-pulse behaves.
>
> OBSERVED RESULT
>
> The memory consumption grows to several hundred megabytes and stays high
> afterwards. When releasing the key, the memory consumption goes down a
> little
> bit but stays high. This behavior may also be caused by other applications
> that
> play sound. When I play audio using audacious or watching a video in
> firefox,
> the memory consumption of pipewire-pulse stays very low (a few megabytes).
> When
> I discovered the problem, pipewire-pulse permanently occupied over 600 MiB.
> After a reboot, the memory consumption was on the normal level of a few
> megabytes.
>
> EXPECTED RESULT
>
> I would expect that the memory consumption grows a bit while playing the
> possibly overlapping bell sounds and then
> goes down to a few megabytes after the internal buffers have been freed.
>
> SOFTWARE/OS VERSIONS
> Linux kernel: 6.2.0-20-generic (64-bit)
> KDE Plasma Version: 5.27.5 (backports on Kubuntu 23.04)
> KDE Frameworks Version: 5.106.0
> Qt Version: 5.15.8
> pipewire/pipewire-pulse Version: 0.3.65-3
> libpulse0 Version: 1:16.1+dfsg1-2ubuntu3
>
> ADDITIONAL INFORMATION
>
> The bug may be anywhere between konsole and pipewire-pulse. I filed this
> bug
> under konsole because it can be reproduced in the konsole window and I
> couldn't
> identify other applications that let the memory consumption grow that much.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.