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

observe the python process and all of its forkees sending signals using killsnoop.bt #122

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
29 changes: 23 additions & 6 deletions jenkins/nightly_tar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ fi
if test -z "$NEW_VERSION"; then
NEW_VERSION=3.9.0-nightly
fi
if test -n "$PACKAGE_CACHE"; then
if test -z "${PACKAGE_CACHE}"; then
PACKAGE_CACHE=$(pwd)/package_cache
fi

VERSION_TAR_NAME="${OLD_VERSION}_${NEW_VERSION}_tar_version"
mkdir -p package_cache
mkdir -p ${VERSION_TAR_NAME}
if test -h "${PACKAGE_CACHE}"; then
PACKAGE_CACHE="$(realpath "${PACKAGE_CACHE}")"
else
mkdir -p "${PACKAGE_CACHE}"
fi
mkdir -p "${VERSION_TAR_NAME}"
mkdir -p test_dir
tar -xvf ${VERSION_TAR_NAME}.tar || true
tar -xvf "${VERSION_TAR_NAME}.tar" || true

VERSION=$(cat VERSION.json)
GIT_VERSION=$(git rev-parse --verify HEAD |sed ':a;N;$!ba;s/\n/ /g')
Expand All @@ -41,7 +45,7 @@ docker \
-v /dev/shm:/dev/shm \
-v $(pwd):/home/release-test-automation \
-v $(pwd)/test_dir:/home/test_dir \
-v "$PACKAGE_CACHE":/home/package_cache \
-v "${PACKAGE_CACHE}":/home/package_cache \
-v $(pwd)/${VERSION_TAR_NAME}:/home/versions \
--pid=host \
--rm \
Expand All @@ -57,7 +61,20 @@ docker \
--selenium-driver-args headless \
--selenium-driver-args no-sandbox \
--remote-host $(host nas02.arangodb.biz |sed "s;.* ;;") \
$force_arg --git-version $GIT_VERSION $@
$force_arg --git-version $GIT_VERSION $@ &
docker_pid=$!

sleep 2

PID=$(ps -eaf | \
grep -v docker |\
grep -v grep |\
grep full_download_upgrade_test.py |\
sed "s;root *\([0-9]*\) .*;\1;")

sudo /usr/sbin/killsnoop.bt -p $PID > $(pwd)/test_dir/kill_snoop.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it catch kill() inside docker container being launched outside?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. --pid=host enables us to have meaningfull PIDs inside and outside the docker container.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brendangregg/perf-tools#106 maybe somebody knows better than me.


wait $docker_pid
result=$?

# Cleanup ownership:
Expand Down