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 release 1.1.11 #336

Closed
hansgylling opened this issue Oct 13, 2020 · 2 comments
Closed

Data race in release 1.1.11 #336

hansgylling opened this issue Oct 13, 2020 · 2 comments

Comments

@hansgylling
Copy link

We are using the msgpack part of this project and when I updated to 1.1.11 and ran our tests several data race errors were detected, see the attached file for stack traces. This error never happened with 1.1.10 and happens every time I'm running our tests with 1.1.11.
msg_pack_data_race.txt

@ugorji
Copy link
Owner

ugorji commented Oct 14, 2020

taking a look now

@ugorji
Copy link
Owner

ugorji commented Oct 14, 2020

Thanks. I have identified the issue. I will send out a fix. Please test it out and let me know that it fixes your issue, and I will cut a new release soon after I hear from you.

@ugorji ugorji closed this as completed in 3cd9872 Oct 14, 2020
myusuf3 pushed a commit to agilebits/go-codec that referenced this issue Dec 4, 2020
…erlying array is modified

This is why previous code was appending one element at a time in a newly created array.

Revert to same, as it worked pre-v1.1.11.

This is ok, as we are building a cache that is built once and used many times i.e. read-mostly.

Unfortunately, go test -race didn't catch this.

Fixes ugorji#336
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