impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharath Vissapragada (Code Review)" <>
Subject [Impala-CR](cdh5-2.2.0_5.4.x) IMPALA-1702: Fix crash when IMPALA-1702 hit even with workaround patch
Date Tue, 01 Mar 2016 02:08:57 GMT
Hello Juan Yu, Internal Jenkins, Skye Wanderman-Milne,

I'd like you to reexamine a change.  Please visit

to look at the new patch set (#2).

Change subject: IMPALA-1702: Fix crash when IMPALA-1702 hit even with workaround patch

IMPALA-1702: Fix crash when IMPALA-1702 hit even with workaround patch

IMPALA-1702 results in bad partition indexes. This would cause Impala to crash as the
partition descriptor object for that index would be NULL, and Impala would happily try to
dereference it.

To provide a workaround, we added a patch which would not DCHECK, but would gracefully
return when this condition was detected. However, the graceful exit wasn't extended to
HdfsScanNode::Close(), which is called after Prepare() even if Prepare() failed.

This patch fixes the issue by ensuring that Close() also gracefully

To defensively protect against the situation where it may not be safe
to Close() an ExprContext that hasn't been Prepare()'d, this patch adds
a guard to HdfsPartitionDescriptor::CloseExprs() to ensure that only
Prepare()'d exprs are Close()'d. This is necessary in this patch for the
same reasons as the crash above: the scan node may Close() after an
unsuccessful Prepare().

IMPALA-2156 is related, as some of this defensive code would be easier
if the lifecycle of exprs was better specified.

Testing was manual, by editing the partition metadata to inject bad partition indexes.

Change-Id: I3d5a20871ab83dfa2d6aae85ca6610ddee93daac
Reviewed-by: Skye Wanderman-Milne <>
Tested-by: Internal Jenkins
(cherry picked from commit 154830d919bc972ccad49628ab2c6d99addc8dfd)
(cherry picked from commit d457860aa4f5f3c8116dac85301890948d8cb3b7)
M be/src/exec/
M be/src/runtime/
2 files changed, 9 insertions(+), 4 deletions(-)

  git pull ssh:// refs/changes/50/2350/2
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3d5a20871ab83dfa2d6aae85ca6610ddee93daac
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-2.2.0_5.4.x
Gerrit-Owner: Bharath Vissapragada <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Juan Yu <>
Gerrit-Reviewer: Skye Wanderman-Milne <>

View raw message