SlyMarbo / spdy

[deprecated] A full-featured SPDY library for the Go language.
BSD 2-Clause "Simplified" License
116 stars 13 forks source link

Errors (Received SYN_REPLY with unopened or closed Stream...) during high traffic. #100

Open przemekr opened 8 years ago

przemekr commented 8 years ago

Hi,

I made just a slight modification on the example server and client. The client starts number of concurrent function each keep sending requests at given rate, the server replies with one 1KB of random data.

At 10x concurrent functions each making 1000 request /s there are errors reported:

(spdy) 2016/02/01 22:16:58 error_handling.go:18: Error: Received SYN_REPLY with unopened or closed Stream ID 15065. (spdy) 2016/02/01 22:16:58 io.go:19: Encountered receive error: runtime error: invalid memory address or nil pointer dereference (runtime.errorString)

Not sure, if it is a bug in the protocol implementation or my client/server share some data between concurrent functions that should not be shared.

Attaching full log and my updated code.

git log -1 commit 431b911c621782fff951b92948f9ce38633188f0

(github, didn't accept .zip file so I rename to txt) spdy_go_test.zip.txt

SlyMarbo commented 8 years ago

Hi,

Sorry to hear about the error. It sounds like it's probably an error of the library, but I don't have a dev machine available at the moment. I'll do what I can to triage this, but it'll probably be a week away. Sorry for the delay.

przemekr commented 8 years ago

No problem, thanks for the replay. Let me know if you would need any more logs, network capture etc.

SlyMarbo commented 8 years ago

I've had a look at the code but I can't work out where this is going wrong. Very sorry. I'm afraid I don't really have time to maintain this any more. I'd recommend using HTTP/2, such as with bradfitz's package http2, which will be in the standard library from Go1.6.