Closed parvit closed 1 year ago
@mfoxworthy
Added new test StatisticsSuite.TestParallelExecution
and with current code on main branch it does not fail.
However removing the fix of commit e823e10c
the error presents itself right away with:
fatal error: concurrent map writes
goroutine 26 [running]:
runtime.throw({0x140da2f?, 0xc0002a9ee0?})
C:/home/dev/go_1.18.6/src/runtime/panic.go:992 +0x76 fp=0xc0002a9e88 sp=0xc0002a9e58 pc=0xef9716
runtime.mapassign_faststr(0x13912e0?, 0x140592d?, {0xc000306fd0, 0xe})
C:/home/dev/go_1.18.6/src/runtime/map_faststr.go:212 +0x39c fp=0xc0002a9ef0 sp=0xc0002a9e88 pc=0xed3ffc
github.com/parvit/qpep/api.(*statistics).SetMappedAddress(0x1c40100, {0x1406b81, 0x9}, {0x1406b8a, 0x9})
C:/home/dev/src/github.com/parvit/qpep-faster/api/statistics.go:292 +0x237 fp=0xc0002a9f80 sp=0xc0002a9ef0 pc=0x13110d7
github.com/parvit/qpep/api.(*StatisticsSuite).TestParallelExecution.func6()
C:/home/dev/src/github.com/parvit/qpep-faster/api/statistics_test.go:389 +0x7e fp=0xc0002a9fe0 sp=0xc0002a9f80 pc=0x131d4de
runtime.goexit()
C:/home/dev/go_1.18.6/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc0002a9fe8 sp=0xc0002a9fe0 pc=0xf2a1c1
created by github.com/parvit/qpep/api.(*StatisticsSuite).TestParallelExecution
C:/home/dev/src/github.com/parvit/qpep-faster/api/statistics_test.go:386 +0x1c5
What i suppose is that the version you tested for the server was taken before this fix, we should align all the versions and test again.
As reported by @mfoxworthy: