Open d-torrance opened 3 years ago
@d-torrance These are all good crashes/bugs/compile issues you are finding!
This just happened on a GitHub autotools-ubuntu-20.04-default build too: https://github.com/Macaulay2/M2/pull/1908/checks?check_run_id=1803950169
No segfault this time, but the test failed.
A little more informative stack trace from this Github build:
/home/runner/work/M2/M2/M2/Macaulay2/packages/AssociativeAlgebras/tests.m2:1136:1-1172:1: error:
-- i23 : alpha = map(S,ring graphPhi,gens S | {f_1,f_2,f_3})
--
-- o23 = map (S, kk <|z , z , z , y , y , y |>, {z , z , z , z + z + z , z + (- x - 1)z + x*z , z + x*z + (- x - 1)z , x})
-- 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
--
-- o23 : RingMap S <--- kk <|z , z , z , y , y , y |>
-- 1 2 3 1 2 3
--
-- i24 : assert(alpha(preim) == alpha(z_1^2*z_2^3*z_3))
-- -- SIGSEGV
-- -* stack trace, pid: 129683
-- 0# stack_trace(std::ostream&, bool) at ../../Macaulay2/bin/main.cpp:124
-- 1# segv_handler at ../../Macaulay2/bin/main.cpp:240
-- 2# 0x00007F5CC662D210 in /lib/x86_64-linux-gnu/libc.so.6
-- 3# GC_generic_malloc_many in /lib/x86_64-linux-gnu/libgc.so.1
-- 4# GC_malloc_kind in /lib/x86_64-linux-gnu/libgc.so.1
-- 5# getmem at ../../Macaulay2/d/M2mem.c:48
-- 6# M2::ConcreteRing<M2::ARingQQGMP>::copy(ring_elem) const at ../../Macaulay2/e/aring-glue.hpp:280
-- 7# PolyRing::copy(ring_elem) const at ../../Macaulay2/e/poly.cpp:648
-- 8# PolyRing::add(ring_elem, ring_elem) const at ../../Macaulay2/e/poly.cpp:757
-- 9# Ring::add_to(ring_elem&, ring_elem&) const at ../../Macaulay2/e/ring.cpp:186
-- 10# PolyRing::mult(ring_elem, ring_elem) const at ../../Macaulay2/e/poly.cpp:818
-- 11# PolyRingQuotient::mult(ring_elem, ring_elem) const at ../../Macaulay2/e/polyquotient.hpp:164
-- 12# FreeAlgebra::mult_by_term_left_and_right(Polynomial<CoefficientRingType>&, Polynomial<CoefficientRingType> const&, ring_elem, Monom, Monom) const at ../../Macaulay2/e/NCAlgebras/FreeAlgebra.cpp:607
-- 13# FreeAlgebra::mult_by_term_left_and_right(Polynomial<CoefficientRingType>&, Polynomial<CoefficientRingType> const&, ring_elem, Word const&, Word const&) const at ../../Macaulay2/e/NCAlgebras/FreeAlgebra.cpp:642
-- 14# NCGroebner::twoSidedReduction(Polynomial<CoefficientRingType> const*) const at ../../Macaulay2/e/NCAlgebras/NCGroebner.cpp:306
-- 15# FreeAlgebraQuotient::mult(Polynomial<CoefficientRingType>&, Polynomial<CoefficientRingType> const&, Polynomial<CoefficientRingType> const&) const at ../../Macaulay2/e/NCAlgebras/FreeAlgebraQuotient.cpp:127
-- 16# M2FreeAlgebraQuotient::mult(ring_elem, ring_elem) const at ../../Macaulay2/e/M2FreeAlgebraQuotient.cpp:231
-- 17# Ring::mult_to(ring_elem&, ring_elem) const at ../../Macaulay2/e/ring.cpp:185
-- 18# RingMap::eval_term(Ring const*, ring_elem, int const*, int, int) const at ../../Macaulay2/e/ringmap.cpp:203
-- 19# FreeAlgebra::eval(RingMap const*, Polynomial<CoefficientRingType> const&, int) const at ../../Macaulay2/e/NCAlgebras/FreeAlgebra.cpp:757
-- 20# RingMap::eval(RingElement const*) const at ../../Macaulay2/e/ringmap.cpp:240
I can reliably reproduce this crash (on amd64) by running the following code
needsPackage "AssociativeAlgebras";
c = code (tests AssociativeAlgebras)#30;
schedule (x -> while true do (collectGarbage();nanosleep 1000));
value(c)
This has the effect of running the gc as often as possible while running the test, so that issues are are detected faster The stack trace is a bit random though. Though the common factor seems to be a segfault in accessing a gmp value.
From a PPA build of the development branch in Ubuntu 21.04 on armhf: