Comments (2)
just in go 1.14 version:
fail info:
==================
WARNING: DATA RACE
Read at 0x00c0000ab188 by goroutine 9:
github.com/douyu/jupiter/pkg/util/xtime.(*rashTimer).newTimer()
/home/travis/gopath/src/github.com/douyu/jupiter/pkg/util/xtime/rash_timer.go:293 +0x74
github.com/douyu/jupiter/pkg/util/xtime.(*rashTimer).NewTimer()
/home/travis/gopath/src/github.com/douyu/jupiter/pkg/util/xtime/rash_timer.go:377 +0xa7
github.com/douyu/jupiter/pkg/util/xtime.TestTimer()
/home/travis/gopath/src/github.com/douyu/jupiter/pkg/util/xtime/rash_timer_test.go:26 +0x52
testing.tRunner()
/home/travis/.gimme/versions/go1.14.4.linux.amd64/src/testing/testing.go:991 +0x1eb
Previous write at 0x00c0000ab188 by goroutine 10:
github.com/douyu/jupiter/pkg/util/xtime.(*rashTimer).onTick()
/home/travis/gopath/src/github.com/douyu/jupiter/pkg/util/xtime/rash_timer.go:234 +0x114
github.com/douyu/jupiter/pkg/util/xtime.(*rashTimer).run()
/home/travis/gopath/src/github.com/douyu/jupiter/pkg/util/xtime/rash_timer.go:311 +0xf0
Goroutine 9 (running) created at:
testing.(*T).Run()
/home/travis/.gimme/versions/go1.14.4.linux.amd64/src/testing/testing.go:1042 +0x660
testing.runTests.func1()
/home/travis/.gimme/versions/go1.14.4.linux.amd64/src/testing/testing.go:1284 +0xa6
testing.tRunner()
/home/travis/.gimme/versions/go1.14.4.linux.amd64/src/testing/testing.go:991 +0x1eb
testing.runTests()
/home/travis/.gimme/versions/go1.14.4.linux.amd64/src/testing/testing.go:1282 +0x527
testing.(*M).Run()
/home/travis/.gimme/versions/go1.14.4.linux.amd64/src/testing/testing.go:1199 +0x2ff
main.main()
_testmain.go:132 +0x337
Goroutine 10 (running) created at:
github.com/douyu/jupiter/pkg/util/xtime.NewRashTimer()
/home/travis/gopath/src/github.com/douyu/jupiter/pkg/util/xtime/rash_timer.go:164 +0x3b0
github.com/douyu/jupiter/pkg/util/xtime.TestTimer()
/home/travis/gopath/src/github.com/douyu/jupiter/pkg/util/xtime/rash_timer_test.go:25 +0x3b
testing.tRunner()
/home/travis/.gimme/versions/go1.14.4.linux.amd64/src/testing/testing.go:991 +0x1eb
==================
TestTimer: testing.go:906: race detected during execution of test
--- FAIL: TestTimer (0.51s)
from jupiter.
奇怪的是在本地又没有复现出来
$-> go version
go version go1.14.4 darwin/amd64
$-> go test -v -race pkg/util/xtime/rash_timer_test.go pkg/util/xtime/rash_timer.go
=== RUN TestTimer
--- PASS: TestTimer (0.50s)
PASS
ok command-line-arguments 0.730s
from jupiter.
Related Issues (20)
- feat: refactor jupiter new like gonew HOT 1
- 一些关于官网文档的小意见
- Go install toolkit ERROR? How to fix it? HOT 2
- feat: support sentinel for server and client HOT 1
- Bug:panic of variable "span" rocketmq PushConsumer when EnableTrace is not set. HOT 1
- feat: support convert protobuf enum to error HOT 1
- feat: support clickhouse client HOT 1
- release: v0.9.11 HOT 1
- feat: support table store client HOT 1
- feat: support auto complete for rocketmq addr config
- "Unable to locate build via Github Actions API" for the public repository HOT 3
- feat(cmd): support generate echo route based on protobuf HOT 1
- feat: all client Intruction support Must(Build/Singleton) API based on lo.Must. HOT 1
- feat: support release protoc-gen-go-echo/gin/xerror HOT 1
- opti: RestrictParallel execution optimization HOT 1
- config.toml不知道怎么用
- create方法传入slice报Error: reflect: call of reflect.Value.Interface on zero Value HOT 4
- feat: use docker instead of request httpbin directly HOT 1
- feat: log support change level dynamically HOT 7
- where is deployment/docker-compose.yml ? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jupiter.