-
Notifications
You must be signed in to change notification settings - Fork 251
Add segfault check to running scripts #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,11 +17,15 @@ cat queries"$SUFFIX".sql | while read -r query; do | |
|
|
||
| echo -n "[" | ||
| for i in $(seq 1 $TRIES); do | ||
| RES=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1 ||:) # (*) | ||
| [[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null" | ||
| OUT=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1) | ||
| CH_EXIT=$? | ||
| RES=$(printf '%s\n' "$OUT" | tail -n1) # (*) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| [[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null" | ||
| [[ "$i" != $TRIES ]] && echo -n ", " | ||
| [[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The scripts to run submissions in an unattended amnner actually make some expectations how the output looks like:
Basically: In case of a segfault, we need to print To give some background: ClickBench focuses on runtimes for successful queries. If a query doesn't run, it doesn't penalize it based on the reason for this (OOM, crash, etc.). No such assumptions exist for the format of result.csv (l. 28) but I guess it will be nice to keep its content in-sync with the result that is printed to stdout. |
||
|
|
||
| echo "${QUERY_NUM},${i},${RES}" >> result.csv | ||
| echo "${QUERY_NUM},${i},${RES},${CH_EXIT}" >> result.csv | ||
| done | ||
| echo "]," | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OUT-->CMD?