SlyMarbo / spdy

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

another possible race in conn.sending #32

Closed cpg closed 11 years ago

cpg commented 11 years ago

another possible race in conn.

the connection was closed normally (by the remote end).

WARNING: DATA RACE
Write by goroutine 7:
  github.com/SlyMarbo/spdy.(*connV3).handleReadWriteError()
      /home/cpg/fs/src/github.com/SlyMarbo/spdy/spdy3_conn.go:924 +0x1fb
  github.com/SlyMarbo/spdy.(*connV3).readFrames()
      /home/cpg/fs/src/github.com/SlyMarbo/spdy/spdy3_conn.go:1091 +0x20f
  gosched0()
      /usr/lib64/golang/src/pkg/runtime/proc.c:1218 +0x9f

Previous read by goroutine 6:
  github.com/SlyMarbo/spdy.(*connV3).selectFrameToSend()
      /home/cpg/fs/src/github.com/SlyMarbo/spdy/spdy3_conn.go:1195 +0x121
  github.com/SlyMarbo/spdy.(*connV3).send()
      /home/cpg/fs/src/github.com/SlyMarbo/spdy/spdy3_conn.go:1138 +0x575
  gosched0()
      /usr/lib64/golang/src/pkg/runtime/proc.c:1218 +0x9f
SlyMarbo commented 11 years ago

Like the previous one, this is indeed a race condition, but a safe one. Thanks, though.

olekukonko commented 10 years ago

What do you mean by a save one ?

SlyMarbo commented 10 years ago

I mean that it's possible that a write may occur in between a read and a write, but this occurs during connection shut down and doesn't affect the rest of the server, so it's not ideal, but it won't actually affect anything.

That's as I remember it, at least, it was 5 months ago...