You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2019/02/16 22:16:21 UTC

[kudu] 05/05: log_block_manager: fix invalid pointer

This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch branch-1.9.x
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 8f16041589d912e4fe138b780ed722efb71083f8
Author: Andrew Wong <aw...@cloudera.com>
AuthorDate: Wed Feb 13 15:15:37 2019 -0800

    log_block_manager: fix invalid pointer
    
    We saw a core dump after enabling VLOGing caused by an invalid pointer
    during OpenBlock(). We seem to be dereferencing a block that has been
    moved already.
    
    Change-Id: Ic6567f43a30c74abc4fcf677671737035e845c1a
    Reviewed-on: http://gerrit.cloudera.org:8080/12477
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Reviewed-by: Hao Hao <ha...@cloudera.com>
    Tested-by: Kudu Jenkins
    (cherry picked from commit 57f0dae3678b7514d1fcf9231f21930287ac3e13)
    Reviewed-on: http://gerrit.cloudera.org:8080/12510
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
    Tested-by: Grant Henke <gr...@apache.org>
---
 src/kudu/fs/log_block_manager.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kudu/fs/log_block_manager.cc b/src/kudu/fs/log_block_manager.cc
index 52effeb..7692050 100644
--- a/src/kudu/fs/log_block_manager.cc
+++ b/src/kudu/fs/log_block_manager.cc
@@ -2060,7 +2060,7 @@ Status LogBlockManager::OpenBlock(const BlockId& block_id,
     return Status::NotFound("Can't find block", block_id.ToString());
   }
 
-  VLOG(3) << "Opened block " << (*block)->id()
+  VLOG(3) << "Opened block " << block_id
           << " from container " << lb->container()->ToString();
   block->reset(new internal::LogReadableBlock(std::move(lb)));
   return Status::OK();