Bug 444407 - Phonon audio notification leaks file descriptors
Summary: Phonon audio notification leaks file descriptors
Status: REPORTED
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-26 05:39 UTC by Jasem Mutlaq
Modified: 2022-02-18 15:15 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jasem Mutlaq 2021-10-26 05:39:50 UTC
This has been reported by numerous users of KStars. Audio notifications playing in KStars are leaking file descriptors, often leading to the App failure to save or generate any new files.

The only warning in the logs we get is this:

2020-09-27T02:15:20.064 CEST DEBG ][                       default] - WARNING: Phonon::createPath: Cannot connect  Phonon::MediaObject ( no objectName ) to  Phonon::AudioOutput ( no objectName ).


This was reported mostly on Raspberry PI buster, but also on Ubuntu 20.04. When on Plasma (KDE Neon), there is no issue in playing the sound or the leaky file descriptor. Is it possible that failure to play sounds does not clean up a file descriptor that was prepared to play the sound but then failed?
Comment 1 Jasem Mutlaq 2021-11-14 07:02:13 UTC
We keep getting more reports from users where KStars using Phonon notifications is breaking their system:

https://indilib.org/forum/ekos/10705-kstars-ekos-freezing-on-large-image-sequences-astroberry.html#77529

Is this some packaging issue? Phonon issue? upstream? downstream?
Comment 2 Harald Sitter 2021-11-15 06:49:53 UTC
Which phonon backend is installed/used?
Comment 3 Jasem Mutlaq 2021-11-15 06:55:27 UTC
Whatever phonon backend available for Raspberry PI OS (Buster), so I guess this: https://packages.debian.org/buster/phonon-backend-vlc

Running ldd /usr/bin/kstars yields this:

libphonon4qt5.so.4 => /usr/lib/arm-linux-gnueabihf/libphonon4qt5.so.4 (0xb2ca4000)

which points to this: libphonon4qt5.so.4.10.2
Comment 4 Harald Sitter 2021-11-15 07:37:58 UTC
Hm. I see the forum thread mentions gstreamer though. Perplexing.

The Warning you posted doesn't really say anything. Just that the media graph cannot be built (supposedly because the backend encountered some error).

Somewhat relatedly: is there a reason you don't use knotifications instead of phonon directly? Specifically knotifications would preferably build with libcanberra rather than phonon.
Comment 5 Jasem Mutlaq 2021-11-15 09:00:22 UTC
It could have been gstreamer, I'm not sure. We don't use phonon directly, this error is triggered by this: KNotification::event(name, message);

If the event had sound enabled (which is by default by many events), then we get the Phonon error and it starts leaking file descriptors. Eventually, the situation goes out of hand and KStars crashes due to this.
Comment 6 Harald Sitter 2021-11-15 09:20:36 UTC
You should talk to the distro then. On Linux in particular we expect knotifications to be built with canberra, not phonon.
Comment 7 Jens Scheidtmann 2021-11-24 19:34:36 UTC
Reported in Debian/Raspian as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000549
Comment 8 Jens Scheidtmann 2022-02-18 15:15:40 UTC
The respective Debian bug has been closed on Feb-11th, see above. So slowly this should trickle now through the different distributions (experimental -> testing -> stable)