Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Memory leak in is_planar

I have been working with planar graphs using SageMath 10.3 in a Jupyter notebook on an M3 MacBook Pro.

My kernel kept crashing and restarting and when I searched for the reason, I discovered that the process was consuming all the RAM on my machine and eventually being killed.

I used command line top -o mem to watch the process consuming more and more memory until it was killed.

Here is a MWE illustrating the problem.

count = 0 
for g in graphs.nauty_geng('-C 10'):
    if g.is_planar():
        count = count+1
print(count)

I have also tested this on the SageMath command line interface just in case it was some complication with Jupyter.

I first verified that the nauty_geng process was not consuming memory and then added various commands is_antipodal, is_hamiltonian etc just to be sure that it was only is_planar that was at fault.

What should I do (a) in the short term to work around it, and (b) in the long term to report the bug and get it fixed?

Memory leak in is_planar

I have been working with planar graphs using SageMath 10.3 in a Jupyter notebook on an M3 MacBook Pro.

My kernel kept crashing and restarting and when I searched for the reason, I discovered that the process was consuming all the RAM on my machine and eventually being killed.

I used command line top -o mem to watch the process consuming more and more memory until it was killed.

Here is a MWE illustrating the problem.

count = 0 
for g in graphs.nauty_geng('-C 10'):
    if g.is_planar():
        count = count+1
print(count)

I have also tested this on the SageMath command line interface just in case it was some complication with Jupyter.

I first verified that the nauty_geng process was not consuming memory and then added various commands is_antipodal, is_hamiltonian etc just to be sure that it was only is_planar that was at fault.

What should I do (a) in the short term to work around it, and (b) in the long term to report the bug and get it fixed?

EDIT I reinstalled SageMath10.2 and the memory leak persisted, but when I reinstalled SageMath10.1 it no longer manifested. So I guess that I have answered my own short-term solution.