-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 in jl_()
#9767
Comments
Reproducible with master and 0.3.5 |
the system (julia) needs to enter the event loop at some point in time to finalize the write buffers. does calling |
Let met try. calling |
Adding |
|
The even better solution would be to get libuv to call the write completion callback immediately if the buffer is no longer needed. |
Libuv provides an explicit guarantee that it will never execute a callback in the middle of running user code. I don't think they are interested in undoing that work. |
Well, they could add a return code that indicates that the write succeeded synchronously and no callback will be delivered. |
uv_run executes arbitrary callbacks, which runs somewhat counter to the design and purpose of jl_ as a dead simple function for use from gdb or analyzing bootstrapping failures and does not affect Julia state |
I agree; this is just a debugging function. It is really not worth putting any effort into this. |
FWIW, this seems to be fixed in master.... |
good point. at some point, i switched it to write directly stderr so that it wouldn't need to impact the julia structures (like memory) |
Warning: don't try it on a system with small memory
The script above consumes 1.5G memory on my laptop. Calling
gc
does not release the memory. Replacing:ccall(jl_)
withprintln
solves the problem.WARNING: Again, the memory comsumption is roughly linear with n, don't run the script unless you have enough memory or you've setup a ulimit on it. The script cannot be killed with
Ctrl-C
but you can interrupt it withCtrl-\
The text was updated successfully, but these errors were encountered: