Singular matrices expose bugs in numalg algorithms…
Wondering if your call is going through MKL under the hood. I’ve seen crashes in that library for singular matrices which get fixed 3 by setting OMP_NUM_THREADS=1
Dump utility below could be useful to get repro – save the matrix before the crash. Then you can upload the file and wrap it into easy to run repro like here 2
def dump(result, fname):
    """Save result to file. Load as np.genfromtxt(fname). """
    result = to_numpy(result)
    if result.shape == ():  # savetxt has problems with scalars
        result = np.expand_dims(result, 0)
    location = fname
    # special handling for integer datatypes
    if (
            result.dtype == np.uint8 or result.dtype == np.int8 or
            result.dtype == np.uint16 or result.dtype == np.int16 or
            result.dtype == np.uint32 or result.dtype == np.int32 or
            result.dtype == np.uint64 or result.dtype == np.int64
    ):
        np.savetxt(location, X=result, fmt="%d", delimiter=',')
    else:
        np.savetxt(location, X=result, delimiter=',')
    print("Dumping to", location)