Thomas Fétiveau | 4 Jan 2012 17:13

Thread dump on nekoVM

Hi,

I would like to know how to take thread dumps on the nekoVM (I'm running it on Linux).

Is there any web page summing up all diagnosis and troubleshooting tools/procedures for nekoVm applications ?

Thanks in advance. zabojad
--

-- 
Neko : One VM to run them all
(http://nekovm.org)
Nicolas Cannasse | 4 Jan 2012 18:24
Favicon
Gravatar

Re: Thread dump on nekoVM

Le 04/01/2012 17:13, Thomas Fétiveau a écrit :
> Hi,
>
> I would like to know how to take thread dumps on the nekoVM (I'm running
> it on Linux).
>
> Is there any web page summing up all diagnosis and troubleshooting
> tools/procedures for nekoVm applications ?

There are not many tools for debugging in Neko so far.

If you have a neko.vm.Thread running, you can get it's current callstack 
by doing the following :

untyped haxe.Stack.makeStack(neko.Lib.load("std", "thread_stack", 
1)(t.handle));

Best,
Nicolas

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Thomas Fétiveau | 9 Jan 2012 20:17

ThreadRemotingServer dialoging with a php server

Hi,

I'm having a problem with a neko.net.ThreadRemotingServer opening from 
time to time HttpConnections to make some calls on a remote PHP server.

The issue is that, for some of these calls, the PHP server needs to 
connect though a php_net_Socket to the ThreadRemotingServer within the 
processing of a http request from the ThreadRemotingServer (ouch :)!).

The problem is that when it tries to do so, the connections from the PHP 
server to the neko server aren't opened until the initial http 
connection from the neko server to the PHP one is closed. And the 
initial http request from neko to the PHP server won't be responded 
until the PHP server can process completely the request (and thus make 
these calls to the neko server). What I get is that the http connection 
from the neko server times out as the connections from the PHP server to 
the neko server can't be opened.

Well, I hope I was clear enough :)... The workarounds I've found are :

  - on the neko side, to open the http connections and make the calls in 
a new thread : neko.vm.Thread.create(function() { 
conn.MyClass.myMethod.call([arg0,arg1]); });
The problem of this workaround is that I can't get the return value of 
the http call to the PHP server in my original ThreadRemotingServer thread.

  - or to create another ThreadRemotingServer just to handle these calls 
from the PHP server (but it's quite an resource expensive solution just 
for that, isn't it ?).

Is there any other way which would allow me not to create a second 
ThreadRemotingServer but be able to get the return value of my http 
calls to the PHP server ?

Thanks in advance !

-- 
Thomas Fétiveau
Développeur Indépendant
Mobile : +33 623 110 922
Tél : +33 297 667 674
web : http://www.tofee.fr/
skype : thomas.fetiveau.tech

--

-- 
Neko : One VM to run them all
(http://nekovm.org)


Gmane