-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Intermittent DATA RACE error when creating MySQL Servers #562
Comments
@Echelons Can you give some more details on the types of tests you are running? Any code that you can link too? |
@VinaiRachakonda the code is on a private github repo and therefore unavailable |
At first glance it would seem that the server is reusing the memory allocated to handle bindvars in another request. We'll see if we can reproduce this on our end. |
From a brief read through the vitess code that controls read and writing packets, it looks like this code is just wrong. It uses a buffer pool, and immediately after reading the values of the bind vars from the wire, it recycles the byte buffer, returning it to the pool to be used for other connections: case ComStmtExecute:
queryStart := time.Now()
stmtID, _, err := c.parseComStmtExecute(c.PrepareData, data)
c.recycleReadPacket() I'm not sure yet where the reuse of the buffer is coming from, though. Still looking into it. |
Apologies for the lack fo response, we ended up going with another solution. |
Sorry to hear you couldn't get it to work! Keeping this open since the bug appears to be real. |
Got into this issue as well. Are you have any plan to address this issue @zachmu ? |
Have also hit this |
We believe this is fixed on main, caused by inappropriate reuse of MySQL connection buffer slices. Please open a new issue if you run into it again. |
We use the in-memory implementation provided during our tests and recently we've seen intermittent data race failures. Since they only happen on occasion they are annoying to debug because the entire stack trace is in this library, we thought you may be able to help.
These errors appear while running our tests with the std library testing library and asserts with the testify library.
The text was updated successfully, but these errors were encountered: