You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2022/03/18 23:31:55 UTC

[impala] 02/02: IMPALA-11193: Fix assertion failure of ClientCacheTest.MemLeak in CentOS

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

stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 1739edf2d97009062cb339a3c276f01dbd4d33bd
Author: Yida Wu <wy...@gmail.com>
AuthorDate: Thu Mar 17 12:40:13 2022 -0700

    IMPALA-11193: Fix assertion failure of ClientCacheTest.MemLeak in CentOS
    
    The assertion failure happens in CentOS because the testcase
    reads the virtual memory usage of the current thread from
    /proc/thread-self. However, CentOS may not contain this symlink,
    therefore the testcase is not able to locate the path and
    then triggers the assertion.
    
    This fix changes the path to /proc/self, which is a symlink to the
    current process and available in CentOS. Because the testcase
    doesn't involve multithreading, it is okay to replace the
    /proc/thread-self by /proc/self to detect the memory usage.
    
    Tests:
    Passed core tests in CentOS.
    
    Change-Id: I045e91aa9b7d8e1b731e3261f0f18cc932c16f43
    Reviewed-on: http://gerrit.cloudera.org:8080/18332
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 be/src/runtime/client-cache-test.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/runtime/client-cache-test.cc b/be/src/runtime/client-cache-test.cc
index 22f54ed..dbfce83 100644
--- a/be/src/runtime/client-cache-test.cc
+++ b/be/src/runtime/client-cache-test.cc
@@ -70,7 +70,7 @@ class ClientCacheTest : public testing::Test {
   uint64_t GetProcessVMSize() {
     // vm size, https://man7.org/linux/man-pages/man5/proc.5.html
     const int vm_size_pos = 22;
-    ifstream stream("/proc/thread-self/stat");
+    ifstream stream("/proc/self/stat");
     string line;
     string space_delimiter = " ";
     vector<string> words{};