Gecode / gecode

Generic Constraint Development Environment
https://www.gecode.org
Other
283 stars 76 forks source link

`release/6.3.0` branch: Minizinc 2.8.5 test `tests/spec/unit/test-globals-float.mzn` causes OOM #199

Open LebedevRI opened 2 months ago

LebedevRI commented 2 months ago

I've built gecode from release/6.3.0 branch (specifically, f7f0d7c273d6844698f01cec8229ebe0b66a016a), plus libminizinc 2.8.5 release, using clang-18 -O2 -UNDEBUG.

At least one minizinc test has issues, the last output is: (only one test is run at once)

spec/unit/regression/test_parout.mzn::default.1.cbc
[gw0] [ 64%] SKIPPED spec/unit/regression/test_parout.mzn::default.1.cbc
spec/unit/regression/var_self_assign_bug.mzn::default.0.gecode
[gw0] [ 64%] PASSED spec/unit/regression/var_self_assign_bug.mzn::default.0.gecode
spec/unit/regression/var_self_assign_bug.mzn::default.0.chuffed
[gw0] [ 64%] PASSED spec/unit/regression/var_self_assign_bug.mzn::default.0.chuffed
spec/unit/regression/var_self_assign_bug.mzn::default.0.cbc
[gw0] [ 64%] SKIPPED spec/unit/regression/var_self_assign_bug.mzn::default.0.cbc
<this is the last output. after a while, OOM happens>

While waiting for OOM killer to trigger (after fzn-gecode consumes 100+Gigs of RAM!), this is the relevant output of ps:

 145434 ?        S      0:00 /usr/bin/make -f debian/rules test_minizinc_late
 145451 ?        S      0:00 /bin/sh -c cd /build/minizinc-meta-27hHCQ/minizinc-meta-1.0.0/libminizinc/tests/; \ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/build/minizinc-meta-27hHCQ/minizinc-meta-1.0.0-build/build/stage-2/minizinc-meta-install/usr/bin" PYTHONPATH=":/build/minizinc-meta-27hHCQ/minizinc-meta-1.0.0-build/build/stage-2/minizinc-meta-install/usr/lib/python3.12/dist-packages/" pytest --suite default --solvers gecode,chuffed -n 1
 145452 ?        Sl     0:00 /usr/bin/python3 /usr/bin/pytest --suite default --solvers gecode,chuffed -n 1
 145454 ?        Sl     0:02 /usr/bin/python3 -u -c import sys;exec(eval(sys.stdin.readline()))
 147367 pts/3    Ss     0:00 /bin/bash
 148088 ?        I      0:00 [kworker/26:0]
 148360 ?        S      0:00 /build/minizinc-meta-27hHCQ/minizinc-meta-1.0.0-build/build/stage-2/minizinc-meta-install/usr/bin/minizinc --solver org.gecode.gecode@6.3.0 --allow-multiple-assignments --output-mode json --output-time --output-objective --output-output-item --statistics --intermediate-solutions /build/minizinc-meta-27hHCQ/minizinc-meta-1.0.0/libminizinc/tests/spec/unit/test-globals-float.mzn --json-stream
 148362 ?        R      0:55 /build/minizinc-meta-27hHCQ/minizinc-meta-1.0.0-build/build/stage-2/minizinc-meta-install/usr/bin/fzn-gecode -s /tmp/mznfileyzWV5u.fzn
 148412 pts/3    R+     0:00 ps ax
 148413 pts/3    D+     0:00 /bin/bash

So it is indeed tests/spec/unit/test-globals-float.mzn.

This raises a bigger issue: looking at fzn-gecode, is there really no memory limit handling?

X-Ref: https://github.com/MiniZinc/libminizinc/issues/835