Memory corruption error in Julia: "Incorrect checksum for freed object" when running a JuMP/Gurobi model

I am encountering a memory corruption error when running my optimization model using JuMP with the Gurobi solver in Julia. The error message is as follows:

julia(30498,0x2012a5f00) malloc: Incorrect checksum for freed object 0x143255e00: probably modified after being freed.
Corrupt value: 0xc13da6be19f5e728
julia(30498,0x2012a5f00) malloc: *** set a breakpoint in malloc_error_break to debug

There is a lazy constraint callbacks.

I have upgraded Julia, JuMP, and Gurobi.jl to the latest versions, yet the error persists intermittently—even when I set the "Threads" attribute to 1.

Hi @leonie25, can you provide a reproducible example of your code?

I have two questions:

  • Are you using the solver-specific callback?
  • Are you using multithreading in Julia?

I replied your email with a reproducible example of the code.

I have identified a bug in Gurobi.jl related to callbacks with the new MINLP support in Gurobi 12. I’ll make a patch and a new release ASAP.

PR: Fix callback with MINLP and hidden variables by odow · Pull Request #640 · jump-dev/Gurobi.jl · GitHub

Thanks!

1 Like