You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2018/12/10 23:44:01 UTC
[4/8] impala git commit: IMPALA-7903: Fix DCHECK failure in
RawValue::PrintValue()
IMPALA-7903: Fix DCHECK failure in RawValue::PrintValue()
Occasionally Impala crashed on a DCHECK in RawValue::PrintValue()
when running web pages tests. Turned out that queries that have an
intermediate step for aggregation hit that DCHECK failure when the
log level is set to 3. As these web pages test run in parallel it
happened sometimes that a selective query was run after test_log_level
set the log level to 3 but before it came to the point to reset it.
The solution was to enhance RawValue::PrintValue() to handle
TYPE_FIXED_UDA_INTERMEDIATE not to run on the default case of the
switch.
In addition I extended the log writing for this DCHECK to print out
the type it can't handle.
Testing:
- Extended the web server tests to set the log level to 3 and to
run an aggregating query in the same test.
Change-Id: I22fe7cbbadd0c7eb6d0bd2d50bf500f0528e6af0
Reviewed-on: http://gerrit.cloudera.org:8080/12021
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/244476b3
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/244476b3
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/244476b3
Branch: refs/heads/master
Commit: 244476b392acda8e69d7376b1560d23831fe795d
Parents: 04d027d
Author: Gabor Kaszab <ga...@cloudera.com>
Authored: Sat Dec 1 10:58:28 2018 +0100
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Sun Dec 9 22:55:18 2018 +0000
----------------------------------------------------------------------
be/src/runtime/raw-value.cc | 5 ++++-
tests/webserver/test_web_pages.py | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/244476b3/be/src/runtime/raw-value.cc
----------------------------------------------------------------------
diff --git a/be/src/runtime/raw-value.cc b/be/src/runtime/raw-value.cc
index f15986b..3025e01 100644
--- a/be/src/runtime/raw-value.cc
+++ b/be/src/runtime/raw-value.cc
@@ -107,6 +107,9 @@ void RawValue::PrintValue(const void* value, const ColumnType& type, int scale,
case TYPE_CHAR:
*str = string(reinterpret_cast<const char*>(value), type.len);
return;
+ case TYPE_FIXED_UDA_INTERMEDIATE:
+ *str = "Intermediate UDA step, no value printed";
+ return;
default:
PrintValue(value, type, scale, &out);
}
@@ -276,7 +279,7 @@ void RawValue::PrintValue(
default: DCHECK(false) << type;
}
break;
- default: DCHECK(false);
+ default: DCHECK(false) << "Unknown type: " << type;
}
stream->precision(old_precision);
// Undo setting stream to fixed
http://git-wip-us.apache.org/repos/asf/impala/blob/244476b3/tests/webserver/test_web_pages.py
----------------------------------------------------------------------
diff --git a/tests/webserver/test_web_pages.py b/tests/webserver/test_web_pages.py
index 0c05546..a4df0a2 100644
--- a/tests/webserver/test_web_pages.py
+++ b/tests/webserver/test_web_pages.py
@@ -237,6 +237,22 @@ class TestWebPage(ImpalaTestSuite):
bad_loglevel_url = self.SET_GLOG_LOGLEVEL_URL + "?badurl=foo"
self.get_and_check_status(bad_loglevel_url)
+ @pytest.mark.execute_serially
+ def test_uda_with_log_level(self):
+ """IMPALA-7903: Impala crashes when executing an aggregate query with log level set
+ to 3. Running this test serially not to interfere with other tests setting the log
+ level."""
+ # Check that the log_level end points are accessible.
+ self.get_and_check_status(self.SET_GLOG_LOGLEVEL_URL)
+ self.get_and_check_status(self.RESET_GLOG_LOGLEVEL_URL)
+ # Set log level to 3.
+ set_glog_url = (self.SET_GLOG_LOGLEVEL_URL + "?glog=3")
+ self.get_and_check_status(set_glog_url, "v set to 3")
+ # Check that Impala doesn't crash when running a query that aggregates.
+ self.client.execute("select avg(int_col) from functional.alltypessmall")
+ # Reset log level.
+ self.get_and_check_status(self.RESET_GLOG_LOGLEVEL_URL, "v set to ")
+
def test_catalog(self):
"""Tests the /catalog and /catalog_object endpoints."""
self.get_and_check_status_jvm(self.CATALOG_URL, "functional")