Thanks for the reply, Alex! 

I did some experimenting with it and I've found that restarting mklauncher 
on the target corrects the issue. What I find a little strange is that on 
the device I can kill machinekit and it shuts down cleanly every time. I 
also managed to get the same lock error through mklauncher by calling the 
terminate / launch rpcs too fast (after the flag was cleared, but before 
machinekit completed shutting down I guess). I ran into this because I'm 
trying to make the remote communication part of the port reasonably robust, 
so I disconnect and reconnect networks, shutdown the server without 
notifying the client, etc. In practice, I don't think this would be an 
issue. In fact, I haven't seen it arise in about a year of using the 
machinetalk interface. But, since I've found it I've been trying to think 
of what causes the problem and maybe work up a fix. 

Oh, btw, this is Debian Jessie armhf (the zynq image specifically) with 
mklauncher started automatically as a systemd service . Maybe I'll get an 
x86 build running and see if I can duplicate on that architecture.

On Thursday, July 13, 2017 at 11:30:34 AM UTC-4, Alexander Rössler wrote:
>
> If you kill an application it does not shutdown cleanly. Machinekit does 
> not like to be killed so there might be some memlocks still 
> allocated. realtime stop usually helps in such situations 
>
> Devin Hughes writes: 
>
> > Hello, 
> > 
> > I've been writing a port to interact with machinetalk and I hit some 
> > behavior I don't understand with mklauncher. I can successfully 
> enumerate 
> > launchers, start launchers, terminate launchers, etc., but when I send a 
> > kill command I get strange results. The running machinekit instance is 
> > stopped, but when I try to start a new one I get the error 
> > 
> > msgd:0: mlock(global) failed: 12 'Cannot allocate memory' 
> > 
> > This does not happen when I call the terminate rpc - I can freely start 
> and 
> > stop as many times as I'd like. Is this expected behavior? Are there 
> side 
> > effects of calling kill that changes the link to /etc/security/.. memory 
> > config for machinekit? 
> > 
> > Thanks for any guidance. 
> > 
> > Devin 
>

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to