-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fixes #9784: fix concurrency issue with a shared_ptr #9828
Conversation
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Hmm, test failures look weird -- malloc failures in clang and ld processes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the original code has any problem. It could be the false positive of TSAN
If this PR doesn't work, we can disable this test in TSAN
I patched in the change and it does not seem to help. I am reproing with:
WIthout this change it failed 98/100 times. With this change, it failed 97/100 times. I suspect that when you are not running concurrently on a single machine it works pretty often (passed for me 3x in a row, taking ~18 seconds each), but something about the timing in a multi-run case causes problems. Why do we think this might be a tsan false positive? I've been using tsan quite a while and can't think of a case where it warned about something that was not a real problem. |
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
I'm copying shared_ptr explicitly here and then use that to create a weak_ptr, also explicitly. I do not see any concurrency issues when building under gcc, @jmarantz could you give this another try? |
You are not able to repro with the instructions I gave? Or are you not using Linux/clang? |
@jmarantz: I'm on linux/gcc and not seeing the failures you described. |
Dmitri, to clarify, when you say "I am not seeing the failures you describe", do you mean you ran the exact command I gave to repro and it passed 100/100 times? Are did you have to change the command to run a command that works in gcc to test it? is it possible for you to install clang on your system to test the exact repro I gave? |
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
@jmarantz, apologies, just saw your comment.
Yes, the test suite passes 100/100 when built/executed under gcc using the exact command you gave.
Not at the moment, dealing with various Maistra release issues, which is built under gcc. Changing the build system would throw a wrench into that. |
Can you run this under clang though? I don't think gcc could process Also can you merge master? |
/wait |
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Hi @dmitri-d -- are you going to be able to get the chance to pick this up and repro with clang? |
Hey @jmarantz, nods, I will try to reproduce this with clang, I might get a chance next week. Was pretty busy with ServiceMesh release... |
Hmm. I'm not sure what's going on here. A race is reported here: https://github.com/envoyproxy/envoy/blob/master/source/common/router/rds_impl.cc#L303 when
The previous read from another thread was here:
when the |
ping |
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
fixes #9784
@jmarantz: could you give this a try when you get a chance?