dara race issue
tsingson opened this issue · comments
go version 1.13.8
OS: centOS 7.2
$/usr/local/go/bin/go test -race .
2020/02/17 16:56:45 accept tcp 127.0.0.1:35019: use of closed network connection
2020/02/17 16:56:45 watcher closed
2020/02/17 16:56:48 accept tcp 127.0.0.1:40316: use of closed network connection
2020/02/17 16:56:48 accept tcp 127.0.0.1:40504: use of closed network connection
2020/02/17 16:56:48 watcher closed
2020/02/17 16:56:48 accept tcp 127.0.0.1:35054: use of closed network connection
2020/02/17 16:56:48 watcher closed
2020/02/17 16:56:48 accept tcp 127.0.0.1:43625: use of closed network connection
2020/02/17 16:56:48 watcher closed
2020/02/17 16:56:50 accept tcp 127.0.0.1:36666: use of closed network connection
2020/02/17 16:56:50 watcher closed
2020/02/17 16:56:50 accept tcp 127.0.0.1:41583: use of closed network connection
2020/02/17 16:56:50 watcher closed
==================
WARNING: DATA RACE
Write at 0x00c0003c6070 by goroutine 81:
github.com/xtaci/gaio.TestReadFull()
/home/go/gaio/aio_test.go:417 +0x4e2
testing.tRunner()
/usr/local/go/src/testing/testing.go:909 +0x199
Previous write at 0x00c0003c6070 by goroutine 90:
github.com/xtaci/gaio.TestReadFull.func1()
/home/go/gaio/aio_test.go:410 +0xaa
Goroutine 81 (running) created at:
testing.(*T).Run()
/usr/local/go/src/testing/testing.go:960 +0x651
testing.runTests.func1()
/usr/local/go/src/testing/testing.go:1202 +0xa6
testing.tRunner()
/usr/local/go/src/testing/testing.go:909 +0x199
testing.runTests()
/usr/local/go/src/testing/testing.go:1200 +0x521
testing.(*M).Run()
/usr/local/go/src/testing/testing.go:1117 +0x2ff
main.main()
_testmain.go:112 +0x223
Goroutine 90 (finished) created at:
github.com/xtaci/gaio.TestReadFull()
/home/go/gaio/aio_test.go:408 +0x438
testing.tRunner()
/usr/local/go/src/testing/testing.go:909 +0x199
==================
2020/02/17 16:56:51 accept tcp 127.0.0.1:37621: use of closed network connection
--- FAIL: TestReadFull (1.49s)
aio_test.go:437: written: <nil> 104857600
aio_test.go:439: read: <nil> 104857600
testing.go:853: race detected during execution of test
2020/02/17 16:56:51 watcher closed
2020/02/17 16:56:52 accept tcp 127.0.0.1:37807: use of closed network connection
2020/02/17 16:56:52 watcher closed
2020/02/17 16:56:52 accept tcp 127.0.0.1:41224: use of closed network connection
2020/02/17 16:56:52 watcher closed
2020/02/17 16:56:52 accept tcp 127.0.0.1:39491: use of closed network connection
2020/02/17 16:56:52 watcher closed
2020/02/17 16:56:53 accept tcp 127.0.0.1:45587: use of closed network connection
2020/02/17 16:56:53 watcher closed
2020/02/17 16:56:53 accept tcp 127.0.0.1:33780: use of closed network connection
2020/02/17 16:56:53 watcher closed
2020/02/17 16:56:54 accept tcp 127.0.0.1:40090: use of closed network connection
2020/02/17 16:56:54 watcher closed
2020/02/17 16:56:56 accept tcp 127.0.0.1:39469: use of closed network connection
2020/02/17 16:56:56 watcher closed
2020/02/17 16:56:58 accept tcp 127.0.0.1:39311: use of closed network connection
2020/02/17 16:56:58 watcher closed
2020/02/17 16:56:58 accept tcp 127.0.0.1:42949: use of closed network connection
2020/02/17 16:56:58 watcher closed
2020/02/17 16:56:58 accept tcp 127.0.0.1:45309: use of closed network connection
2020/02/17 16:56:58 watcher closed
2020/02/17 16:56:59 accept tcp 127.0.0.1:36619: use of closed network connection
2020/02/17 16:56:59 watcher closed
2020/02/17 16:57:01 accept tcp 127.0.0.1:39795: use of closed network connection
2020/02/17 16:57:01 watcher closed
2020/02/17 16:57:02 accept tcp 127.0.0.1:45845: use of closed network connection
2020/02/17 16:57:02 watcher closed
2020/02/17 16:57:03 accept tcp 127.0.0.1:37195: use of closed network connection
2020/02/17 16:57:03 watcher closed
2020/02/17 16:57:05 accept tcp 127.0.0.1:45655: use of closed network connection
2020/02/17 16:57:05 watcher closed
2020/02/17 16:57:06 accept tcp 127.0.0.1:43165: use of closed network connection
2020/02/17 16:57:06 watcher closed
2020/02/17 16:57:08 accept tcp 127.0.0.1:33451: use of closed network connection
2020/02/17 16:57:08 watcher closed
FAIL
FAIL github.com/xtaci/gaio 23.326s
FAIL
root@198.255.24.42[16:57:09]:gaio
$
fixed
thanks !