Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

go-peerstream transports: muxado #483

Merged
merged 5 commits into from
Jan 2, 2015
Merged

go-peerstream transports: muxado #483

merged 5 commits into from
Jan 2, 2015

Conversation

jbenet
Copy link
Member

@jbenet jbenet commented Jan 1, 2015

This PR updates go-peerstream to the new abstracted
transport version. It also changes the default transport
to http://github.com/inconshreveable/muxado

@whyrusleeping: try out this branch with provider fixes
and see if it gets rid of the hang you were experiencing.
If not, the problem's on our side.

jbenet added 3 commits January 1, 2015 07:05
peerstream was updated to use pluggable transports, including
muxado. The interface was also simplified slightly.
used to return io.ErrShortBuffer, but this makes client
code much more complicated. we're already allocating
buffers when it's too large, so might as well just
keep it for later.
@jbenet jbenet added the status/in-progress In progress label Jan 1, 2015
@jbenet
Copy link
Member Author

jbenet commented Jan 1, 2015

@whyrusleeping you might also want to try 6ad158d directly, as a change to peerstream may have fixed things too, but it's a very low probability. (too bad i cant repro the problem or i'd try :( )

@jbenet
Copy link
Member Author

jbenet commented Jan 1, 2015

Hm. this may not actually work. i rebased provides-rewrite on this (locally) and running dhtHell to get things like this:

07:28:58.221 ERROR    bitswap: Bitswap ReceiveError: unexpected EOF bitswap.go:331
07:28:58.233 ERROR        dht: closestPeers query run error: routing: not found routing.go:199
07:28:58.244 ERROR    bitswap: Bitswap ReceiveError: proto: can't skip unknown wire type 6 for bitswap_message_pb.Message bitswap.go:331

Seems like the streams are getting a bit mixed up or something... the protobufs aren't decoding properly.

Though... it still manages to succeed:

Read File Succeeded: 932193.312047 bytes per second

@jbenet jbenet mentioned this pull request Jan 1, 2015
@jbenet jbenet self-assigned this Jan 1, 2015
@whyrusleeping
Copy link
Member

If you see it succeed then the file definitely somehow managed to make it over correctly... Thats strange.

@whyrusleeping
Copy link
Member

I almost suspect that the unexpected EOF could be the result of a context cancelling and closing a connection mid-write.

jbenet added 2 commits January 1, 2015 19:48
clients were already accessing secio in one thread, but it's
safer to make sure it _is_ threadsafe
This commit replaces the go-peerstream transport,
using muxado instead of spdystream.
jbenet added a commit that referenced this pull request Jan 2, 2015
go-peerstream transports: muxado
@jbenet jbenet merged commit fb404b5 into master Jan 2, 2015
@jbenet jbenet removed the status/in-progress In progress label Jan 2, 2015
@jbenet jbenet deleted the use-muxado branch January 2, 2015 07:32
@jbenet jbenet restored the use-muxado branch January 2, 2015 07:32
@jbenet jbenet deleted the use-muxado branch January 2, 2015 07:34
@jbenet
Copy link
Member Author

jbenet commented Jan 2, 2015

this was reverted, in favor of #484

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants