Skip to content
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

tar -vac . |ipfs tar add - out of memory #3323

Closed
cchris-org opened this issue Oct 22, 2016 · 1 comment · Fixed by #3334
Closed

tar -vac . |ipfs tar add - out of memory #3323

cchris-org opened this issue Oct 22, 2016 · 1 comment · Fixed by #3334
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@cchris-org
Copy link

Version information:

go-ipfs version: 0.4.3-
Repo version: 4
System version: amd64/linux
Golang version: go1.7

Type:

Bug

Priority:

P4

Description:

need tar because there are some issues with file types.
whatever, tar add works fine for small files.
but a directory with large files, eat up all my memory (44GB !!) and daemon exit with out of memory.

what i did:
cd into a directory with files 600MB - ~2GB
tar -vac . |ipfs tar add

a bad idea to read the entire tar input into ram?! :(

chris.

@whyrusleeping
Copy link
Member

Huh, thats odd. In the code we for some reason decide to read all of the input from the reader (stdin) then turn it back into a reader and pass it into the construction code... Thats a bug. Nice find.

@whyrusleeping whyrusleeping added the kind/bug A bug in existing code (including security flaws) label Oct 29, 2016
@whyrusleeping whyrusleeping self-assigned this Oct 29, 2016
@whyrusleeping whyrusleeping added the status/in-progress In progress label Oct 29, 2016
@whyrusleeping whyrusleeping removed the status/in-progress In progress label Oct 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants