You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Tim Armstrong (Code Review)" <ge...@cloudera.org> on 2017/03/02 17:19:33 UTC
[Impala-ASF-CR] IMPALA-4946: fix hang in BufferPool
Tim Armstrong has uploaded a new change for review.
http://gerrit.cloudera.org:8080/6224
Change subject: IMPALA-4946: fix hang in BufferPool
......................................................................
IMPALA-4946: fix hang in BufferPool
Once the write is removed from the "in flight" list,
both the Client and Page may be destroyed by a different
thread. The fix is to signal condition variables before
inside the critical section that removes the write from
the in flight list.
Also fix a potential pitfall with DiskIoMgr::CancelContext()
where concurrent calls to the method, which can be called
asynchronously with other methods, could result in a hang in
DiskIoMgr::CancelContext(). I do not believe any Impala code
calls it concurrently from multiple threads, so the bug was
only latent.
Testing:
I was able to reproduce reliably by inserting a 1s sleep before
the NotifyAll() calls. After the fix, the hang didn't reproduce
with sleeps inside or outside the critical section.
I could not come up with a unit test that had a higher reproduction
rate than the current tests - the window for the race is very small.
I considered adding a debug stress option to insert these delays,
but with all the code moved into the critical section it wouldn't
be useful.
Change-Id: I13fc95b5a664544dee789c4107fccf81d2077347
---
M be/src/runtime/bufferpool/buffer-pool.cc
M be/src/runtime/disk-io-mgr-internal.h
2 files changed, 5 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/24/6224/1
--
To view, visit http://gerrit.cloudera.org:8080/6224
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I13fc95b5a664544dee789c4107fccf81d2077347
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
[Impala-ASF-CR] IMPALA-4946: fix hang in BufferPool
Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change.
Change subject: IMPALA-4946: fix hang in BufferPool
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/6224/1//COMMIT_MSG
Commit Message:
PS1, Line 11: before
remove
--
To view, visit http://gerrit.cloudera.org:8080/6224
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I13fc95b5a664544dee789c4107fccf81d2077347
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-4946: fix hang in BufferPool
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.
Change subject: IMPALA-4946: fix hang in BufferPool
......................................................................
Patch Set 1:
Build started: http://jenkins.impala.io:8080/job/gerrit-verify-dryrun/333/
--
To view, visit http://gerrit.cloudera.org:8080/6224
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I13fc95b5a664544dee789c4107fccf81d2077347
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dh...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-4946: fix hang in BufferPool
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.
Change subject: IMPALA-4946: fix hang in BufferPool
......................................................................
Patch Set 1: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/6224
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I13fc95b5a664544dee789c4107fccf81d2077347
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dh...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-4946: fix hang in BufferPool
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged.
Change subject: IMPALA-4946: fix hang in BufferPool
......................................................................
IMPALA-4946: fix hang in BufferPool
Once the write is removed from the "in flight" list,
both the Client and Page may be destroyed by a different
thread. The fix is to signal condition variables before
inside the critical section that removes the write from
the in flight list.
Also fix a potential pitfall with DiskIoMgr::CancelContext()
where concurrent calls to the method, which can be called
asynchronously with other methods, could result in a hang in
DiskIoMgr::CancelContext(). I do not believe any Impala code
calls it concurrently from multiple threads, so the bug was
only latent.
Testing:
I was able to reproduce reliably by inserting a 1s sleep before
the NotifyAll() calls. After the fix, the hang didn't reproduce
with sleeps inside or outside the critical section.
I could not come up with a unit test that had a higher reproduction
rate than the current tests - the window for the race is very small.
I considered adding a debug stress option to insert these delays,
but with all the code moved into the critical section it wouldn't
be useful.
Change-Id: I13fc95b5a664544dee789c4107fccf81d2077347
Reviewed-on: http://gerrit.cloudera.org:8080/6224
Reviewed-by: Dan Hecht <dh...@cloudera.com>
Tested-by: Impala Public Jenkins
---
M be/src/runtime/bufferpool/buffer-pool.cc
M be/src/runtime/disk-io-mgr-internal.h
2 files changed, 5 insertions(+), 3 deletions(-)
Approvals:
Impala Public Jenkins: Verified
Dan Hecht: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/6224
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I13fc95b5a664544dee789c4107fccf81d2077347
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dh...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
[Impala-ASF-CR] IMPALA-4946: fix hang in BufferPool
Posted by "Dan Hecht (Code Review)" <ge...@cloudera.org>.
Dan Hecht has posted comments on this change.
Change subject: IMPALA-4946: fix hang in BufferPool
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/6224
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I13fc95b5a664544dee789c4107fccf81d2077347
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dh...@cloudera.com>
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No