You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2020/08/13 02:22:52 UTC

[impala] branch master updated (3e77650 -> 8addf43)

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

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


    from 3e77650  IMPALA-10029: Strip debug symbols from libkudu_client and libstdc++ binaries
     new d45aac5  IMPALA-9676 Add aarch64 compile options for clang
     new b8c6134  IMPALA-9904 Fix bad cipher test failed case on aarch64
     new 6f2a1d0  IMPALA-9906 Fix thread-pool-test failed case on aarch64
     new 1ef1278  IMPALA-9925 cast(pow(2, 31) as int) return 2147483647 on aarch64
     new c5d9016  IMPALA-9926  base64decode % will not return  error when in newer OS
     new 8addf43  IMPALA-9995 Fix test_alloc_fail failed case on aarch64

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 be/CMakeLists.txt                                            |  6 +++++-
 be/src/exprs/expr-test.cc                                    |  9 +++++++++
 be/src/rpc/rpc-mgr-test.cc                                   |  2 ++
 be/src/rpc/thrift-server-test.cc                             |  9 ++++++---
 be/src/util/thread-pool-test.cc                              | 12 +++++++++---
 be/src/util/webserver-test.cc                                |  4 ++--
 .../functional-query/queries/QueryTest/alloc-fail-init.test  |  2 +-
 .../workloads/functional-query/queries/QueryTest/exprs.test  |  8 +++-----
 8 files changed, 37 insertions(+), 15 deletions(-)


[impala] 01/06: IMPALA-9676 Add aarch64 compile options for clang

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d45aac59d9b6e4ce6bf6934b5a98c6fed6c5ad6b
Author: zhaorenhai <zh...@hotmail.com>
AuthorDate: Sun Apr 19 21:07:36 2020 +0800

    IMPALA-9676 Add aarch64 compile options for clang
    
    Add signed-char and armv8a and crc compile options to clang
    
    Change-Id: I69a5ff64bbd4427dd87ec6e884251e76d6a73122
    Reviewed-on: http://gerrit.cloudera.org:8080/15755
    Reviewed-by: Tim Armstrong <ta...@cloudera.com>
    Tested-by: Tim Armstrong <ta...@cloudera.com>
---
 be/CMakeLists.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index f87e7d0..071f9fc 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -79,6 +79,10 @@ SET(CXX_COVERAGE_FLAGS "-fprofile-arcs -ftest-coverage -DCODE_COVERAGE_ENABLED")
 #        destructors with 'override' which is enforced by clang by not recommended by c++
 #        core guidelines (read C.128).
 SET(CXX_CLANG_FLAGS "-Qunused-arguments -fcolor-diagnostics -Wno-unused-local-typedef")
+SET(CXX_CLANG_FLAGS "${CXX_CLANG_FLAGS} -fsigned-char")
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+  SET(CXX_CLANG_FLAGS "${CXX_CLANG_FLAGS} -march=armv8-a+crc")
+endif()
 SET(CXX_CLANG_FLAGS "${CXX_CLANG_FLAGS} -Wno-zero-as-null-pointer-constant")
 SET(CXX_CLANG_FLAGS "${CXX_CLANG_FLAGS} -Wno-c++17-extensions")
 SET(CXX_CLANG_FLAGS "${CXX_CLANG_FLAGS} -Wno-inconsistent-missing-destructor-override")
@@ -232,7 +236,7 @@ add_definitions(-DKUDU_HEADERS_USE_RICH_SLICE -DKUDU_HEADERS_NO_STUBS)
 set(CLANG_IR_CXX_FLAGS "-emit-llvm" "-c" "-std=c++14" "-DIR_COMPILE" "-DHAVE_INTTYPES_H"
   "-DHAVE_NETINET_IN_H" "-DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG" "-DBOOST_NO_EXCEPTIONS"
   "-DKUDU_HEADERS_NO_STUBS" "-fcolor-diagnostics" "-Wno-deprecated"
-  "-Wno-return-type-c-linkage" "-O1")
+  "-Wno-return-type-c-linkage" "-fsigned-char" "-O1")
 
 if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
   set(CLANG_IR_CXX_FLAGS "${CLANG_IR_CXX_FLAGS}" "-DCACHELINESIZE_AARCH64=${CACHELINESIZE_AARCH64}")


[impala] 04/06: IMPALA-9925 cast(pow(2, 31) as int) return 2147483647 on aarch64

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1ef12788a4214bc748a62fc4ddea59177595b21b
Author: zhaorenhai <zh...@hotmail.com>
AuthorDate: Sat Jul 11 14:12:43 2020 +0800

    IMPALA-9925 cast(pow(2, 31) as int) return 2147483647 on aarch64
    
    cast(pow(2, 31) as int) return 2147483647 on aarch64
    but return 2147483648 on x86
    I think aarch64 is correct.
    So here I will not convert it, just use aarch64's value
    
    Change-Id: I58ab52acebb9bcddbf298efa886fd30ce35f68bf
    Reviewed-on: http://gerrit.cloudera.org:8080/16174
    Reviewed-by: Tim Armstrong <ta...@cloudera.com>
    Tested-by: Tim Armstrong <ta...@cloudera.com>
---
 be/src/exprs/expr-test.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/be/src/exprs/expr-test.cc b/be/src/exprs/expr-test.cc
index b84382a..844e326 100644
--- a/be/src/exprs/expr-test.cc
+++ b/be/src/exprs/expr-test.cc
@@ -5806,8 +5806,13 @@ TEST_P(ExprTest, MathFunctions) {
   TestValue("abs(-32768)", TYPE_INT, 32768);
   TestValue("abs(32767)", TYPE_INT, 32767);
   TestValue("abs(32768)", TYPE_BIGINT, 32768);
+#ifndef __aarch64__
   TestValue("abs(-1 * cast(pow(2, 31) as int))", TYPE_BIGINT, 2147483648);
   TestValue("abs(cast(pow(2, 31) as int))", TYPE_BIGINT, 2147483648);
+#else
+  TestValue("abs(-1 * cast(pow(2, 31) as int))", TYPE_BIGINT, 2147483647);
+  TestValue("abs(cast(pow(2, 31) as int))", TYPE_BIGINT, 2147483647);
+#endif
   TestValue("abs(2147483647)", TYPE_BIGINT, 2147483647);
   TestValue("abs(2147483647)", TYPE_BIGINT, 2147483647);
   TestValue("abs(-9223372036854775807)", TYPE_BIGINT,  9223372036854775807);


[impala] 03/06: IMPALA-9906 Fix thread-pool-test failed case on aarch64

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6f2a1d0a6257fcf0401178b0b4e5faf1463f99bc
Author: zhaorenhai <zh...@hotmail.com>
AuthorDate: Mon Jun 29 20:07:38 2020 +0800

    IMPALA-9906 Fix thread-pool-test failed case on aarch64
    
    Threads switch frequency is not so fast as x86.
    So here change the sleep task time from 100ms to 500ms
    
    Change-Id: I7b353f7eb9662995d9a8ae460bb1631933873d5d
    Reviewed-on: http://gerrit.cloudera.org:8080/16173
    Reviewed-by: Tim Armstrong <ta...@cloudera.com>
    Tested-by: Tim Armstrong <ta...@cloudera.com>
---
 be/src/util/thread-pool-test.cc | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/be/src/util/thread-pool-test.cc b/be/src/util/thread-pool-test.cc
index f20e3ed..1ac3fe1 100644
--- a/be/src/util/thread-pool-test.cc
+++ b/be/src/util/thread-pool-test.cc
@@ -127,11 +127,17 @@ TEST(ThreadPoolTest, SynchronousThreadPoolTimeouts) {
   SynchronousThreadPool pool("sync-thread-pool", "worker", 1, 1);
   ASSERT_OK(pool.Init());
 
-  // Timeout case #1: Submit one task that takes 100 milliseconds. Offer it with a timeout
-  // of 1 millisecond so that the caller immediately times out.
+  // Timeout case #1: Submit one task that takes 100 milliseconds(500 milliseconds on
+  // aarch64). Offer it with a timeout of 1 millisecond so that the caller immediately
+  // times out.
   unique_ptr<bool> long_sleep_destroyed(new bool);
+#ifndef __aarch64__
+  int sleepMilliseconds = 100;
+#else
+  int sleepMilliseconds = 500;
+#endif
   std::shared_ptr<SleepWorkItem> long_sleep(
-      new SleepWorkItem(100, long_sleep_destroyed.get()));
+      new SleepWorkItem(sleepMilliseconds, long_sleep_destroyed.get()));
   Status timeout_status = pool.SynchronousOffer(long_sleep, 1);
   ASSERT_EQ(timeout_status.code(), TErrorCode::THREAD_POOL_TASK_TIMED_OUT);
   // The work item is still running, and even if the caller releases its shared_ptr,


[impala] 06/06: IMPALA-9995 Fix test_alloc_fail failed case on aarch64

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8addf4300be33c57b79580d879c08316a47e3f90
Author: zhaorenhai <zh...@hotmail.com>
AuthorDate: Thu Jul 23 19:29:44 2020 +0800

    IMPALA-9995 Fix test_alloc_fail failed case on aarch64
    
    Length of Json object '{"a": 1}", '$.a' is 32 bytes on x86,
    but is 48 bytes on aarch64
    
    Change-Id: I9a5a4ba19b225bdb4f18a68d6d9cb2c2d16f91fd
    Reviewed-on: http://gerrit.cloudera.org:8080/16307
    Tested-by: Tim Armstrong <ta...@cloudera.com>
    Reviewed-by: Tim Armstrong <ta...@cloudera.com>
---
 .../workloads/functional-query/queries/QueryTest/alloc-fail-init.test   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testdata/workloads/functional-query/queries/QueryTest/alloc-fail-init.test b/testdata/workloads/functional-query/queries/QueryTest/alloc-fail-init.test
index 13249e9..c6d17b5 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/alloc-fail-init.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/alloc-fail-init.test
@@ -68,5 +68,5 @@ FunctionContextImpl::AllocateForResults() failed to allocate 10 bytes.
 ---- QUERY
 select get_json_object('{"a": 1}', '$.a')
 ---- CATCH
-FunctionContextImpl::AllocateForResults() failed to allocate 32 bytes
+row_regex:(.*)FunctionContextImpl::AllocateForResults\(\) failed to allocate (32|48) bytes
 ====


[impala] 05/06: IMPALA-9926 base64decode % will not return error when in newer OS

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c5d90169d7dc1974db18c130a9eb42a3d8095616
Author: zhaorenhai <zh...@hotmail.com>
AuthorDate: Sat Jul 11 14:39:03 2020 +0800

    IMPALA-9926  base64decode % will not return  error when in newer OS
    
    for example, base64decode('YWxwaGE%') will return
    'alpha\377' in newer os which has newer sasl library.
    I tested it on Ubuntu 18.04 aarch64 version.
    
    Change-Id: Ib9bd9e03d5f744c18c957cdaf2064fa918086004
    Reviewed-on: http://gerrit.cloudera.org:8080/16175
    Reviewed-by: Tim Armstrong <ta...@cloudera.com>
    Tested-by: Tim Armstrong <ta...@cloudera.com>
---
 be/src/exprs/expr-test.cc                                        | 4 ++++
 testdata/workloads/functional-query/queries/QueryTest/exprs.test | 8 +++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/be/src/exprs/expr-test.cc b/be/src/exprs/expr-test.cc
index 844e326..aaf8e30 100644
--- a/be/src/exprs/expr-test.cc
+++ b/be/src/exprs/expr-test.cc
@@ -4802,7 +4802,11 @@ TEST_P(ExprTest, StringBase64Coding) {
   TestStringValue("base64encode('alpha')","YWxwaGE=");
   TestStringValue("base64decode('YWxwaGE=')","alpha");
   TestIsNull("base64decode('YWxwaGE')", TYPE_STRING);
+#ifndef __aarch64__
   TestIsNull("base64decode('YWxwaGE%')", TYPE_STRING);
+#else
+  TestStringValue("base64decode('YWxwaGE%')", "alpha\377");
+#endif
 
   // Test random short strings.
   srand(0);
diff --git a/testdata/workloads/functional-query/queries/QueryTest/exprs.test b/testdata/workloads/functional-query/queries/QueryTest/exprs.test
index e013d87..7d7e4fe 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/exprs.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/exprs.test
@@ -2585,13 +2585,11 @@ UDF WARNING: Invalid base64 string; input length is 3, which is not a multiple o
 ====
 ---- QUERY
 # base64 decoding a string with invalid characters
-select base64decode('abc%')
+select base64decode('abc%') is null or base64decode('abc%') = concat('i', chr(183), chr(255))
 ---- RESULTS
-'NULL'
+true
 ---- TYPES
-STRING
----- ERRORS
-UDF WARNING: Could not base64 decode input in space 4; actual output length 0
+BOOLEAN
 ====
 ---- QUERY
 # IMPALA-1731: test parsing infinity values


[impala] 02/06: IMPALA-9904 Fix bad cipher test failed case on aarch64

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b8c61345c9b11d9977d153a63e0e440cf744b3cb
Author: zhaorenhai <zh...@hotmail.com>
AuthorDate: Sun Jun 28 19:59:54 2020 +0800

    IMPALA-9904 Fix bad cipher test failed case on aarch64
    
    On aarch64 and os ubuntu 18.04, the openssl version is 1.1.1,
    the server which used openssl can start  successfully even ciphers is bad.
    So here just don't test bad ciphers cases on aarch64.
    On x86, the server cannot start successfully  because the lower openssl version,
    not because the bad cipher.
    Change-Id: I19751b6bf1045fd6d901c5a67f74e8bdd6bf65d3
    Reviewed-on: http://gerrit.cloudera.org:8080/16172
    Reviewed-by: Tim Armstrong <ta...@cloudera.com>
    Tested-by: Tim Armstrong <ta...@cloudera.com>
---
 be/src/rpc/rpc-mgr-test.cc       | 2 ++
 be/src/rpc/thrift-server-test.cc | 9 ++++++---
 be/src/util/webserver-test.cc    | 4 ++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/be/src/rpc/rpc-mgr-test.cc b/be/src/rpc/rpc-mgr-test.cc
index cb698fa..52e90d0 100644
--- a/be/src/rpc/rpc-mgr-test.cc
+++ b/be/src/rpc/rpc-mgr-test.cc
@@ -113,6 +113,7 @@ TEST_F(RpcMgrTest, CorrectPasswordTls) {
   tls_rpc_mgr.Shutdown();
 }
 
+#ifndef __aarch64__
 // Test with a bad TLS cipher and verify that an error is thrown.
 TEST_F(RpcMgrTest, BadCiphersTls) {
   ScopedSetTlsFlags s(SERVER_CERT, PRIVATE_KEY, SERVER_CERT, "", "not_a_cipher");
@@ -128,6 +129,7 @@ TEST_F(RpcMgrTest, BadCiphersTls) {
   ASSERT_FALSE(tls_rpc_mgr.Init(tls_krpc_address).ok());
   tls_rpc_mgr.Shutdown();
 }
+#endif
 
 // Test with a valid TLS cipher.
 TEST_F(RpcMgrTest, ValidCiphersTls) {
diff --git a/be/src/rpc/thrift-server-test.cc b/be/src/rpc/thrift-server-test.cc
index 68b55e5..ff89372 100644
--- a/be/src/rpc/thrift-server-test.cc
+++ b/be/src/rpc/thrift-server-test.cc
@@ -274,6 +274,7 @@ TEST(SslTest, ClientBeforeServer) {
 
 TEST(SslTest, BadCiphers) {
   int port = GetServerPort();
+#ifndef __aarch64__
   {
     ThriftServer* server;
     EXPECT_OK(ThriftServerBuilder("DummyStatestore", MakeProcessor(), port)
@@ -282,14 +283,14 @@ TEST(SslTest, BadCiphers) {
                   .Build(&server));
     EXPECT_FALSE(server->Start().ok());
   }
-
+#endif
   {
     ThriftServer* server;
     EXPECT_OK(ThriftServerBuilder("DummyStatestore", MakeProcessor(), port)
                   .ssl(SERVER_CERT, PRIVATE_KEY)
                   .Build(&server));
     EXPECT_OK(server->Start());
-
+#ifndef __aarch64__
     auto s1 =
         ScopedFlagSetter<string>::Make(&FLAGS_ssl_cipher_list, "this_is_not_a_cipher");
     auto s2 =
@@ -298,6 +299,7 @@ TEST(SslTest, BadCiphers) {
     ThriftClient<StatestoreServiceClientWrapper> ssl_client(
         "localhost", port, "", nullptr, true);
     EXPECT_FALSE(ssl_client.Open().ok());
+#endif
   }
 }
 
@@ -320,12 +322,13 @@ TEST(SslTest, MismatchedCiphers) {
   // Failure to negotiate a cipher will show up when data is sent, not when socket is
   // opened.
   EXPECT_OK(ssl_client.Open());
-
+#ifndef __aarch64__
   bool send_done = false;
   TRegisterSubscriberResponse resp;
   EXPECT_THROW(ssl_client.iface()->RegisterSubscriber(
                    resp, TRegisterSubscriberRequest(), &send_done),
       TTransportException);
+#endif
 }
 
 // Test that StringToProtocol() correctly maps strings to their symbolic protocol
diff --git a/be/src/util/webserver-test.cc b/be/src/util/webserver-test.cc
index d13c524..aa41ef4 100644
--- a/be/src/util/webserver-test.cc
+++ b/be/src/util/webserver-test.cc
@@ -277,7 +277,7 @@ TEST(Webserver, SslCipherSuite) {
       Substitute("$0/be/src/testutil/server-key-password.pem", getenv("IMPALA_HOME")));
   auto cmd = ScopedFlagSetter<string>::Make(
       &FLAGS_webserver_private_key_password_cmd, "echo password");
-
+#ifndef __aarch64__
   {
     auto ciphers = ScopedFlagSetter<string>::Make(
         &FLAGS_ssl_cipher_list, "not_a_cipher");
@@ -285,7 +285,7 @@ TEST(Webserver, SslCipherSuite) {
     Webserver webserver("", FLAGS_webserver_port, &metrics);
     ASSERT_FALSE(webserver.Start().ok());
   }
-
+#endif
   {
     auto ciphers = ScopedFlagSetter<string>::Make(
         &FLAGS_ssl_cipher_list, "AES128-SHA");