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

Potential data race in json.Register #908

Open
MichaelSnowden opened this issue Nov 16, 2023 · 1 comment
Open

Potential data race in json.Register #908

MichaelSnowden opened this issue Nov 16, 2023 · 1 comment

Comments

@MichaelSnowden
Copy link

Hello, we had a data race in Temporal's fork of tchannel-go here: temporalio/temporal#5123. I think I found the culprit in json.Register: temporalio/temporal#5123 (comment). I can open a PR here similar to temporalio#7 if y'all are interested.

@prashantv
Copy link
Contributor

Registration should happen before the channel is listening or serving at all.

While this may hide the race when registering multiple JSON methods, it doesn't help across separate register methods (e.g., if register is called separately).

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