sage-on-gentoo icon indicating copy to clipboard operation
sage-on-gentoo copied to clipboard

Compiling seems to get stuck with very low load averages, is this intended behaviour? [Gentoo 6.14.4]

Open sct0 opened this issue 6 months ago • 3 comments

When I emerge sagemath-standard, it starts to show unusually low load averages of 0.0 to 1.5 after a few minutes, only occasionally peaking back up to 2.0. Additionally, after this point, the build log does not appear to move past

Python 'class private name' rules. This may change in a future release.
warning: sage/symbolic/expression.pyx:13986:0: Only extern functions can throw C++ exceptions.

for at least one or two hours, with the last line indicating any concrete compile progress being

[254/569] Cythonizing sage/matrix/echelon_matrix.pyx

This combination of a very low load and the log remaining still for so long is not something I have ever observed in any other package. Because of this I have restarted the merge several times over the last few days, just in case this "stuck" behaviour had some random cause on my side, but so far the behaviour is entirely reproducible. I also did fully remove the sagemath set once and re-emerged it. I have yet to let the compile run until I get either an error or completion of the merge (because I keep forgetting to let it run overnight), but this behaviour seems so odd to me, that I wanted report it in any case.

build.log : https://gist.github.com/sct0/ca27431c68efe9b4f430c5faeb592d07

sct0 avatar May 26 '25 15:05 sct0

It is odd and I certainly want to look at it closely. Thanks for reporting.

kiwifb avatar May 26 '25 21:05 kiwifb

Well the fact that there are problems of that kind in your logs means that something bad is happening.

Objects/unicodeobject.c:707: _PyUnicode_CheckConsistency: Assertion failed: maxchar < 128
Enable tracemalloc to get the memory block allocation traceback

object address  : 0x7f72c6532610
object refcount : 1
object type     : 0x7f72d7f5af80
object type name: str
object repr     : 'Ð\x04RÐRS'

Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: initialized

Current thread 0x00007f72d80b8740 (most recent call first):
  File "/usr/lib/python3.12/site-packages/Cython/Compiler/ExprNodes.py", line 10469 in generate_codeobj

Would you be using cython 3.1.0+ by any chance?

kiwifb avatar May 26 '25 21:05 kiwifb

Good point, I naively assumed that there would be no obvious errors in the log since the merge hadn't failed yet. Should've looked. I am using cython 3.1.0+, I assume my issue then has the same roots as #805 . Will look into it some more, thanks for the pointer.

sct0 avatar May 27 '25 08:05 sct0

cython 3.10+ is now supported.

kiwifb avatar Aug 10 '25 08:08 kiwifb