Reaping old maxima processes

Reaping old maxima processes

by Leo Butler -
Number of replies: 5

I have a standalone moodle server (ubuntu 18.04, moodle 2.9.1, stack v4.2.1) that I set up a few years ago and have been upgrading (via git) at the beginning of each semester.

I noticed today that the server had  long-running maxima processes that were noticeably slowing things down:

# ps auxwwf | grep maxima
www-data 31947  7.6  4.1 577272 509260 ?       R    Dec01  95:52 /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --
www-data 19407  7.3  8.4 1100632 1033976 ?     R    Dec01  75:37 /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --
www-data  8451  6.7  8.3 1090240 1024968 ?     R    Dec01  52:33 /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --
www-data 23076  6.6  8.3 1100492 1031284 ?     R    Dec01  46:45 /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --
www-data 24494  6.5  4.1 577528 508256 ?       R    Dec01  46:13 /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --
www-data  7861  6.4  8.3 1100736 1031452 ?     R    00:36  40:10 /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --
www-data 10473  6.3  4.1 576908 509108 ?       R    00:48  39:13 /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --
www-data 17026  6.3  8.3 1100396 1032052 ?     R    01:17  37:05 /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --
www-data 17171  6.3  8.3 1101152 1032020 ?     R    01:18  37:02 /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --

What I noticed is that the parent process of each of these processes is dead, but the child is still running.By contrast, there were other long-lived processes with the parent still alive:

www-data 30380  0.0  0.0   4628     0 ?        S    02:24   0:00 sh -c /usr/bin/maxima 2>&1
www-data 30381  6.2  4.1 576244 506740 ?       R    02:24  32:30  \_ /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --
www-data  5287  0.0  0.0   4628     0 ?        S    03:01   0:00 sh -c /usr/bin/maxima 2>&1
www-data  5288  6.2  2.0 316208 246876 ?       R    03:01  30:14  \_ /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --
www-data 20222  0.0  0.0   4628     0 ?        S    09:42   0:00 sh -c /usr/bin/maxima 2>&1
www-data 20223  5.2  3.5 515248 430552 ?       R    09:42   4:19  \_ /usr/lib/maxima/5.41.0/binary-gcl/maxima -eval (cl-user::run) -f --

I am a bit mystified about why those children are not being reaped. And, how can I ensure they get reaped?

TIA,

Leo

Average of ratings: -
In reply to Leo Butler

Re: Reaping old maxima processes

by Leo Butler -
Reply to self: I reconfigured the stack plugin to use the timeout command as explained here:


The ultimate source of the long-running maxima processes appears to be a bug in the php code which mangles or mis-reads syntactically-correct expressions like

e^-(k*((2*n-1)/L)^2*t)

while letting

e^-(5*((2*n-1)/L)^2*t)
pass.

Leo
In reply to Leo Butler

Re: Reaping old maxima processes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
STACK 4.3.x has a much improved parse. I would be very surprised if this bug was still present.
In reply to Tim Hunt

Re: Reaping old maxima processes

by Leo Butler -
Tim, I upgraded moodle and stack to the latest release and I am still finding the same parse errors.
Can you tell me how/where to submit a bug report?

Leo