]> Cypherpunks repositories - gostls13.git/commit
internal/poll: add mutex to prevent SetDeadline race in Plan 9
authorRichard Miller <miller.research@gmail.com>
Tue, 2 Jun 2020 09:34:09 +0000 (10:34 +0100)
committerDavid du Colombier <0intro@gmail.com>
Tue, 2 Jun 2020 12:10:28 +0000 (12:10 +0000)
commitd17aebf46d8d0f55cbd205be4482c632527eca27
treecfa823416c1add7425e831620ae5b62010756c6c
parent0eb9767caad4c4a0b447824d7b27328864612d58
internal/poll: add mutex to prevent SetDeadline race in Plan 9

There are data races on fd.[rw]aio and fd.[rw]timedout when Read/Write
is called on a polled fd concurrently with SetDeadline (see #38769).
Adding a mutex around accesses to each pair (read and write) prevents
the race, which was causing deadlocks in net/http tests on the builders.

Updates #38769.

Change-Id: I31719b3c9a664e81a775cda583cff31c0da946c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/235820
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David du Colombier <0intro@gmail.com>
src/internal/poll/fd_plan9.go