Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
347 stars 231 forks source link

MinimalPrimes crashes occasionally #1064

Open DanGrayson opened 4 years ago

DanGrayson commented 4 years ago

About once per month MinimalPrimes crashes M2 during a daily test, as it tries the SplitTower method:

Screen Shot 2020-01-08 at 5 18 24 PM
DanGrayson commented 4 years ago

That's under Ubuntu 16.04 on habanero.

fhinkel commented 4 years ago

Unassigning myself. Realistically, I don't have time to helpf with this issue. Sorry 😞

d-torrance commented 3 years ago

Just saw this for check(13, "MinimalPrimes") in an armhf PPA build on Ubuntu 20.04:

 -- capturing check(13, "MinimalPrimes")                                    -- SIGSEGV
-* stack trace, pid: 20485
 0# stack_trace(std::ostream&, bool) at ./M2/Macaulay2/d/main.cpp:124
 1# segv_handler at ./M2/Macaulay2/d/main.cpp:240
 2# 0xF6A57900 in /lib/arm-linux-gnueabihf/libc.so.6
 3# FractionField::mult(ring_elem, ring_elem) const at ./M2/Macaulay2/e/frac.cpp:516
 4# GBRingPoly::mult_by_term1(FreeModule const*, gbvector const*, ring_elem, int const*, int) at ./M2/Macaulay2/e/gbring.cpp:116
 5# GBRing::mult_by_term(FreeModule const*, gbvector const*, ring_elem, int const*, int) at ./M2/Macaulay2/e/gbring.cpp:839
 6# GBRing::gbvector_reduce_lead_term(FreeModule const*, FreeModule const*, gbvector*, gbvector*&, gbvector*&, gbvector const*, gbvector const*, bool, ring_elem&) at ./M2/Macaulay2/e/gbring.cpp:967
 7# ReducedGB_Field::remainder(POLY&, bool, ring_elem&) at ./M2/Macaulay2/e/reducedgb-field.cpp:124
 8# ReducedGB::matrix_lift(Matrix const*, Matrix const**, Matrix const**) at ./M2/Macaulay2/e/reducedgb.cpp:193
 9# PolyRingQuotient::ann(ring_elem, ring_elem) const at ./M2/Macaulay2/e/polyquotient.cpp:324
10# PolyRingQuotient::invert(ring_elem) const at ./M2/Macaulay2/e/polyquotient.cpp:180
11# Ring::power(ring_elem, __mpz_struct const*) const at ./M2/Macaulay2/e/ring.cpp:111
12# PolyRingQuotient::power(ring_elem, __mpz_struct const*) const at ./M2/Macaulay2/e/polyquotient.cpp:148
13# RingElement::power(__mpz_struct const*) const at ./M2/Macaulay2/e/relem.cpp:132
14# engine_circ__1 at ./M2/Macaulay2/d/engine.dd:140
-- end stack trace *-
make[4]: *** [Makefile:41: check-MinimalPrimes] Error 1
d-torrance commented 2 years ago

Happened again in check(74, "MinimalPrimes") in an s390x PPA build on Ubuntu 21.10:

 -- capturing check(74, "MinimalPrimes")                                    -- SIGSEGV
-* stack trace, pid: 38321
 0# stack_trace(std::ostream&, bool) at ./M2/Macaulay2/d/main.cpp:127
 1# segv_handler at ./M2/Macaulay2/d/main.cpp:243
 2# 0x000003FFA72F161E
 3# FractionField::mult(ring_elem, ring_elem) const at ./M2/Macaulay2/e/frac.cpp:516
 4# GBRingPoly::mult_by_term1(FreeModule const*, gbvector const*, ring_elem, int const*, int) at ./M2/Macaulay2/e/gbring.cpp:115
 5# GBRing::mult_by_term(FreeModule const*, gbvector const*, ring_elem, int const*, int) at ./M2/Macaulay2/e/gbring.cpp:836
 6# GBRing::gbvector_reduce_lead_term(FreeModule const*, FreeModule const*, gbvector*, gbvector*&, gbvector*&, gbvector const*, gbvector const*, bool, ring_elem&) at ./M2/Macaulay2/e/gbring.cpp:966
 7# ReducedGB_Field::remainder(POLY&, bool, ring_elem&) at ./M2/Macaulay2/e/reducedgb-field.cpp:107
 8# ReducedGB::matrix_lift(Matrix const*, Matrix const**, Matrix const**) at ./M2/Macaulay2/e/reducedgb.cpp:193
 9# PolyRingQuotient::ann(ring_elem, ring_elem) const at ./M2/Macaulay2/e/polyquotient.cpp:351
10# PolyRingQuotient::invert(ring_elem) const at ./M2/Macaulay2/e/polyquotient.cpp:184
11# Ring::power(ring_elem, __mpz_struct const*) const at ./M2/Macaulay2/e/ring.cpp:111
12# PolyRingQuotient::power(ring_elem, __mpz_struct const*) const at ./M2/Macaulay2/e/polyquotient.cpp:154
13# RingElement::power(__mpz_struct const*) const at ./M2/Macaulay2/e/relem.cpp:132
14# engine_circ__1 at ./M2/Macaulay2/d/engine.dd:140
15# actors_circ_ at ./M2/Macaulay2/d/actors.d:705
16# evaluate_evalraw at ./M2/Macaulay2/d/evaluate.d:1295
17# newfromfun(tagged_union*, tagged_union*) at ./M2/Macaulay2/d/actors2.dd:315
18# evaluate_evalraw at ./M2/Macaulay2/d/evaluate.d:1392
d-torrance commented 2 years ago

And in check(14, "MinimalPrimes") in an s390x PPA build in Ubuntu 22.04:

 -- capturing check(14, "MinimalPrimes")                                    -- SIGSEGV
-* stack trace, pid: 36741
 0# stack_trace(std::ostream&, bool) at ./M2/Macaulay2/d/main.cpp:127
 1# segv_handler at ./M2/Macaulay2/d/main.cpp:243
 2# 0x000003FFA32F05EE
 3# FractionField::mult(ring_elem, ring_elem) const at ./M2/Macaulay2/e/frac.cpp:516
 4# GBRingPoly::mult_by_term1(FreeModule const*, gbvector const*, ring_elem, int const*, int) at ./M2/Macaulay2/e/gbring.cpp:115
 5# GBRing::mult_by_term(FreeModule const*, gbvector const*, ring_elem, int const*, int) at ./M2/Macaulay2/e/gbring.cpp:836
 6# GBRing::gbvector_reduce_lead_term(FreeModule const*, FreeModule const*, gbvector*, gbvector*&, gbvector*&, gbvector const*, gbvector const*, bool, ring_elem&) at ./M2/Macaulay2/e/gbring.cpp:966
 7# ReducedGB_Field::remainder(POLY&, bool, ring_elem&) at ./M2/Macaulay2/e/reducedgb-field.cpp:107
 8# ReducedGB::matrix_lift(Matrix const*, Matrix const**, Matrix const**) at ./M2/Macaulay2/e/reducedgb.cpp:193
 9# PolyRingQuotient::ann(ring_elem, ring_elem) const at ./M2/Macaulay2/e/polyquotient.cpp:351
10# PolyRingQuotient::invert(ring_elem) const at ./M2/Macaulay2/e/polyquotient.cpp:184
11# Ring::power(ring_elem, __mpz_struct const*) const at ./M2/Macaulay2/e/ring.cpp:111
12# PolyRingQuotient::power(ring_elem, __mpz_struct const*) const at ./M2/Macaulay2/e/polyquotient.cpp:154
13# RingElement::power(__mpz_struct const*) const at ./M2/Macaulay2/e/relem.cpp:132
14# engine_circ__1 at ./M2/Macaulay2/d/engine.dd:140
15# actors_circ_ at ./M2/Macaulay2/d/actors.d:705
16# evaluate_evalraw at ./M2/Macaulay2/d/evaluate.d:1295
mikestillman commented 2 years ago

@DanGrayson @d-torrance Have you seen this crash since we fixed the MonomialIdeal::sat bug?

d-torrance commented 2 years ago

@DanGrayson @d-torrance Have you seen this crash since we fixed the MonomialIdeal::sat bug?

Not since the last comment I made on Mar. 17, which was before you opened #2424. It's pretty rare, though. It's only showing up on the PPA builds like once per month or so.

DanGrayson commented 2 years ago

I haven't seen it. But I'm less observant than Doug.

d-torrance commented 2 years ago

This happened again in an s390x PPA build in Ubuntu 22.04. This is the first time I've seen it since the MonomialIdeal::sat bug was fixed.

 -- capturing check(13, "MinimalPrimes")                                    -- SIGSEGV
-* stack trace, pid: 37412
 0# stack_trace(std::ostream&, bool) at ./M2/Macaulay2/d/main.cpp:127
 1# segv_handler at ./M2/Macaulay2/d/main.cpp:243
 2# 0x000003FF8CAF15E6
 3# FractionField::mult(ring_elem, ring_elem) const at ./M2/Macaulay2/e/frac.cpp:516
 4# GBRingPoly::mult_by_term1(FreeModule const*, gbvector const*, ring_elem, int const*, int) at ./M2/Macaulay2/e/gbring.cpp:115
 5# GBRing::mult_by_term(FreeModule const*, gbvector const*, ring_elem, int const*, int) at ./M2/Macaulay2/e/gbring.cpp:836
 6# GBRing::gbvector_reduce_lead_term(FreeModule const*, FreeModule const*, gbvector*, gbvector*&, gbvector*&, gbvector const*, gbvector const*, bool, ring_elem&) at ./M2/Macaulay2/e/gbring.cpp:966
 7# ReducedGB_Field::remainder(POLY&, bool, ring_elem&) at ./M2/Macaulay2/e/reducedgb-field.cpp:107
 8# ReducedGB::matrix_lift(Matrix const*, Matrix const**, Matrix const**) at ./M2/Macaulay2/e/reducedgb.cpp:193
 9# PolyRingQuotient::ann(ring_elem, ring_elem) const at ./M2/Macaulay2/e/polyquotient.cpp:351
10# PolyRingQuotient::invert(ring_elem) const at ./M2/Macaulay2/e/polyquotient.cpp:184
11# Ring::power(ring_elem, __mpz_struct const*) const at ./M2/Macaulay2/e/ring.cpp:111
12# PolyRingQuotient::power(ring_elem, __mpz_struct const*) const at ./M2/Macaulay2/e/polyquotient.cpp:154
13# RingElement::power(__mpz_struct const*) const at ./M2/Macaulay2/e/relem.cpp:132
d-torrance commented 1 week ago

Possibly related. From a recent s390x PPA build:

 -- capturing check(1, "Cyclotomic")-- SIGSEGV
-* stack trace, pid: 36323
 0# stack_trace(std::ostream&, bool) at ./M2/Macaulay2/d/main.cpp:136
 1# segv_handler at ./M2/Macaulay2/d/main.cpp:257
 2# 0x000003FF92BD7A56
 3# MonomialTable::find_divisor(int*, int) at ./M2/Macaulay2/e/montable.cpp:140
 4# ReducedGB_Field::remainder(POLY&, bool, ring_elem&) at ./M2/Macaulay2/e/reducedgb-field.cpp:121
 5# ReducedGB::matrix_lift(Matrix const*, Matrix const**, Matrix const**) at ./M2/Macaulay2/e/reducedgb.cpp:190
 6# PolyRingQuotient::ann(ring_elem, ring_elem) const at ./M2/Macaulay2/e/polyquotient.cpp:351
 7# PolyRingQuotient::divide(ring_elem, ring_elem) const at ./M2/Macaulay2/e/polyquotient.cpp:197
 8# DetComputation::detmult(ring_elem, ring_elem, ring_elem, ring_elem, ring_elem) at ./M2/Macaulay2/e/det.cpp:320
 9# DetComputation::gauss(ring_elem**, unsigned long, unsigned long, unsigned long, ring_elem) at ./M2/Macaulay2/e/det.cpp:340
10# DetComputation::bareiss_det() at ./M2/Macaulay2/e/det.cpp:366
11# DetComputation::step() at ./M2/Macaulay2/e/det.cpp:201
12# DetComputation::calc(int) at ./M2/Macaulay2/e/det.cpp:277
13# Matrix::exterior(int, int) const at ./M2/Macaulay2/e/det.cpp:435
14# IM2_Matrix_exterior at interface/matrix.cpp:499
15# interface_rawExteriorPower at ./M2/Macaulay2/d/interface.dd:1766
16# evaluate_evalraw at ./M2/Macaulay2/d/evaluate.d:1428
17# evaluate_evalSequence at ./M2/Macaulay2/d/evaluate.d:465
18# evaluate_applyFCCS at ./M2/Macaulay2/d/evaluate.d:821
19# evaluate_evalraw at ./M2/Macaulay2/d/evaluate.d:1435