-
-
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
Reproducable connection closure #3855
Comments
You know, I'd send you the file tree, if ipfs would eat it :P |
Heh, mind zipping it then sending it? Can you add things without the daemon running? |
I feel like we're going to have a bug inception here, because I was trying to send someone a bug report via IPFS and IPFS crashed and now I'm sending you the file tree that crashed a program that crashed a program. I have a feeling, that the output of tar is going to be helpfull in debugging this:
I'm 20% sure that ipfs is choking on those same permissions errors, but then, why does it close the connection on a different file each time? Perhaps the server is trying to open those files in a separate thread, or some sort of sync issue between the client and server is causing this opaque client side behavior? |
OK, my certainty level just raised to %97. Running the command without the daemon running gives me:
|
@timthelion iiiinteresting. So the daemon output is just hiding the error messages for some reason. Try running with |
Not much changes. Still stops at a random file:
oph65IaWxOy-Yl0MZXtXEDKcxodzY0_-inUDq7rPVTEDvqugYpJAH/go/src/syscall/zerrors_freebsd_386.go
01:04:50.141 ERROR commands/h: read tcp 127.0.0.1:41746->127.0.0.1:5001:
use of closed network connection client.go:247
Error: read tcp 127.0.0.1:41746->127.0.0.1:5001: use of closed network
connection
oph65IaWxOy-Yl0MZXtXEDKcxodzY0_-inUDq7rPVTEDvqugYpJAH/go/src/syscall/zerrors_freebsd_amd64.go
01:05:30.847 ERROR commands/h: read tcp 127.0.0.1:41789->127.0.0.1:5001:
use of closed network connection client.go:247
Error: read tcp 127.0.0.1:41789->127.0.0.1:5001: use of closed network
connection
…On 04/06/2017 12:51 AM, Jeromy Johnson wrote:
@timthelion <https://github.com/timthelion> iiiinteresting. So the
daemon output is just hiding the error messages for some reason. Try
running with |--progress=false|
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3855 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABU7-ABl0KGHhzQWKKFFmk5iBacaj6K6ks5rtBrhgaJpZM4M0RVx>.
|
Can you take a look at daemon log. The command code might be crashing or something. |
The following commands will reproduce the bug:
Note: this works with any suitably large directory. |
@timthelion thanks! |
I noticed that with smaller file trees, the permission denied error
shows correctly some of the time. And with very small trees, the error
shows correctly all of the time.
…On 04/18/2017 07:42 PM, Jeromy Johnson wrote:
@timthelion <https://github.com/timthelion> thanks!
The issue here is that the process is erroring, and the error is
likely getting overwritten or ignored due to how quickly messages are
coming in
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3855 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABU7-FvmYnF80_I-ZcgP3Yo7_DCKb06jks5rxPYRgaJpZM4M0RVx>.
|
Ah, good data points there. I think that makes the issue pretty easy to track down now. |
Okay I am on it. I will see if I can track down what is going on and fix it in the next day or so. |
So the problem is on the client side in MultiFileReader.Read. As far as I can tell it is doing the correct thing and returning an error. Here is a stack dump by using debug.PrintStack() right before it returns an error
Notice how there is only one line in the trace that is not standard go code, so these could be a problem with the go libraries themself. I need to get to bed but will look more into this tomorrow. |
I don't think its a problem with go, When that error gets returned, who does it get returned to? The stdlib? It should pass the error on to the http client, which i think is in commands/http/client.go |
I pushed some code with some debug println in the branch kevina/3855-debug. |
golang/go@9d29be4 which landed in go1.9 looks like it was trying to fix this issue, but we're still experiencing it rebuilding everything using go1.9 |
Hey @josharian, You did the CR on that commit. Any idea what might be going on here? |
Hey there - Josh is on personal leave, and he asked me to help debug this. Can you help me figure out how to reproduce the issue 100% of the time? Can you trigger it in your test suite, for example? |
In the meantime, I'll try to get the project installed/ test suite for this project up and running locally. |
Ah, sorry, here looks good: #3855 (comment) I tried to build ipfs using Go |
@kevinburke Hey! Yeah, safe to ignore that warning. |
@kevinburke Let me work on a minimal reproduction of the issue, should just take a few minutes at this point. |
@kevinburke here: https://ipfs.io/ipfs/QmcPGyf9pzRZHF57AmTHwM9yMxrDeaptXrCvnjv273bHw5 Run the main.go as its own server, then run the client.go with an argument of 100 or so. You should see "my cool error". But if you run it with an argument of 1000000, you'll get a connection closed error instead. |
Hey @timthelion, good job, looks like you found a go bug :) |
Update: The golang/go#21760 is tagged as |
I'm having the same issue here. Super annoying. Sometimes it will actually connect, but 9.9/10 times it just won't connect and returns: I tried debugging it myself, or coming up with some kind of patch. Am I correct in saying the problem is somewhere in https://github.com/libp2p/go-libp2p-conn? |
I was seeing this when working on the libp2p codebase. Haven't seen it recently, but I think there might be a bug somewhere. |
@whyrusleeping ah whoops, I didn't realize this wasn't p2p layer. |
It could be anywhere (unfortunately). Your best bet is to set the env variable |
Any update for this bug, still hit it. IPFS version is 0.4.14. |
No, the underlying bug is in go and hasn't been fixed (golang/go#11745). Note: This is actually just a bug in error reporting. That is, go reports one error when it should be reporting another. In this case, you likely don't have read permissions on one of the files you're trying to add to ipfs. |
Closing in favor of #6552 as I'm always confused when I run into this issue and forget to scroll to the bottom :). |
Version information:
Type:
Description:
When I try to do
I eventually get
After adding a ton of files.
Server side it looks like
I origionally encountered this on
0.4.5
and then upgraded to see if the bug was fixed yet. But I didn't delete any of my~/.ipfs
files between them, so I might have some cruft there which is causing the hang up.This is %100 repeatable for this file tree, but always happens on a different file. Here's the tail of the result of running the command again:
And again.
So it doesn't seem to even be getting farther each time. Just totally randomly gives up.
The text was updated successfully, but these errors were encountered: