Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/15673 )
Change subject: IMPALA-9612: Fix race condition in RuntimeFilter::WaitForArrival ...................................................................... Patch Set 2: > Patch Set 2: > > I should've asked first time, but were you able to reproduce this at all? > It'd be good to confirm that it doesn't reproduce after the fix. > > Ideally we would add a regression test, but I understand that the regression > test may not be feasible with reasonable effort - I didn't see an obvious way > to do it without special tooling to force the timing, but maybe you have some > ideas. My first thought is running model checking, but that might be overkill. We can do simpler by running two threads. Thread A call RuntimeFilter::WaitForArrival(X). Thread B call RuntimeFilter::Cancel(), runs slightly after thread A. We force the race by injecting small delay within WaitForArrival() loop so that Cancel() signal arrival_cv_ before WaitForArrival() arrived at line arrival_cv_.WaitFor(). Racy execution will see test duration >= X ms. I can reproduce the long waiting bug this way. Question is, how to correctly inject the time delay so that it only happen in test and not in production? -- To view, visit http://gerrit.cloudera.org:8080/15673 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7dffa626103ef0af06ad1e89231b0d2ee54bb94a Gerrit-Change-Number: 15673 Gerrit-PatchSet: 2 Gerrit-Owner: Riza Suminto <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Comment-Date: Wed, 08 Apr 2020 02:48:39 +0000 Gerrit-HasComments: No
