Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new release 0.60.7 introduces PulpSolverError (free(): invalid pointer) on previously working code #93

Open
savvytruffle opened this issue Apr 13, 2023 · 9 comments

Comments

@savvytruffle
Copy link

Hi.

coin-or-cgl 0.60.7 release introduced PuLPSolverError on previously working code. With msg=True, the underlying error was

free(): invalid pointer

Replicating this error:
This fails for me in both linux and mac (Macbook Pro M1 OS12.6) environments. Using Python 3.8 pulp 2.7.0

Download Sudoku2.py from PuLP User Guide sudoku2 example.

conda install pulp coin-or-cgl=0.60.6
python Sudoku2.py

yields a solution without error

conda install pulp coin-or-cgl=0.60.7
python Sudoku2.py

yields

    raise PulpSolverError(
pulp.apis.core.PulpSolverError: Pulp: Error while trying to execute, use msg=True for more detailscbc
@svigerske
Copy link
Member

I couldn't say from the diff in the source what would cause this. If conda install downloads a prebuild binary of coin-or-cgl, then I would suggest trying to also update coinutils, osi, clp, and cbc.

@tkralphs
Copy link
Member

I could replicate this in a fresh conda environment. It's not necessary to use PuLP or even try to solve a MIP. Just starting cbc causes it to crash.

(cbc) ~ > cbc
free(): invalid pointer
Aborted

But so far, I can't get conda to install coin-or-cgl at 0.60.6. conda install pulp coin-or-cgl=0.60.6 just returns to the command line with no error and no packages installed. Weird.

How did you determine it's CGL that's the issue? Does rolling back CGL also roll back other packages? Or is it really just dropping in a different version of CGL with the newest versions of all other packages? I wouldn't think it would happily do that.

@tkralphs
Copy link
Member

tkralphs commented Apr 14, 2023

Everything looks fine on the builds, but I think what could have happened is that I might have merged pull requests in the wrong order for the update versions and accidentally caused Cbc 2.10.9 to be built with Cgl 0.60.6 (see here). In theory, this shouldn't cause problems, as it should be fine to drop in 0.60.7 in place of 0.60.7, but maybe we somehow introduced a breaking change? I have no idea how to force a re-build, but I'll investigate a bit.

@tkralphs
Copy link
Member

OK, now with mamba, I was able to switch versions of CGL and indeed, this allows Cbc to start.

tkralphs added a commit to tkralphs/coin-or-cbc-feedstock that referenced this issue Apr 14, 2023
@savvytruffle
Copy link
Author

savvytruffle commented Apr 14, 2023

How did you determine it's CGL that's the issue? Does rolling back CGL also roll back other packages? Or is it really just dropping in a different version of CGL with the newest versions of all other packages? I wouldn't think it would happily do that.

@tkralphs So I determined cgl was the root cause by systematically building new conda environment with different versions of dependencies & running the .py file, ie use default resolver (latest release) versions of all dependencies and roll back one dependency.

Here are all the dependencies I tested:

-pulp=2.7.0 (default resolver)
-coincbc=2.10.8 vs 2.10.9 (default resolver) made no difference
-coin-or-utils=2.11.6 vs 2.11.8 (default resolver) made no difference
-coin-or-osi=0.108.7 vs 0.108.8 (default resolver) made no difference
-coin-or-clp=1.17.7 vs. 1.17.8 (default resolver) made no difference
-coin-or-cgl=0.60.6 OK vs. 0.60.7 caused error

@tkralphs
Copy link
Member

@tkralphs So I determined cgl was the root cause by systematically building new conda environment with different versions of dependencies & running the .py file

This is great, thanks for doing that. Let's hope the re-build fixes things.

@savvytruffle
Copy link
Author

🤞 thanks for the quick response.

@tkralphs
Copy link
Member

It works!

@tkralphs
Copy link
Member

And now it breaks when dropping in 0.60.6, so we must have introduced some kind of breaking change :(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants