> In this case however, what is reported is a concurrent write-after-read.
Is that really a memory race?
In general, it would be: if these accesses are not synchronized, there's a
risk that the goroutines could slip relative to each other so that the
write and read take place at the same time,
On Wed, Jun 7, 2023 at 2:19 PM Sven Anderson wrote:
>
>
> Caleb Spare schrieb am Mi. 7. Juni 2023 um 19:22:
>
>> On Wed, Jun 7, 2023 at 2:33 AM Sven Anderson wrote:
>> >
>> > That’s not only a read/write race, it’s also a write/write race. Every
>> request to the server creates a new Go routine
Caleb Spare schrieb am Mi. 7. Juni 2023 um 19:22:
> On Wed, Jun 7, 2023 at 2:33 AM Sven Anderson wrote:
> >
> > That’s not only a read/write race, it’s also a write/write race. Every
> request to the server creates a new Go routine that might increment
> newConns in parallel, so it may get corru
On Wed, Jun 7, 2023 at 2:33 AM Sven Anderson wrote:
>
> That’s not only a read/write race, it’s also a write/write race. Every
> request to the server creates a new Go routine that might increment newConns
> in parallel, so it may get corrupted. Same for lines 39/40.
>
> You might claim, that fo
On Wed, Jun 7, 2023 at 7:05 AM Ian Lance Taylor wrote:
>
> On Tue, Jun 6, 2023 at 4:31 PM Caleb Spare wrote:
> >
> > Can someone explain why the following test shows a race between the
> > indicated lines?
> >
> > https://github.com/cespare/misc/blob/b2e201dfbe36504c88e521e02bc5d8fbb04a4532/http
On Tue, Jun 6, 2023 at 4:31 PM Caleb Spare wrote:
>
> Can someone explain why the following test shows a race between the
> indicated lines?
>
> https://github.com/cespare/misc/blob/b2e201dfbe36504c88e521e02bc5d8fbb04a4532/httprace/httprace_test.go#L12-L43
>
> The race seems to be triggered by th
On Wed, Jun 7, 2023, 12:33 PM Sven Anderson wrote:
> That’s not only a read/write race, it’s also a write/write race. Every
> request to the server creates a new Go routine that might increment
> newConns in parallel, so it may get corrupted. Same for lines 39/40.
>
The write/write race will hap
That’s not only a read/write race, it’s also a write/write race. Every
request to the server creates a new Go routine that might increment
newConns in parallel, so it may get corrupted. Same for lines 39/40.
You might claim, that for infrastructural reasons, there can be no
concurrent requests to
On Tue, Jun 6, 2023 at 5:31 PM Caleb Spare wrote:
> Can someone explain why the following test shows a race between the
> indicated lines?
>
>
> https://github.com/cespare/misc/blob/b2e201dfbe36504c88e521e02bc5d8fbb04a4532/httprace/httprace_test.go#L12-L43
>
> The race seems to be triggered by t
Can someone explain why the following test shows a race between the
indicated lines?
https://github.com/cespare/misc/blob/b2e201dfbe36504c88e521e02bc5d8fbb04a4532/httprace/httprace_test.go#L12-L43
The race seems to be triggered by the very last line of the test:
get(client1)
If I comment that
10 matches
Mail list logo