-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 ipfs add
#1924
Comments
@whyrusleeping think this is the dag editor accumulating stuff in resident memory for a long time? |
@lgierth could I also get your binary? |
Sure, the CLI is 0.3.8 from https://gobuilder.me/get/github.com/ipfs/go-ipfs/cmd/ipfs/ipfs_v0.3.8_linux-amd64.zip and the daemon is 2afe4a4 (uploaded here) |
This was reported in #1584 (i.e. this issue's reference count is 2). |
Still leaks, @davidar's add is eating 2.5G/h right now: |
ipfs add
ipfs add
Debugging info from #2615: |
This is because the mfs abstraction still creates intermediate root dag for each One fix is to repurpose #1964 into a new function in mfs that doesn't construct any intermediate root dag. (and a write throughput rate that is slightly faster than git / tar|gz at files with each size of >10kb range) |
@davidar restarted his add command and biham is back to 29G, i dumped the debugging info into biham:/root/memleak. |
This should be resolved by #2795. Its ready to go, just watiing for a small bit of CR first |
Hi, I brought this up before in #2615 - This time I took the 64 bit Linux v0.4.3 official binary, put it on a 2GB digital ocean VPS as before. This time, it got to 67GB of (mostly small) files added, but was killed because it was out of memory. Things are a lot better in this version, but it seems like there is still a memory leak somewhere. Happy to publish the script which I've been using if anyone wants to reproduce this, it's archiving open source data (python packages). |
I'm add'ing https://downloads.openwrt.org/chaos_calmer/15.05/
It ran for about 1h20m, in the meantime Go resident memory went from 121M to 13261M, and then it probably OOMed.
These are a lot of files that it needs to keep hashes for in memory, but it looks more like we're leaking the file contents.
I just started another run and so far it's consuming 3761M after adding 1870M worth of files. Here's the pprof goroutine, goroutine-full, and heap dumps: https://ipfs.io/ipfs/QmYCkvATcJcpZbs4mwvMZXzNp2CPKZKBkawYEBpZnv4Xbq
Aborting the second run now.
cc @whyrusleeping
The text was updated successfully, but these errors were encountered: