Skip to content
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

HPCC-ABCDE Dummy for testing core trace in bundle test #19437

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/bundleTest-thor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ jobs:
- name: Start HPCC-Platform
shell: "bash"
run: |
ulimit -c 100
echo 'core_%e.%p' | sudo tee /proc/sys/kernel/core_pattern
export LANG="en_US.UTF-8"
sudo update-locale
Expand All @@ -146,6 +145,7 @@ jobs:
if: ${{ inputs.test-core-file-generation }}
shell: "bash"
run: |
set +e # Ignore intermediate error(s) in this step
cat > crash.ecl << EOF
boolean seg() := beginc++ #option action
#include <csignal>
Expand All @@ -157,6 +157,9 @@ jobs:
EOF

ecl run -t hthor crash.ecl
ecl run -t thor crash.ecl
# Do not execute crash.ecl on Roxie. It takes ages to complete.
echo "Number of core files: $(sudo find /var/lib/HPCCSystems/ -iname 'core*' -mtime -1 -type f -exec printf "%s\n" '{}' \; | wc -l )"
continue-on-error: true

- name: Get test from Github
Expand Down Expand Up @@ -303,13 +306,18 @@ jobs:
CORE_FILES=( $(sudo find /var/lib/HPCCSystems/ -iname 'core*' -mtime -1 -type f -exec printf "%s\n" '{}' \; ) )
echo "NUM_OF_ML_CORES=${#CORE_FILES[@]}" >> $GITHUB_ENV
if [ ${#CORE_FILES[@]} -ne 0 ]
then
then
mkdir -p $HOME/.config/gdb/
echo "set auto-load safe-path /" >> $HOME/.config/gdb/gdbinit

for core in ${CORE_FILES[@]}
do
base=$( dirname $core )
lastSubdir=${base##*/}
comp=${lastSubdir##my}
sudo gdb --batch --quiet -ex "set interactive-mode off" -ex "echo \n Backtrace for all threads\n==========================" -ex "thread apply all bt" -ex "echo \n Registers:\n==========================\n" -ex "info reg" -ex "echo \n Disas:\n==========================\n" -ex "disas" -ex "quit" "/opt/HPCCSystems/bin/${comp}" $core | sudo tee "$core.trace" 2>&1
coreName=${core##*/}
component=$( echo $coreName | tr '_.' ' ' | awk '{print $2 }' )
compNamePart=$( find /opt/HPCCSystems/bin/ -iname "$component*" -type f -print | head -n 1);
compName=${compNamePart##*/}
echo "component: '${component}', compName: '${compName}', core: '${core}'"
sudo gdb --batch --quiet -ex "set interactive-mode off" -ex "echo \n Backtrace for all threads\n==========================" -ex "thread apply all bt" -ex "echo \n Registers:\n==========================\n" -ex "info reg" -ex "echo \n Disas:\n==========================\n" -ex "disas" -ex "quit" "/opt/HPCCSystems/bin/${compName}" $core 2>&1 | sudo tee "$core.trace" 2>&1
cp "$core.trace" /home/runner/HPCCSystems-regression/log/
done
echo "UPLOAD_ARTIFACT=true" >> $GITHUB_ENV
Expand Down
Loading