-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Memory leak when redefining module #30920
Comments
Can reproduce. Works fine on julia 1.0.3, fails on 1.2.0-DEV.219. I tested on x86_64 linux with glibc 2.28. Procedure: Repeatedly paste the following line into the REPL: On 1.0.3: julia consumes some memory and sometimes releases memory back to the OS. Regardless, this can be repeated arbitrarily often. I used this procedure to disambiguate between memory leaks (memory does not get re-used even under subsequent memory pressure) and questionable decisions about returning memory to the OS (there where some issues 30888, 25884 on linux, possibly caused by glibc malloc somehow deciding to grow the heap instead of mmapping some large allocations, and then being unable to shrink the heap afterwards, due to contiguity; this memory is not leaked and is still used for subsequent work, it just doesn't get returned to the OS). |
@chethega Did you do the second test for julia 1.0.3 too? When there are functions present or even links to modules by the julia> module TEST; x=zeros(Float32,128^3*300); f() = nothing; end; # ca. 2.5 GB memory
module TEST; end; # redefine module (reset to blank module)
GC.gc() # clean up fails? For me |
Not a bug, since it prints an error also ( |
Happens in both versions of Julia:
1.0.0
1.1.0
Do the following Tests and watch your memory
1. Test (Works fine in Julia 1.0.0 Windows, but not in Julia 1.1.0)
2. Test (Fails in Julia 1.0.0 and Julia 1.1.0)
Note
The text was updated successfully, but these errors were encountered: