ERROR while running Cbc. Signal SIGSEGV caught.
Describe the bug Got SIGSEGV error on amd64 machines
To Reproduce Steps to reproduce the behavior please include attached any files needed to reproduce the error. We can only help you if we can reproduce the error ourselves and debug.
Expected behavior No error
Desktop (please complete the following information):
- Operating System, version:debian trixie (also on bookworm)
- Python version: 3.11, also 3.13
- Python-MIP version (we recommend you to test with the latest version): 1.16rc0
Additional context Getting stack trace. /root/dao/venv/day_ahead/lib/python3.13/site-packages/mip/libraries/cbc-c-linux-x86-64.so(_Z15CbcCrashHandleri+0x119) [0x7efdc6dc3459] /lib/x86_64-linux-gnu/libc.so.6(+0x3fdf0) [0x7efdd1cecdf0] python3(_PyObject_MakeTpCall+0x1dd) [0x5471cd] python3(_PyEval_EvalFrameDefault+0x2661) [0x563da1] python3(PyEval_EvalCode+0xcc) [0x55d48c] python3() [0x6ab8d1] python3() [0x6a899c] python3() [0x6b9943] python3() [0x6b93e3] python3() [0x6b921e] python3(Py_RunMain+0x3c1) [0x6b86f1] python3(Py_BytesMain+0x2b) [0x6838eb] /lib/x86_64-linux-gnu/libc.so.6(+0x29ca8) [0x7efdd1cd6ca8] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7efdd1cd6d65] python3(_start+0x21) [0x682c81]
Only errors on amd64 machines. Works well on arm-machines
With Debian GLIBC 2.36-9+deb12u13) 2.36 it goes wrong With Ubuntu GLIBC 2.41-6ubuntu1.1) 2.41 there are no problems.
I have tried the travelling salesman example:
Welcome to the CBC MILP Solver
Version: Trunk
Build Date: Oct 24 2021
Starting solution of the Linear programming relaxation problem using Primal Simplex
Coin0506I Presolve 184 (0) rows, 195 (-15) columns and 832 (0) elements
Clp1000I sum of infeasibilities 8.22201e-05 - average 4.46848e-07, 124 fixed columns
Coin0506I Presolve 182 (-2) rows, 69 (-126) columns and 474 (-358) elements
Clp0029I End of values pass after 69 iterations
Clp0014I Perturbing problem by 0.001% of 5.362616 - largest nonzero change 3.4125692e-05 ( 0.00073948616%) - largest zero change 1.8240846e-05
Clp0000I Optimal - objective value 399.2
Clp0000I Optimal - objective value 399.2
Coin0511I After Postsolve, objective 399.2, infeasibilities - dual 0 (0), primal 0 (0)
Clp0000I Optimal - objective value 399.2
Clp0000I Optimal - objective value 399.2
Clp0000I Optimal - objective value 399.2
Coin0511I After Postsolve, objective 399.2, infeasibilities - dual 0 (0), primal 0 (0)
Clp0032I Optimal objective 399.2 - 0 iterations time 0.022, Presolve 0.00, Idiot 0.02
Starting MIP optimization
Cgl0004I processed model has 184 rows, 195 columns (182 integer (182 of which binary)) and 832 elements
Coin3009W Conflict graph built in 0.001 seconds, density: 3.103%
Cgl0015I Clique Strengthening extended 0 cliques, 0 were dominated
Cbc0045I Nauty did not find any useful orbits in time 0.000854
Cbc0038I Initial state - 26 integers unsatisfied sum - 2.13333
Cbc0038I Pass 1: suminf. 1.60000 (12) obj. 429.067 iterations 35
Cbc0038I Pass 2: suminf. 1.60000 (6) obj. 762.6 iterations 32
Cbc0038I Pass 3: suminf. 1.60000 (10) obj. 770.4 iterations 20
Cbc0038I Pass 4: suminf. 1.60000 (6) obj. 783.6 iterations 22
Cbc0038I Pass 5: suminf. 1.60000 (10) obj. 783 iterations 25
Cbc0038I Pass 6: suminf. 1.60000 (12) obj. 948.333 iterations 68
Cbc0038I Pass 7: suminf. 1.33333 (7) obj. 929 iterations 31
Cbc0038I Pass 8: suminf. 1.33333 (4) obj. 878.333 iterations 44
Cbc0038I Pass 9: suminf. 1.33333 (6) obj. 882.222 iterations 12
Cbc0038I Pass 10: suminf. 1.33333 (10) obj. 1001.27 iterations 28
Cbc0038I Pass 11: suminf. 1.33333 (4) obj. 1043 iterations 33
Cbc0038I Pass 12: suminf. 1.33333 (10) obj. 1042.33 iterations 28
Cbc0038I Pass 13: suminf. 1.33333 (10) obj. 1027.67 iterations 25
Cbc0038I Pass 14: suminf. 1.77778 (10) obj. 909.756 iterations 62
Cbc0038I Pass 15: suminf. 1.06667 (6) obj. 881.667 iterations 31
Cbc0038I Pass 16: suminf. 1.06667 (6) obj. 829.6 iterations 21
Cbc0038I Pass 17: suminf. 1.06667 (7) obj. 876.333 iterations 31
Cbc0038I Pass 18: suminf. 1.06667 (4) obj. 885.733 iterations 23
Cbc0038I Pass 19: suminf. 1.06667 (6) obj. 883.867 iterations 18
Cbc0038I Pass 20: suminf. 0.00000 (0) obj. 934 iterations 55
Cbc0038I Solution found of 934
Cbc0038I Relaxing continuous gives 934
Cbc0038I Before mini branch and bound, 109 integers at bound fixed and 0 continuous
Cbc0038I Full problem 184 rows 195 columns, reduced to 183 rows 85 columns - 4 fixed gives 173, 50 - still too large
Cbc0038I Full problem 184 rows 195 columns, reduced to 173 rows 50 columns - too large
Cbc0038I Mini branch and bound did not improve solution (0.03 seconds)
Cbc0038I Round again with cutoff of 879.62
Cbc0038I Pass 21: suminf. 1.60000 (12) obj. 429.067 iterations 0
Cbc0038I Pass 22: suminf. 1.60000 (6) obj. 762.6 iterations 47
Cbc0038I Pass 23: suminf. 1.60000 (10) obj. 770.4 iterations 35
Cbc0038I Pass 24: suminf. 1.60000 (6) obj. 783.6 iterations 47
Cbc0038I Pass 25: suminf. 1.60000 (10) obj. 783 iterations 30
Cbc0038I Pass 26: suminf. 4.69275 (14) obj. 879.62 iterations 55
Cbc0038I Pass 27: suminf. 1.60000 (15) obj. 879.62 iterations 44
Cbc0038I Pass 28: suminf. 1.60000 (7) obj. 846.467 iterations 55
Cbc0038I Pass 29: suminf. 1.60000 (9) obj. 870.983 iterations 23
Cbc0038I Pass 30: suminf. 2.00000 (10) obj. 850.467 iterations 22
Cbc0038I Pass 31: suminf. 1.60000 (12) obj. 834.267 iterations 27
Cbc0038I Pass 32: suminf. 1.60000 (6) obj. 852.467 iterations 55
Cbc0038I Pass 33: suminf. 1.60000 (4) obj. 832.8 iterations 28
Cbc0038I Pass 34: suminf. 1.60000 (7) obj. 807.4 iterations 32
Cbc0038I Pass 35: suminf. 2.80000 (6) obj. 833.2 iterations 20
Cbc0038I Pass 36: suminf. 1.60000 (12) obj. 818.667 iterations 43
Cbc0038I Pass 37: suminf. 1.60000 (9) obj. 870.983 iterations 61
Cbc0038I Pass 38: suminf. 2.00000 (10) obj. 850.467 iterations 28
Cbc0038I Pass 39: suminf. 1.60000 (12) obj. 834.267 iterations 23
Cbc0038I Pass 40: suminf. 1.60000 (6) obj. 852.467 iterations 55
Cbc0038I Pass 41: suminf. 1.60000 (4) obj. 832.8 iterations 30
Cbc0038I Pass 42: suminf. 1.60000 (7) obj. 807.4 iterations 26
Cbc0038I Pass 43: suminf. 2.80000 (6) obj. 833.2 iterations 24
Cbc0038I Pass 44: suminf. 1.60000 (12) obj. 818.667 iterations 34
Cbc0038I Pass 45: suminf. 1.60000 (9) obj. 870.983 iterations 53
Cbc0038I Pass 46: suminf. 2.00000 (10) obj. 850.467 iterations 62
Cbc0038I Pass 47: suminf. 1.60000 (12) obj. 834.267 iterations 14
Cbc0038I Pass 48: suminf. 1.60000 (6) obj. 852.467 iterations 56
Cbc0038I Pass 49: suminf. 1.60000 (4) obj. 832.8 iterations 30
Cbc0038I Pass 50: suminf. 1.60000 (7) obj. 807.4 iterations 26
Cbc0038I No solution found this major pass
Cbc0038I Before mini branch and bound, 128 integers at bound fixed and 1 continuous
Cbc0038I Full problem 184 rows 195 columns, reduced to 74 rows 62 columns
Cbc0038I Mini branch and bound did not improve solution (0.11 seconds)
Cbc0038I After 0.11 seconds - Feasibility pump exiting with objective of 934 - took 0.10 seconds
Cbc0012I Integer solution of 934 found by feasibility pump after 0 iterations and 0 nodes (0.11 seconds)
Cbc0038I Full problem 184 rows 195 columns, reduced to 174 rows 42 columns - 14 fixed gives 156, 13 - still too large
Cbc0031I 10 added rows had average density of 90.5
Cbc0013I At root node, 10 cuts changed objective from 399.2 to 542 in 43 passes
Cbc0014I Cut generator 0 (Probing) - 20 row cuts average 12.9 elements, 0 column cuts (0 active) in 0.089 seconds - new frequency is -100
Cbc0014I Cut generator 1 (Gomory) - 251 row cuts average 125.2 elements, 0 column cuts (0 active) in 0.017 seconds - new frequency is 1
Cbc0014I Cut generator 2 (Knapsack) - 2 row cuts average 5.5 elements, 0 column cuts (0 active) in 0.004 seconds - new frequency is -100
Cbc0014I Cut generator 3 (Clique) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.001 seconds - new frequency is -100
Cbc0014I Cut generator 4 (OddWheel) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.002 seconds - new frequency is -100
Cbc0014I Cut generator 5 (MixedIntegerRounding2) - 79 row cuts average 7.2 elements, 0 column cuts (0 active) in 0.010 seconds - new frequency is 1
Cbc0014I Cut generator 6 (FlowCover) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.006 seconds - new frequency is -100
Cbc0014I Cut generator 7 (TwoMirCuts) - 174 row cuts average 46.3 elements, 0 column cuts (0 active) in 0.008 seconds - new frequency is 1
Cbc0016I Integer solution of 551 found by strong branching after 1093 iterations and 6 nodes (0.37 seconds)
Cbc0016I Integer solution of 547 found by strong branching after 1529 iterations and 17 nodes (0.44 seconds)
Cbc0001I Search completed - best objective 547, took 2075 iterations and 30 nodes (0.49 seconds)
Cbc0032I Strong branching done 516 times (8468 iterations), fathomed 4 nodes and fixed 4 variables
Cbc0035I Maximum depth 5, 147 variables fixed on reduced cost
Total time (CPU seconds): 0.46 (Wallclock seconds): 0.50
ERROR while running Cbc. Signal SIGSEGV caught. Getting stack trace.
/root/dao/venv/day_ahead/lib/python3.12/site-packages/mip/libraries/cbc-c-linux-x86-64.so(_Z15CbcCrashHandleri+0x119) [0x7ff7f7bc3459]
/lib/x86_64-linux-gnu/libc.so.6(+0x45330) [0x7ff7ff6c1330]
python3(_PyObject_MakeTpCall+0x79) [0x5492f9]
python3(_PyEval_EvalFrameDefault+0xadf) [0x5d68bf]
python3(PyEval_EvalCode+0x15b) [0x5d4dab]
python3() [0x607fc2]
python3() [0x6b4393]
python3(_PyRun_SimpleFileObject+0x1aa) [0x6b40fa]
python3(_PyRun_AnyFileObject+0x4f) [0x6b3f2f]
python3(Py_RunMain+0x3b5) [0x6bbf45]
python3(Py_BytesMain+0x2d) [0x6bba2d]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x7ff7ff6a61ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x7ff7ff6a628b]
python3(_start+0x25) [0x656a35]
ERROR while running Cbc. Signal SIGABRT caught. Getting stack trace.
/root/dao/venv/day_ahead/lib/python3.12/site-packages/mip/libraries/cbc-c-linux-x86-64.so(_Z15CbcCrashHandleri+0x119) [0x7ff7f7bc3459]
/lib/x86_64-linux-gnu/libc.so.6(+0x45330) [0x7ff7ff6c1330]
/lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x11c) [0x7ff7ff71ab2c]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x1e) [0x7ff7ff6c127e]
/lib/x86_64-linux-gnu/libc.so.6(abort+0xdf) [0x7ff7ff6a48ff]
/root/dao/venv/day_ahead/lib/python3.12/site-packages/mip/libraries/cbc-c-linux-x86-64.so(+0x1772d2) [0x7ff7f7b772d2]
/lib/x86_64-linux-gnu/libc.so.6(+0x45330) [0x7ff7ff6c1330]
python3(_PyObject_MakeTpCall+0x79) [0x5492f9]
python3(_PyEval_EvalFrameDefault+0xadf) [0x5d68bf]
python3(PyEval_EvalCode+0x15b) [0x5d4dab]
python3() [0x607fc2]
python3() [0x6b4393]
python3(_PyRun_SimpleFileObject+0x1aa) [0x6b40fa]
python3(_PyRun_AnyFileObject+0x4f) [0x6b3f2f]
python3(Py_RunMain+0x3b5) [0x6bbf45]
python3(Py_BytesMain+0x2d) [0x6bba2d]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x7ff7ff6a61ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x7ff7ff6a628b]
python3(_start+0x25) [0x656a35]
Aborted (core dumped)
I also get these kinds of errors when running the tests with CBC, eg, pytest -k CBC test/test_model.py.
I also get errors. I tried to run my problem on neos server with Cbc and the same problem works without errors. One thing I noticed is that the version that is running on Neos server seems to be more up to date:
When I run with python-mip:
Welcome to the CBC MILP Solver Version: Trunk Build Date: Oct 28 2021
Starting solution of the Linear programming relaxation problem using Primal Simplex
Coin0506I Presolve 0 (-2) rows, 0 (-2) columns and 0 (-4) elements Clp0000I Optimal - objective value 4.2696629e+11 Coin0511I After Postsolve, objective 4.2696629e+11, infeasibilities - dual 0 (0), primal 0 (0) Clp0032I Optimal objective 4.269662924e+11 - 0 iterations time 0.002, Presolve 0.00
Starting MIP optimization
Process finished with exit code -1073741675 (0xC0000095)
When I run on Neos server:
Welcome to the CBC MILP Solver Version: 2.10.10 Build Date: May 16 2023
command line - /opt/coin/cbc cbc.mps - (default strategy 1) At line 1 NAME BLANK FREE At line 2 ROWS At line 6 COLUMNS At line 11 RHS At line 13 BOUNDS At line 16 ENDATA Problem BLANK has 2 rows, 2 columns and 4 elements Coin0008I BLANK read with 0 errors Switching to line mode Coin:Continuous objective value is 4.26966e+11 - 0.00 seconds Cgl0003I 0 fixed, 4 tightened bounds, 0 strengthened rows, 0 substitutions Cgl0003I 0 fixed, 4 tightened bounds, 0 strengthened rows, 0 substitutions Cgl0003I 0 fixed, 4 tightened bounds, 0 strengthened rows, 0 substitutions Cgl0003I 2 fixed, 2 tightened bounds, 0 strengthened rows, 0 substitutions Cgl0004I processed model has 2 rows, 2 columns (2 integer (0 of which binary)) and 4 elements Cbc0006I The LP relaxation is infeasible or too expensive Cuts at root node changed objective from 1.79769e+308 to -1.79769e+308 Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Result - Linear relaxation infeasible
No feasible solution found Enumerated nodes: 0 Total iterations: 0 Time (CPU seconds): 0.00 Time (Wallclock seconds): 0.00
Coin:Integer infeasible - objective value 426966292134.83148193 0 a 1.1235955e+11 0 1 b 8.988764e+10 0 Coin:Total time (CPU seconds): 0.00 (Wallclock seconds): 0.00
Why not update the Cbc version that is bundled with python-mip?