-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Execution context sanitizer #5474
Conversation
Very nice! I would definitely like to kick the tires on this. |
I just want to clarify: Issue #5432 suggested adding a random delay. This PR achieves some amount of decoupling and randomization by using threads for each callback but doesn't explicitly delay events. I don't know if that additional step is worth it, but it may be worth considering as well if the current paths aren't enough to shake out the sorts of timing assumptions. But that's yet another knob to turn (probably 2 knobs - one to set the frequency of perturbation and one to set a delay parameter). |
Yeah. I did an experiment adding a usleep(rand()) to the spawned thread and On Mon, Feb 29, 2016 at 8:39 AM Vijay Pai notifications@github.com wrote:
|
Also: one way to think about this is that the kernel scheduler adds some On Mon, Feb 29, 2016 at 8:46 AM Craig Tiller ctiller@google.com wrote:
|
Also also: it'd be good to get this in pre-code freeze I suspect, as it'll On Mon, Feb 29, 2016 at 8:46 AM Craig Tiller ctiller@google.com wrote:
|
Yes, I was thinking that also wrt code freeze. On Mon, Feb 29, 2016 at 8:48 AM Craig Tiller notifications@github.com
|
LGTM for both code and results. The number of failures that this yields is beautiful. This is showing up races that I'm pretty sure we've never seen before. We need this in. If you do the clang-format and re-merge with master, I'll do a final review and merge before the freeze. |
Wait, one second. The configuration edbg sees an error. Looks like a clang vs gcc thing: test/core/util/port_posix.c: In function ‘free_port_using_server’: |
I'm unlikely to get to a keyboard before 8-9pm. It'll either be a late On Mon, Feb 29, 2016, 3:34 PM Vijay Pai notifications@github.com wrote:
|
"I can send you a PR on your PR" - vjpai. Nope. I don't have write access to your repo, but the change is simple; just fill in the number 0 between the open and close braces of GRPC_EXEC_CTX_INIT and all is well. |
You can still send a PR, but let's hold submitting this this week. It's easy to patch in for investigative purposes, and I'd like to scrub some of the lower hanging fruit out first. |
That's fine, but I will keep using it to find flakes! |
LGTM |
Suspiciously lots of test have failed on mac opt with this build: https://grpc-testing.appspot.com/job/gRPC_pull_requests/6846/ Let's take another look. |
LGTM. |
@jtattermusch @nicolasnoble - ready to merge? |
Execution context sanitizer
Shows up a bunch of bugs. C tests currently suffer from some dodgy pollset usage; C++ tests are gtg though it seems.
Fixes #5432.
Basic approach: for each grpc_exec_ctx_enqueue, spawn a new thread to execute the associate closure.
Configs made available: etsan, easan, and edbg - extending the associated previous configs with this new internal thread scheme.