mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Print fatal messages in Fuzzer
This commit is contained in:
parent
8479615c48
commit
234193acc9
@ -157,7 +157,7 @@ function fuzz
|
|||||||
mkdir -p /var/run/clickhouse-server
|
mkdir -p /var/run/clickhouse-server
|
||||||
|
|
||||||
# NOTE: we use process substitution here to preserve keep $! as a pid of clickhouse-server
|
# NOTE: we use process substitution here to preserve keep $! as a pid of clickhouse-server
|
||||||
clickhouse-server --config-file db/config.xml --pid-file /var/run/clickhouse-server/clickhouse-server.pid -- --path db 2>&1 | pigz > server.log.gz &
|
clickhouse-server --config-file db/config.xml --pid-file /var/run/clickhouse-server/clickhouse-server.pid -- --path db 2>&1 > server.log &
|
||||||
server_pid=$!
|
server_pid=$!
|
||||||
|
|
||||||
kill -0 $server_pid
|
kill -0 $server_pid
|
||||||
@ -262,7 +262,7 @@ quit
|
|||||||
if [ "$server_died" == 1 ]
|
if [ "$server_died" == 1 ]
|
||||||
then
|
then
|
||||||
# The server has died.
|
# The server has died.
|
||||||
if ! zgrep --text -ao "Received signal.*\|Logical error.*\|Assertion.*failed\|Failed assertion.*\|.*runtime error: .*\|.*is located.*\|SUMMARY: AddressSanitizer:.*\|SUMMARY: MemorySanitizer:.*\|SUMMARY: ThreadSanitizer:.*\|.*_LIBCPP_ASSERT.*" server.log.gz > description.txt
|
if ! grep --text -ao "Received signal.*\|Logical error.*\|Assertion.*failed\|Failed assertion.*\|.*runtime error: .*\|.*is located.*\|SUMMARY: AddressSanitizer:.*\|SUMMARY: MemorySanitizer:.*\|SUMMARY: ThreadSanitizer:.*\|.*_LIBCPP_ASSERT.*" server.log > description.txt
|
||||||
then
|
then
|
||||||
echo "Lost connection to server. See the logs." > description.txt
|
echo "Lost connection to server. See the logs." > description.txt
|
||||||
fi
|
fi
|
||||||
@ -342,10 +342,16 @@ case "$stage" in
|
|||||||
time fuzz
|
time fuzz
|
||||||
;&
|
;&
|
||||||
"report")
|
"report")
|
||||||
|
|
||||||
CORE_LINK=''
|
CORE_LINK=''
|
||||||
if [ -f core.gz ]; then
|
if [ -f core.gz ]; then
|
||||||
CORE_LINK='<a href="core.gz">core.gz</a>'
|
CORE_LINK='<a href="core.gz">core.gz</a>'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
grep -F '<Fatal>' server.log > fatal.log ||:
|
||||||
|
|
||||||
|
pigz server.log
|
||||||
|
|
||||||
cat > report.html <<EOF ||:
|
cat > report.html <<EOF ||:
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@ -386,6 +392,9 @@ th { cursor: pointer; }
|
|||||||
<td>$(cat status.txt)</td>
|
<td>$(cat status.txt)</td>
|
||||||
<td style="white-space: pre;">$(clickhouse-local --input-format RawBLOB --output-format RawBLOB --query "SELECT encodeXMLComponent(*) FROM table" < description.txt || cat description.txt)</td>
|
<td style="white-space: pre;">$(clickhouse-local --input-format RawBLOB --output-format RawBLOB --query "SELECT encodeXMLComponent(*) FROM table" < description.txt || cat description.txt)</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" style="white-space: pre; overflow-x: scroll;">$(cat fatal.log)</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user