Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 836646 - app-accessibility/espeak-ng-1.50-r3 fails with sandbox violation (C: /usr/libexec/gstreamer-1.0/gst-plugin-scanner -l /usr/bin/pulseaudio, P: /dev/dri/renderD128)
Summary: app-accessibility/espeak-ng-1.50-r3 fails with sandbox violation (C: /usr/lib...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-04-02 12:27 UTC by crabbed halo ablution
Modified: 2022-04-04 02:19 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
app-accessibility:espeak-ng-1.50-r3:20220402-062753.log (app-accessibility:espeak-ng-1.50-r3:20220402-062753.log,120.62 KB, text/plain)
2022-04-02 12:30 UTC, crabbed halo ablution
Details
app-accessibility:espeak-ng-1.50-r3:20220214-051527.log (app-accessibility:espeak-ng-1.50-r3:20220214-051527.log,181.25 KB, text/plain)
2022-04-02 12:32 UTC, crabbed halo ablution
Details
emerge --info app-accessibility/espeak-ng (emerge-info.log,8.54 KB, text/plain)
2022-04-02 12:36 UTC, crabbed halo ablution
Details
strace of sandbox violation (espeak-ng-strace.log.lzma,84.92 KB, application/octet-stream)
2022-04-03 05:57 UTC, crabbed halo ablution
Details

Note You need to log in before you can comment on or make changes to this bug.
Description crabbed halo ablution 2022-04-02 12:27:28 UTC
ebuild fails trying to access /dev/dri/renderD128 and /dev/dri/card0 with open_wr



Reproducible: Always

Actual Results:  
F: open_wr
S: deny
P: /dev/dri/renderD128
A: /dev/dri/renderD128
R: /dev/dri/renderD128
C: /usr/libexec/gstreamer-1.0/gst-plugin-scanner -l /usr/bin/pulseaudio 

F: open_wr
S: deny
P: /dev/dri/card0
A: /dev/dri/card0
R: /dev/dri/card0
C: /usr/libexec/gstreamer-1.0/gst-plugin-scanner -l /usr/bin/pulseaudio 



I haven't dug deep into the ebuild, but my logs tell me that I've successfully emerged this package before on 20220214, so maybe this has to do with the new gstreamer related ebuilds I've been seeing over the last few weeks? I'll attach the logs for both the successful and failing builds.
Comment 1 crabbed halo ablution 2022-04-02 12:30:18 UTC
Created attachment 768505 [details]
app-accessibility:espeak-ng-1.50-r3:20220402-062753.log

NEW FAILING BUILD LOG
Comment 2 crabbed halo ablution 2022-04-02 12:32:59 UTC
Created attachment 768506 [details]
app-accessibility:espeak-ng-1.50-r3:20220214-051527.log

OLD SUCCESSFUL BUILD LOG
Comment 3 crabbed halo ablution 2022-04-02 12:36:14 UTC
Created attachment 768507 [details]
emerge --info app-accessibility/espeak-ng
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-02 23:28:01 UTC
What verssion of gst?
Comment 5 crabbed halo ablution 2022-04-03 04:45:59 UTC
(In reply to Sam James from comment #4)
> What verssion of gst?

Version 1.20.1
Comment 6 crabbed halo ablution 2022-04-03 05:57:50 UTC
Created attachment 768545 [details]
strace of sandbox violation

strace log resulting from the command, lzma-compressed:
MAKEOPTS=-j1 strace ebuild /var/db/repos/gentoo/app-accessibility/espeak-ng/espeak-ng-1.50-r3.ebuild clean compile 2> /tmp/espeak-ng-strace.log
Comment 7 Igor V. Kovalenko 2022-04-03 06:17:42 UTC
Looks like compiled espeak-ng binary is invoked with pulseaudio autospawn enabled while pulseaudio is not accessible by client library (e.g. not running or not listening.) *and* pulsaudio is built with USE gstreamer.

Workaround is to set PULSE_SERVER="" before launching compiled espeak-ng binary, which would effectively disable autospawning function.
Comment 8 crabbed halo ablution 2022-04-03 07:13:53 UTC
(In reply to Igor V. Kovalenko from comment #7)
> Looks like compiled espeak-ng binary is invoked with pulseaudio autospawn
> enabled while pulseaudio is not accessible by client library (e.g. not
> running or not listening.) *and* pulsaudio is built with USE gstreamer.
> 
> Workaround is to set PULSE_SERVER="" before launching compiled espeak-ng
> binary, which would effectively disable autospawning function.

This is exactly the case.

Between the successful and unsuccessful compilations, I had changed to pipewire, but only half-assed. I neglected to edit /etc/pulse/{daemon,client}.conf to disable autospawn because I figured I would just uninstall pulseaudio. That proved to be impossible while maintaining pulseaudio support through pipewire so I dropped the ball on the .conf changes.

I have submitted https://github.com/gentoo/gentoo/pull/24878 with the above proposed fix.

i-garrison and sam_ from IRC did most of the work with finding the root cause of the bug.
Comment 9 Larry the Git Cow gentoo-dev 2022-04-04 02:19:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cccecafab917464137d22cec82e7458d6f5c277e

commit cccecafab917464137d22cec82e7458d6f5c277e
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-04-04 02:17:05 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-04-04 02:18:44 +0000

    app-accessibility/espeak-ng: add fix for pulseaudio access violation
    
    Closes: https://bugs.gentoo.org/836646
    Closes: https://github.com/gentoo/gentoo/pull/24878
    
    Signed-off-by: Peter Alfredsen <crabbedhaloablution@icloud.com>
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 app-accessibility/espeak-ng/espeak-ng-1.50-r3.ebuild | 3 +++
 app-accessibility/espeak-ng/espeak-ng-1.51.ebuild    | 4 ++++
 app-accessibility/espeak-ng/espeak-ng-9999.ebuild    | 4 ++++
 3 files changed, 11 insertions(+)