<p dir="ltr">Mark,</p>
<p dir="ltr">As no on else has yet been able to offer anything in the way of guidance, here's my $0.02.</p>
<p dir="ltr">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 properly.</p>
<p dir="ltr">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.</p>
<p dir="ltr">Good luck,</p>
<p dir="ltr">Larry</p>
<div class="gmail_quote">On Sep 1, 2015 11:44 AM, "Mark Haun" <<a href="mailto:haunma@keteu.org">haunma@keteu.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Anyone? I thought this might elicit some interest from the developers. Is<br>
no one using mod_portaudio anymore?<br>
<br>
Mark<br>
<br>
Mark Haun [<a href="mailto:haunma@keteu.org">haunma@keteu.org</a>] wrote:<br>
> I built freeswitch version 1.7.0+git~20150730T192909Z~ab7f83c654~32bit for<br>
> my ARM-based home server (an NVIDIA Jetson board), with the intention of<br>
> using mod_portaudio with a wireless USB headset for my main home phone. It<br>
> works well when running freeswitch directly as root, but when I configured<br>
> freeswitch to run at system startup, mod_portaudio could no longer find any<br>
> audio devices.<br>
><br>
> No problem, I thought, it's a simple permissions issue. I am using the<br>
> example debian init script from the wiki (this is a Jessie install with SysV<br>
> init rather than systemd). It runs freeswitch as user freeswitch, group<br>
> daemon using the -u and -g command-line options. So I added "freeswitch" to<br>
> the audio group, then used sudo to verify that I could play sound files with<br>
> "aplay" as the freeswitch user. That worked, but it did not solve the<br>
> mod_portaudio failure.<br>
><br>
> Thinking there must be an issue with portaudio separate from ALSA, I fetched<br>
> and built the "pa_devs" utility which enumerates and prints the available<br>
> audio devices. (This is basically what mod_portaudio is doing on startup.)<br>
> Running as the freeswitch user, that worked too. Hmmmm.<br>
><br>
> I tried running freeswitch from the command line using sudo rather than the<br>
> -u and -g options, i.e.<br>
><br>
> $ sudo freeswitch /usr/local/freeswitch/bin/freeswitch -nc<br>
><br>
> and that worked as well! Then I started experimenting with -u and -g and<br>
> discovered that<br>
><br>
> $ /usr/local/freeswitch/bin/freeswitch -nc -u freeswitch<br>
><br>
> allows mod_portaudio to load correctly, whereas<br>
><br>
> $ /usr/local/freeswitch/bin/freeswitch -nc -u freeswitch -g daemon<br>
><br>
> causes mod_portaudio to fail.<br>
><br>
> Can anyone explain what's happening here? In both cases the process UID,<br>
> GID, EUID, EGID, FUID, and FGID are the same (freeswitch:daemon) as<br>
> displayed with "ps xao pid,uid,gid,euid,egid,fuid,fgid". Could this be a<br>
> bug in freeswitch? There are a couple of threads from 2-3 years ago in the<br>
> archives, where mod_portaudio permissions issues were never resolved and the<br>
> solution remained a mystery.<br>
><br>
> For the time being I guess this (not using -g) is a workaround, but I'd sure<br>
> like to understand what is going on.<br>
><br>
> Mark<br>
><br>
> _________________________________________________________________________<br>
> Professional FreeSWITCH Consulting Services:<br>
> <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
> <a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
> <a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
> <a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
><br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div>