[Systems] turtlejs server acting up
Martin Abente Lahaye
tch at sugarlabs.org
Sun Apr 5 19:38:56 EDT 2015
On Sun, Apr 5, 2015 at 6:06 PM, Bernie Innocenti <bernie at codewiz.org> wrote:
> Hey Tincho!
>
> Sam noticed an sh process eating CPU on sunjammer for days:
>
>
>
> http://munin.sugarlabs.org/static/dynazoom.html?cgiurl_graph=/munin-cgi/munin-cgi-graph&plugin_name=sugarlabs.org/sunjammer.sugarlabs.org/cpu&size_x=800&size_y=400&start_epoch=1393709726&stop_epoch=1428269726
>
> I looked into it and found that it was part of turtlejs. The process was
> repeatedly statting /var/mail/www-data:
>
> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED, NULL) = 1959
> ioctl(10, TIOCSPGRP, [25587]) = -1 ENOTTY (Inappropriate ioctl
> for device)
> write(2, "sh: ", 4) = -1 EIO (Input/output error)
> write(2, "Cannot set tty process group (In"..., 61) = -1 EIO
> (Input/output error)
> write(2, "\n", 1) = -1 EIO (Input/output error)
> wait4(-1, 0x7fff8b9a2c6c, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child
> processes)
> write(2, "[1] + Done "..., 100) = -1 EIO
> (Input/output error)
> write(2, "\n", 1) = -1 EIO (Input/output error)
> stat("/var/mail/www-data", 0x7fff8b9a2c20) = -1 ENOENT (No such file or
> directory)
> pipe([3, 4]) = 0
> clone(child_stack=0,
> flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x7f66c56069d0) = 1960
> close(4) = 0
> read(3, "\\[\33[1;31m\\]2!\\[\33[0m\\]\n", 128) = 22
> read(3, "", 128) = 0
> --- SIGCHLD (Child exited) @ 0 (0) ---
> close(3) = 0
>
>
> After some experimentation, I ended up restarting it with the
> initscript. However:
>
> 1. It might happen again. Any idea how to fix this?
>
Turtleblocksjs-server doesn't spawn shell scripts and it doesn't stat that
directory [1]. I don't think is has anything to do with
turtleblocksjs-server, but then how it got there? Is it running under
turtlejs user?
Refs:
https://github.com/tchx84/turtleblocksjs-server
>
> 2. '/etc/init.d/turtlejs stop' doesn't do anything, and there was no pid
> file
>
Will re-check and fix it, it won't be needed if we go for (3).
>
> 3. Can we make Apache spawn and manage a single Python interpreter per
> connection? Long-lived servers have the nasty tendency to leak memory,
> get stuck or crash. Not to mention the security and scalability
> implications o sharing a single process among multiple users. With WSGI
> + FCGI, Apache should be able to start your app on demand and efficiently.
>
>
+1
Independently of this particular issue, this server was supposed to be a
hack to probe a concept. I was mentioning this to Sam the other day, we
need to replace it.
--
> _ // Bernie Innocenti
> \X/ http://codewiz.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/private/systems/attachments/20150405/1a0cd6f3/attachment.html>
More information about the Systems
mailing list