"while loading no file" error when exiting


I have a moderately long program, running a whole pile of simulations, taking several minutes. After my program completes (i.e. some time after the @printf statement in my very last “for” loop), I sometimes get this error message:

signal (2): Interrupt: 2
while loading no file, in expression starting on line 0
kevent at /usr/lib/system/libsystem_kernel.dylib (unknown line)
unknown function (ip: 0xffffffffffffffff)
Allocations: 864471445 (Pool: 864258539; Big: 212906); GC: 1695

The numbers in the last line may be different. And frustratingly, the error doesn’t occur every time.

It looks like it’s coming from the OS rather than Julia (I am running Mac OS 10.12.6, Julia 0.6.2). But when I google “while loading no file” all of the top hits are Julia related, so I assume this is a Julia related issue. But what is causing this? I don’t even know where to begin looking. The “while loading no file” perhaps suggests I am leaving files open, but I am pretty sure I close() every data file I open. Any suggestions?