Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data race in hystrix client #137

Open
ysuliu opened this issue Apr 12, 2023 · 1 comment
Open

data race in hystrix client #137

ysuliu opened this issue Apr 12, 2023 · 1 comment

Comments

@ysuliu
Copy link

ysuliu commented Apr 12, 2023

We are facing the data race error using the latest code. After checking the history, you have recognized the same issue and proposed the fix in heimdall/pull/67. I have no idea why the fix hadn't been merged.

We can easily reproduce the error just by:
1, copy the unit test from test case to the latest code base.
2, run this test using "go test -race" several times

Note that, sometimes this is very easy to be reproduced (just run go test 3-5 rounds). But I also faced the case that I run about 20 rounds to get it reproduced.

==================
WARNING: DATA RACE
Write at 0x00c000191650 by goroutine 299:
  github.com/gojek/heimdall/v7/hystrix.(*Client).Do()
      /home/allen/src/go/src/gojek/heimdall/v7/hystrix/hystrix_client.go:189 +0x6b8
  github.com/gojek/heimdall/v7/hystrix.(*Client).Get()
      /home/allen/src/go/src/gojek/heimdall/v7/hystrix/hystrix_client.go:113 +0xe4
......

Previous write at 0x00c000191650 by goroutine 11006:
  github.com/gojek/heimdall/v7/hystrix.(*Client).Do.func1()
      /home/allen/src/go/src/gojek/heimdall/v7/hystrix/hystrix_client.go:190 +0xb6
  github.com/afex/hystrix-go/hystrix.Do.func1()
      /home/allen/src/go/src/github.com/afex/hystrix-go/hystrix/hystrix.go:204 +0x30
  github.com/afex/hystrix-go/hystrix.DoC.func1()
      /home/allen/src/go/src/github.com/afex/hystrix-go/hystrix/hystrix.go:221 +0x51
......

Could you please help to evaluate the issue and provide a fix?
Thanks!

@gwthm-in
Copy link
Collaborator

gwthm-in commented Apr 5, 2024

#67 (comment)

As this is fixed, can we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants