Drat -- I should have given the raw url for the wget rather than the github viewing page -- that is
https://raw.githubusercontent.com/glycerine/rpc25519/refs/heads/master/attic/darwin_word_shift.go On Monday, November 18, 2024 at 12:01:40 AM UTC-6 Jason E. Aten wrote: > If you have a macOS or Windows computer > handy and you want to improve the TCP > read-deadline handling in Go -- and you know > something about how the runtime handles TCP connections > and read-deadline-timeouts -- your help would be welcome > in getting to the bottom of this runtime bug I recently > encountered: > > https://github.com/golang/go/issues/70395 > > I have reliable reproducers for it shown there > on the ticket (also see below). > > I can see that 8 or 12 bytes are being > skipped and data lost from the TCP receive buffers > on a socket read that occurs at some point after one > or more read deadline time outs. (On windows I can > see the strange count of 15 bytes being lost.) > > It is clearly racy since the lost data occurs only > after several thousand good reads. I actually > don't think the "loaded" part is necessary after all; > I just think you need alot of reads in order to > encounter a bad one. Thus I have 50 TCP clients > reading at once from a TCP server. Generally > I see a bad read within a few seconds, but it > can take a minute sometimes too. > > This happens on darwin and on windows, but not > on linux. Reproducer code in one file is here: > > wget > https://github.com/glycerine/rpc25519/blob/master/attic/darwin_word_shift.go > > Just `go run darwin_word_shift.go` to reproduce it: if > it panics, you have seen a bad read. > > Thanks and happy debugging! > > Jason > > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/ef10c981-1904-43a2-a021-edb56d0efe75n%40googlegroups.com.