Merge pull request #42316 from ClickHouse/tavplubix-patch-5

Save full server log in AST Fuzzer checks
This commit is contained in:
Alexander Tokmakov 2022-11-09 16:21:11 +03:00 committed by GitHub
commit dce0994c2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -178,7 +178,7 @@ function fuzz
# interferes with gdb # interferes with gdb
export CLICKHOUSE_WATCHDOG_ENABLE=0 export CLICKHOUSE_WATCHDOG_ENABLE=0
# 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 > >(tail -100000 > server.log) 2>&1 & clickhouse-server --config-file db/config.xml --pid-file /var/run/clickhouse-server/clickhouse-server.pid -- --path db 2>&1 | pigz > server.log.gz &
server_pid=$! server_pid=$!
kill -0 $server_pid kill -0 $server_pid
@ -297,7 +297,7 @@ quit
# The server has died. # The server has died.
task_exit_code=210 task_exit_code=210
echo "failure" > status.txt echo "failure" > status.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 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
then then
echo "Lost connection to server. See the logs." > description.txt echo "Lost connection to server. See the logs." > description.txt
fi fi
@ -391,8 +391,9 @@ th { cursor: pointer; }
<h1>AST Fuzzer for PR #${PR_TO_TEST} @ ${SHA_TO_TEST}</h1> <h1>AST Fuzzer for PR #${PR_TO_TEST} @ ${SHA_TO_TEST}</h1>
<p class="links"> <p class="links">
<a href="runlog.log">runlog.log</a>
<a href="fuzzer.log">fuzzer.log</a> <a href="fuzzer.log">fuzzer.log</a>
<a href="server.log">server.log</a> <a href="server.log.gz">server.log.gz</a>
<a href="main.log">main.log</a> <a href="main.log">main.log</a>
${CORE_LINK} ${CORE_LINK}
</p> </p>

View File

@ -115,7 +115,7 @@ if __name__ == "__main__":
paths = { paths = {
"runlog.log": run_log_path, "runlog.log": run_log_path,
"main.log": os.path.join(workspace_path, "main.log"), "main.log": os.path.join(workspace_path, "main.log"),
"server.log": os.path.join(workspace_path, "server.log"), "server.log.gz": os.path.join(workspace_path, "server.log.gz"),
"fuzzer.log": os.path.join(workspace_path, "fuzzer.log"), "fuzzer.log": os.path.join(workspace_path, "fuzzer.log"),
"report.html": os.path.join(workspace_path, "report.html"), "report.html": os.path.join(workspace_path, "report.html"),
"core.gz": os.path.join(workspace_path, "core.gz"), "core.gz": os.path.join(workspace_path, "core.gz"),
@ -134,8 +134,8 @@ if __name__ == "__main__":
report_url = paths["runlog.log"] report_url = paths["runlog.log"]
if paths["main.log"]: if paths["main.log"]:
report_url = paths["main.log"] report_url = paths["main.log"]
if paths["server.log"]: if paths["server.log.gz"]:
report_url = paths["server.log"] report_url = paths["server.log.gz"]
if paths["fuzzer.log"]: if paths["fuzzer.log"]:
report_url = paths["fuzzer.log"] report_url = paths["fuzzer.log"]
if paths["report.html"]: if paths["report.html"]: