Macaulay2 / Macaulay2/M2

Mathicgb crash/assertion failure with Groebner bases

Open
#2,284 0 comments 0 reactions 1 assignee Claimed by @mikestillman View on GitHub
Engine Gröbner bases
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

While messing around with the failures in #1742, I got a crash from the assertion at `e/mathicgb/mathicgb/F4MatrixBuilder2.cpp:133`. In particular, I have the following stack trace (only the interesting elements)

```
#1 0x00007ffff5ef9862 in abort () from /usr/lib/libc.so.6
#2 0x00007ffff5ef9747 in __assert_fail_base.cold () from /usr/lib/libc.so.6
#3 0x00007ffff5f08616 in __assert_fail () from /usr/lib/libc.so.6
#4 0x000055555614cb98 in mgb::F4MatrixBuilder2::Builder::initializeRowsToReduce (this=0x7fffe7f58660,
tasks=std::vector of length 79, capacity 128 = {...})
at /home/jay/repos/M2-clean/M2/Macaulay2/e/mathicgb/mathicgb/F4MatrixBuilder2.cpp:133
#5 0x000055555614d444 in mgb::F4MatrixBuilder2::Builder::buildMatrixAndClear (this=0x7fffe7f58660,
tasks=std::vector of length 79, capacity 128 = {...}, quadMatrix=...)
at /home/jay/repos/M2-clean/M2/Macaulay2/e/mathicgb/mathicgb/F4MatrixBuilder2.cpp:148
#6 0x000055555614c1b6 in mgb::F4MatrixBuilder2::buildMatrixAndClear (this=0x7fffe7f58860,
quadMatrix=...) at /home/jay/repos/M2-clean/M2/Macaulay2/e/mathicgb/mathicgb/F4MatrixBuilder2.cpp:587
#7 0x000055555611ef5a in mgb::F4Reducer::classicReduceSPolySet (this=0x7fffd81ba800,
spairs=std::vector of length 51, capacity 64 = {...}, basis=...,
reducedOut=std::vector of length 0, capacity 0)
at /home/jay/repos/M2-clean/M2/Macaulay2/e/mathicgb/mathicgb/F4Reducer.cpp:205
#8 0x00005555560312b1 in mgb::ClassicGBAlg::step (this=0x7fffe7f58e30)
at /home/jay/repos/M2-clean/M2/Macaulay2/e/mathicgb/mathicgb/ClassicGBAlg.cpp:374
#9 0x0000555556030c17 in mgb::ClassicGBAlg::computeGrobnerBasis (this=0x7fffe7f58e30)
at /home/jay/repos/M2-clean/M2/Macaulay2/e/mathicgb/mathicgb/ClassicGBAlg.cpp:324
#10 0x00005555560333d3 in mgb::computeGBClassicAlg (inputBasis=..., params=...)
at /home/jay/repos/M2-clean/M2/Macaulay2/e/mathicgb/mathicgb/ClassicGBAlg.cpp:679
#11 0x0000555556022088 in mgb::mgbi::internalComputeGroebnerBasis (inputWhichWillBeCleared=...,
output=...) at /home/jay/repos/M2-clean/M2/Macaulay2/e/mathicgb/mathicgb.cpp:976
#12 0x0000555555871c4d in mgb::computeGroebnerBasis (inputWhichWillBeCleared=...,
output=...) at /home/jay/repos/M2-clean/M2/Macaulay2/e/mathicgb/mathicgb.h:913
#13 0x000055555586de3b in rawMGB (inputMatrix=0x7fffd3e05720, reducer=1, spairGroupSize=0, nthreads=0,
logging=0x7fffeaa15080) at /home/jay/repos/M2-clean/M2/Macaulay2/e/interface/groebner.cpp:810
```

Originally,I got this crash running code from SpecialFanoFourfolds, but via the debugger I managed to extract the following example: [test2.m2.txt](https://github.com/Macaulay2/M2/files/7480862/test2.m2.txt).

This extracted test case is crashing most of the time for me (running it via load), although not 100% of the time, which makes me think it's a race condition and or memory corruption.

Also, I don't know if #2162 is related, but this isn't on the same platforms. I'm on amd64.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.