Interrupting Singular.groebner_basis leaks and fork()'s much

53 views
Skip to first unread message

Georgi Guninski

unread,
Jan 8, 2026, 9:05:10 AMJan 8
to sage-...@googlegroups.com
I observed that Singular leaks a lot and here is small testcase.

sage 10.8 on linux with system Singular
Singular for x86_64-Linux version 4.4.1 (44100, 64 bit) Jan 2025

Attaching a testcase, where
Singular.groebner_basis(algorithm="singular:std") in a loop is
interrupted by alarm() has the following properties:

In the ipython shell, each alarm starts new sage shell + new system
process Singular. I saw them in the XFCE system manager.
When exiting the main sage, the Singular subprocesses survive and use
a lot of RAM, the OOM kills other than Singular processes, which
borders with DOS.

===


def singular_leak1(n=50,ntries=100,algorithm="singular:std"):
"""
Interrupting singular.groebner_basis() with alarm
Author: Georgi Guninski Thu Jan 8 01:09:42 PM UTC 2026
"""
Kx=PolynomialRing(GF(2),'x',n)
for i in range(ntries):
print(i)
I=[Kx.random_element(degree=3) for _ in range(n//2)]
alarm(1)
try:
gb=Ideal(I).groebner_basis(algorithm=algorithm)
except Exception as e:
print(' exception',e)
cancel_alarm()

Dima Pasechnik

unread,
Jan 11, 2026, 1:21:49 AMJan 11
to sage-...@googlegroups.com
We have open issues on GitHub about memory leaks. See e.g.
https://github.com/sagemath/sage/issues/32604
https://github.com/sagemath/sage/issues/27261
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/CAGUWgD-dRAMCUxbpqKspzAmOyB4%3DotCnaXmnr-hvXkZne14pWA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages