-
-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zombie maxima process - if invoked from a script #33027
Comments
comment:1
Moving this to critical, as it seems to efficiently kill the patchbots. |
comment:3
This might be related to #32167. |
comment:4
I think it was observed without fricas installed, too. |
This comment has been minimized.
This comment has been minimized.
comment:6
I've noticed that one gets |
This comment has been minimized.
This comment has been minimized.
comment:7
This effectively kills the patchbots, thus a blocker, IMHO. |
comment:8
what I meant to say is that it might be a similar underlying problem. |
comment:9
Replying to @dimpase:
Apparently a ticket introduced in 9.5beta8 https://groups.google.com/g/sage-release/c/vo_m79EHAVc/m/mMlNPz5sBAAJ introduced this problem. My patchbot worked fine until then and I got contacted by the IT on December 13th (it is a virtual machine and I'm guessing this also affected other people). |
comment:10
|
comment:11
Replying to @orlitzky:
Perhaps it's due to ecl from the system? I see this on Debian 11 with ecl built by Sage. |
Attachment: config.log A config.log of some debian buster with this problem |
comment:13
Replying to @kliem:
I meant that a system ecl is the reason that Michael cannot reproduce this. |
comment:14
Ah yes, this might be the reason. I can also observe this on ubuntu focal with ecl installed as SPKG. |
comment:15
Replying to @kliem:
Yes, I can reproduce this - on a Gentoo machine with systemwide ecl there is no zombie, but installing ecl+maxima in Sage leads to zombies. |
This comment has been minimized.
This comment has been minimized.
comment:18
Replying to @dimpase:
Maybe delete that |
comment:19
The other obvious difference is that the SPKG is built with |
comment:20
Could you check whether using spkg ecl / system ecl also makes the difference for #32167? |
comment:21
Replying to @orlitzky:
patch or no patch, the same picture. |
comment:22
accoring to comment:9, something happened in 9.5.beta8, which caused this. Time for |
comment:39
Replying to @orlitzky:
it's there, no?
|
comment:40
I think I am noticing zombie processes also with the gap3 (optional) interface. |
comment:41
Replying to @dimpase:
But when is that string sent to the running maxima process? I meant something like comment:31. I see now that there's a function called def quit_sage(verbose=True):
"""
If you use Sage in library mode, you should call this function
when your application quits.
It makes sure any child processes are also killed, etc.
"""
...
from sage.interfaces.quit import expect_quitall
expect_quitall(verbose=verbose)
... which kills all running pexpect processes. And apparently you are supposed to call this function yourself. So, I guess we can blame sagetex for not calling |
comment:42
shouldn't EOF in a .sage script trigger |
comment:43
Replying to @dimpase:
Yes, obviously. (Or something like that). I only use sage as a library, and I just learned about that function 20 minutes ago. It's outrageous to expect the user to manually clean up after the library. However I think an atexit hook is a cleaner approach, at least for pexpect processes. They all support |
comment:44
I'm going to experiment with a cleanup hook for symmetrica on another ticket. Our interface to that library has |
comment:45
I posted a branch on #8784 that eliminates It's a more-invasive change, but the right thing to do if it doesn't cause any subtle new bugs. |
Reviewer: Michael Orlitzky |
comment:46
Let's take the easy route for the 9.5 release and worry about |
comment:47
Setting milestone to 9.6 now that 9.5 is out. |
comment:48
With this ticket I'm seeing a lot of flakiness with maxima-related tests, e.g.
Always disappears when testing individually, but running multiple maxima-using tests in parallel triggers them quite reliably. E.g.
|
comment:49
Actually seems to be due to #32986 |
comment:51
I have just been hit by this problem on the patchbot as well. For me, running ptestlong now leaves about 47 maxima processes running at around 130% cpu usage on average, as well as two ecl and several fricas processes. With the current branch, the problem seems to go away. |
comment:52
feel free to give it positive review, again... |
comment:53
Longer term we will probably want threads enabled anyway (the upstream and most distros default), even if #8784 goes in, so. |
comment:54
At first, I thought the branch would disable threads, but actually it is the other way around. If threads had been disabled before, I am surprised the zombie processes use more than 100% cpu. |
comment:55
The patch resulted from an observation that a system-wide |
Changed branch from u/dimpase/packages/ecl/nozombies to |
invoking
maxima
in a Sage script leads to a zombie process. E.g.run the following in terminal
and observe zombie
maxima
process after this terminates.Don't forget to
now and then.
A slightly shorter
does not lead to a zombie - in fact, it prints on exit:
This was observed while testing
sagetex
spkg withSAGE_CHECK=yes make sagetex
on #32887.Using
maxima_calculus()
(the library interface) rather thanmaxima()
(pexpect interface) does not lead to zombies.Apparently, this only happens with ecl installed in Sage rather than with system-wide ecl.
CC: @nbruin @vbraun @mkoeppe @spaghettisalat
Component: interfaces
Author: Dima Pasechnik
Branch/Commit:
abafddc
Reviewer: Michael Orlitzky
Issue created by migration from https://trac.sagemath.org/ticket/33027
The text was updated successfully, but these errors were encountered: