<div><div>I&#39;ve found the problem. one js thread wait in socket.read (mod_spidermonkey_socket) on data.&nbsp;</div><div>That caller have hangup, which means that the garbage collector waits on it to close.<br></div><div><br>
</div><div>All new javascript sessions waits in&nbsp;JS_AWAIT_GC_DONE for the garbage collector to be done before proceeding (which means that all new javascript calls don&#39;t do anything after being launched).</div><div><br>
</div><div>My server will not send anything until an agent gets free or the session hangs up (detects it through the event socket). And the event socket will not send that the session has been hangup until the socket have received anything (and the script can exit). So it&#39;s kind of deadlock between my server and the spidermonkey_socket.&nbsp;</div>
<div><br></div><div>Is it possible to add an option to socket.read to make it abort if the session have been closed? I know that I wrote mod_spidermonkey_socket from the start, but I can&#39;t figure out how to do it.</div>
<div><br></div><div>Will new sessions always wait on old ones to be garbage collected properly? For instance, what happens if a script have a lenghty post process after caller have hang up?&nbsp;</div><div><br></div><div class="gmail_quote">
On Fri, Jan 16, 2009 at 9:38 AM, Jonas Gauffin <span dir="ltr">&lt;<a href="mailto:jonas.gauffin@gmail.com">jonas.gauffin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I&#39;ve got a loop, but the first thing checked in each iteration is if session.ready() returns false (and in that case exit the loop).<div><br></div><div>I do create sessions in the script: create, try to originate to a destination and then finally bridge together the caller and the new session.</div>

<div><br></div><div>I&#39;ll try to give you more details during the day.</div><div><div></div><div class="Wj3C7c"><div><br><div class="gmail_quote">On Fri, Jan 16, 2009 at 12:48 AM, Anthony Minessale <span dir="ltr">&lt;<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">do you have any loops in your code that might not check for session.ready() in a exit when its not true.<br><br>The symptoms you posted would be consistent with held readlocks so if you got a gcore (or windows equiv) of the process you might be able to see what threads where doing what to hang on to the read lock.<br>


<br>also are you creating sessions in the script then executing app with them, beware of this because the thread of the script is used to execute apps on a session created that way and not the session thread.<br><br><br>

<br>
<br><div class="gmail_quote"><div><div></div><div>On Thu, Jan 15, 2009 at 5:20 AM, Jonas Gauffin <span dir="ltr">&lt;<a href="mailto:jonas.gauffin@gmail.com" target="_blank">jonas.gauffin@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div><div></div><div>
Hello<div><br></div><div>I got problems with hanging spidermonkey sessions and need some advice on how to debug them.</div><div><br></div><div>I&#39;ve made a javascript queue application that uses mod_spidermonkey_socket. It works fine for a while,</div>



<div>but after some calls I noticed that calls didnt get transferred to agents. The reason was that earlier</div><div>calls had not been terminated properly.</div><div><br></div><div><div>freeswitch@test1&gt; hupall</div>



<div>2009-01-15 12:15:04 [CRIT] switch_core_session.c:147 switch_core_session_hupall() Giving up with 8 sessions remaining</div><div>API CALL [hupall()] output:</div><div>+OK hangup all channels with cause MANAGER_REQUEST</div>



<div><br></div><div><br></div><div>freeswitch@test1&gt; show calls</div><div>API CALL [show(calls)] output:</div><div><br></div><div>0 total.</div><div><br></div><div><br></div><div>As you can see, 8 sessions are alive, but none of them are listed as calls. What kind of logs should I turn on to see what is happening with those sessions?</div>



<div><br></div><div>Thanks,</div><div>&nbsp;&nbsp;Jonas</div></div>
<br></div></div><div>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>


<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>


IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>

<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>
<br>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>