Bug 62988 - on MacOSX: shm_unlink failed: Permission denied
Summary: on MacOSX: shm_unlink failed: Permission denied
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other Mac OS X (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
Depends on:
Reported: 2013-04-01 10:59 UTC by Albert Zeyer
Modified: 2013-04-10 11:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

patch (926 bytes, patch)
2013-04-02 10:14 UTC, Albert Zeyer
Details | Splinter Review
Alternative patch (1.34 KB, patch)
2013-04-09 08:34 UTC, Tanu Kaskinen
Details | Splinter Review

Description Albert Zeyer 2013-04-01 10:59:41 UTC
On MacOSX, after some time and after playing some audio, I get this error:

E: [] shm.c:  shm_unlink(/pulse-shm-3622699848) failed: Permission denied

And PulseAudio quits after that. Otherwise (before that), it works fine.
Comment 1 Albert Zeyer 2013-04-02 09:46:28 UTC
In shm.c, you use shm_open with mode & 0444. I guess that is the problem. Why are you doing that? If I change it to mode & 0777, this error does not occur anymore.

The quit caused this error, not the other way around (as I thought). The quit is because of:

I: [] core.c: We are idle, quitting...
I: [] main.c: Daemon shutdown initiated.

So nothing wrong with the quit (I guess).
Comment 2 Albert Zeyer 2013-04-02 10:14:45 UTC
Created attachment 77309 [details] [review]
Comment 3 Tanu Kaskinen 2013-04-09 08:14:37 UTC
The(In reply to comment #1)
> In shm.c, you use shm_open with mode & 0444. I guess that is the problem.
> Why are you doing that?

No idea. Seems silly. The only caller for pa_shm_create_rw() uses mode 0700.

I'll make a slightly different patch: instead of using "mode & 0777", I'll remove the and operator altogether and add an assertion that checks that the mode is valid.
Comment 4 Tanu Kaskinen 2013-04-09 08:34:02 UTC
Created attachment 77654 [details] [review]
Alternative patch

The attached patch has also been sent to the mailing list: http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/16566
Comment 5 Tanu Kaskinen 2013-04-10 11:34:36 UTC
Fixed in the "master" and "next" branches: http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=d646d931dc52e21266687cc748961fe2323f4467

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.