[Freeswitch-users] Stumped by mod_portaudio permissions issue
lmorley at neny.cslimits.net
Thu Sep 10 03:40:41 MSD 2015
As no on else has yet been able to offer anything in the way of guidance,
here's my $0.02.
If you're simply looking to understand what's going on, if you step back
and look at your earlier posts, and clear your mind, I think you'll start
hearing someone(s) whispering "race condition", "contention", et al. From a
metacognitive perspective I'm fairly certain that's what you're running
into. Personally, I'd take a look at the source for the modules in question
and see if you can't isolate critical sections of code and protect them
I would also stress the code - optimize it highly; build it optimized for
space, then for speed; load your system to the hilt so the OS starts to
swap; etc. And see what shakes out. Might even try running it under
Valgrind, or some other, similar tool.
On Sep 1, 2015 11:44 AM, "Mark Haun" <haunma at keteu.org> wrote:
> Anyone? I thought this might elicit some interest from the developers. Is
> no one using mod_portaudio anymore?
> Mark Haun [haunma at keteu.org] wrote:
> > I built freeswitch version 1.7.0+git~20150730T192909Z~ab7f83c654~32bit
> > my ARM-based home server (an NVIDIA Jetson board), with the intention of
> > using mod_portaudio with a wireless USB headset for my main home phone.
> > works well when running freeswitch directly as root, but when I
> > freeswitch to run at system startup, mod_portaudio could no longer find
> > audio devices.
> > No problem, I thought, it's a simple permissions issue. I am using the
> > example debian init script from the wiki (this is a Jessie install with
> > init rather than systemd). It runs freeswitch as user freeswitch, group
> > daemon using the -u and -g command-line options. So I added
> "freeswitch" to
> > the audio group, then used sudo to verify that I could play sound files
> > "aplay" as the freeswitch user. That worked, but it did not solve the
> > mod_portaudio failure.
> > Thinking there must be an issue with portaudio separate from ALSA, I
> > and built the "pa_devs" utility which enumerates and prints the available
> > audio devices. (This is basically what mod_portaudio is doing on
> > Running as the freeswitch user, that worked too. Hmmmm.
> > I tried running freeswitch from the command line using sudo rather than
> > -u and -g options, i.e.
> > $ sudo freeswitch /usr/local/freeswitch/bin/freeswitch -nc
> > and that worked as well! Then I started experimenting with -u and -g and
> > discovered that
> > $ /usr/local/freeswitch/bin/freeswitch -nc -u freeswitch
> > allows mod_portaudio to load correctly, whereas
> > $ /usr/local/freeswitch/bin/freeswitch -nc -u freeswitch -g daemon
> > causes mod_portaudio to fail.
> > Can anyone explain what's happening here? In both cases the process UID,
> > GID, EUID, EGID, FUID, and FGID are the same (freeswitch:daemon) as
> > displayed with "ps xao pid,uid,gid,euid,egid,fuid,fgid". Could this be a
> > bug in freeswitch? There are a couple of threads from 2-3 years ago in
> > archives, where mod_portaudio permissions issues were never resolved and
> > solution remained a mystery.
> > For the time being I guess this (not using -g) is a workaround, but I'd
> > like to understand what is going on.
> > Mark
> > _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org
> > http://www.freeswitchsolutions.com
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://confluence.freeswitch.org
> > http://www.cluecon.com
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> Official FreeSWITCH Sites
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users