The malloc/free functions are the ones that allocate and free blocks of memory. They are provided by the system (e.g. Linux).
A double free or corruption likely means that free was called twice on the same block of memory, or that something was overwritten that shouldn't have been, e.g. an array overrun or something similar.
This might have happened deep within Julia itself or in some C library that your code calls.
Just an absolute guess based on the output you posted, some finalizer is trying to call a free or cleanup function on some data from a C library, but is passing invalid pointers to the C library... or there is a bug in the C library itself.
I'm sorry I don't know anything about the "minimization" you are speaking of. I'm not a numerical person. And I don't recognise any of the libraries mention in your stack trace (other than libjulia.so).
But does this information help in any way?
Tracking such things down can be very difficult. If you make a pile of much smaller examples, can you get the same thing to happen repeatedly with similar code?
Bill.