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

Adding with keccak-512 crashes daemon #3978

Closed
victorb opened this issue Jun 13, 2017 · 6 comments
Closed

Adding with keccak-512 crashes daemon #3978

victorb opened this issue Jun 13, 2017 · 6 comments
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@victorb
Copy link
Member

victorb commented Jun 13, 2017

Version information:

go-ipfs version: 0.4.9-8ec0814a8
Repo version: 5
System version: amd64/darwin
Golang version: go1.8

Type:

B U G

Description:

Adding the latest all-hands with keccak-512 crashes the daemon with bunch of errors.

To reproduce:

  • start daemon ipfs daemon
  • Add directory with ipfs add --recursive --hash=keccak-512 /Users/user/Documents/Zoom/2017-06-12\ 18.06.07\ IPFS\ All\ Hands\ Call\ 779351365
  • Wait for daemon to start crashing and CLI return a error.

CLI error

➜  ~ time ipfs add --recursive --hash=keccak-512 /Users/user/Documents/Zoom/2017-06-12\ 18.06.07\ IPFS\ All\ Hands\ Call\ 779351365
added zBurK7j3TGUKWtpJFTegLsrW15p5rrDPpDSTEZVm4MSzUi4VtNDsrqPsM8df2KJ4hRRkPVyf31JM2fDjvUvnSCmXdvk7e 2017-06-12 18.06.07 IPFS All Hands Call 779351365/audio_only.m4a
added zB7S6b1e26RLvnxJKdhNb99wq8hXHuj3fzqab6y6tJxre4squ5tqxX4SS79Wm4NfVK1CCggEfjqSyXsNRNb1umqVqygue 2017-06-12 18.06.07 IPFS All Hands Call 779351365/chat.txt
added zB7S6ZHdYCT7XccmWq1W6pwLY4cC9A5yyDmjzpraspPMBEK8x7B8BstZi6CXjzgv979W4aFDas9FAwsLZP4rsBTTPttb3 2017-06-12 18.06.07 IPFS All Hands Call 779351365/playback.m3u
 155.82 MB / 173.91 MB [================================================================================================================================>--------------]  89.60% 2s10:52:22.742 ERROR commands/h: unexpected EOF client.go:247
Error: unexpected EOF
ipfs add --recursive --hash=keccak-512   0.12s user 0.20s system 1% cpu 22.169 total

Details from daemon: https://ipfs.io/ipfs/zBunonyeK973tsai8UcZVYf1X8hqESy4TVBpff4ZLeMUt1bVeyEKAG7yGNcChFocbH85JaayFo9ydCKv7ahoZ1op74pBn ( < sha3 works fine 🎉 )

@victorb victorb added the kind/bug A bug in existing code (including security flaws) label Jun 13, 2017
@whyrusleeping
Copy link
Member

interesting... it caused a sigabort. thats... special

@whyrusleeping
Copy link
Member

@Kubuxu @kevina could one of you look into why this might be happening? If we can't figure it out easily, it might be good to just whitelist the hash functions that users are allowed to select for now

@Kubuxu
Copy link
Member

Kubuxu commented Jun 13, 2017

You've run out of thread allowance (ulimit probably) in this case. No idea why it happened. See the runtime/cgo: pthread_create failed.

@Kubuxu
Copy link
Member

Kubuxu commented Jun 13, 2017

Ahh, you are running OSX then it is: #3762

I think this can be closed.


Confirmed from the goroutine dump, 1700 goroutines in the syscall.
Although it shouldn't have that many connections starting up at the same time.

@whyrusleeping
Copy link
Member

Weird... why would it be any different than with sha256?

Also, @victorbjelkholm does it work fine offline? or if you leave the daemon running for a while before starting the add?

@Kubuxu
Copy link
Member

Kubuxu commented Jun 13, 2017

Maybe it was coincidence.

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

No branches or pull requests

3 participants