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

JuMP crashes Julia 1.8.0 Beta-3 on M1 #44824

Closed
ixzh opened this issue Apr 1, 2022 · 16 comments
Closed

JuMP crashes Julia 1.8.0 Beta-3 on M1 #44824

ixzh opened this issue Apr 1, 2022 · 16 comments
Labels
system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips

Comments

@ixzh
Copy link

ixzh commented Apr 1, 2022

When running:

     using JuMP, Cbc 
     m=Model(Cbc.Optimizer)

I got this error:

julia(17828,0x100220580) malloc: *** error for object 0xe00000000000000: pointer being freed was not allocated
julia(17828,0x100220580) malloc: *** set a breakpoint in malloc_error_break to debug

It works on Julia 1.7.2 though.

1.8.0 beta3 info:

Julia Version 1.8.0-beta3
Commit 3e092a2521 (2022-03-29 15:42 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.3.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores

My 1.7.2 info:

Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.5.0)
  CPU: Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, westmere)

How can I resolve this?

@ViralBShah ViralBShah added the regression Regression in behavior compared to a previous version label Apr 1, 2022
@KristofferC KristofferC added the system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips label Apr 1, 2022
@staticfloat
Copy link
Member

Please post a minimal reproducer script and Manifest.toml that can be used to instantiate and showcase the issue.

@ixzh
Copy link
Author

ixzh commented Apr 4, 2022

Please post a minimal reproducer script and Manifest.toml that can be used to instantiate and showcase the issue.

Hi I have updated the issue description above. Hope it is clear this time!

@gbaraldi
Copy link
Member

gbaraldi commented Apr 4, 2022

I can repro and get a backtrace to libClp.1.14.6.dylib ClpModel::~ClpModel(). This might be an upstream bug on the solver, but I'm not very familiar with them to go further. This issue should probably go on the Clp.jl repo

@IanButterworth IanButterworth added this to the 1.8 milestone Apr 13, 2022
@KristofferC
Copy link
Member

M1 is tier 3 and therefore is not release blocking.

@DilumAluthge DilumAluthge removed this from the 1.8 milestone Apr 22, 2022
@ViralBShah
Copy link
Member

Please reopen if still an issue.

@ianfiske
Copy link
Contributor

ianfiske commented Oct 25, 2022

I confirmed that the exact MWE above triggers the same crash on a new M1 on Julia 1.8.2. Also with using Clp instead of Cbc. I cannot reopen since I am not the OP. Should I create a new issue?

@ViralBShah ViralBShah reopened this Oct 25, 2022
@ViralBShah
Copy link
Member

Is this using Rosetta?

@ianfiske
Copy link
Contributor

No, it works fine with Rosetta. It crashes using aarch64.

@ViralBShah
Copy link
Member

ViralBShah commented Oct 25, 2022

@odow Could you suggest if this is a Julia issue or a library issue, and if so what is the right place to file this? Since it worked on 1.7, it is probably a Julia bug. Maybe these libraries just need to be rebuilt with a newer toolchain? Seems like a lot has improved on the M1 front since Dec 2021 when these were last built:

https://github.com/JuliaBinaryWrappers/Clp_jll.jl/releases/tag/Clp-v100.1700.601%2B0

Maybe even the versions of Coin-OR libraries as well as some of their underlying dependencies can also be bumped. Let me know if I can help.

@gbaraldi
Copy link
Member

I'm not sure this has ever worked on aarch64-macos

@ViralBShah
Copy link
Member

Ah the 1.7.2 is actually on Intel.

@ViralBShah ViralBShah removed the regression Regression in behavior compared to a previous version label Oct 25, 2022
@gbaraldi
Copy link
Member

Just running Cbc_newmodel() which is a direct ccall without arguments is enough for a crash. I would check if you can use cbc outside of julia with the dylib we ship, and with one built from somewhere else. But I imagine the issue is the dylib might have an issue.

@ViralBShah
Copy link
Member

ViralBShah commented Oct 25, 2022

Yeah, it makes sense to make a new build. This is not a Julia issue then. We'll wait for @odow to chime in where to file this before we can close it here.

@ianfiske
Copy link
Contributor

There is also this jump-dev/Clp.jl#131 and that's probably this should be kept if this is not a Julia issue. Thank you for looking at this though @ViralBShah .

@ViralBShah
Copy link
Member

Great. Let's close this in favour of that one. I'll chime in there.

@odow
Copy link
Contributor

odow commented Oct 25, 2022

Cbc and Clp are known to fail on M1: jump-dev/Clp.jl#131.

@ixzh: use HiGHS.jl instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips
Projects
None yet
Development

No branches or pull requests

9 participants