-
Notifications
You must be signed in to change notification settings - Fork 163
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
Panic: Segmentation Violation, doesn't shutdown gracefully #101
Comments
Thanks for this report! Looks like there's a missing |
I believe this issue has already been resolved in the master branch. Probably rel ethereum/go-ethereum#20988 or ethereum/go-ethereum#20988 or ethereum/go-ethereum#20695 I was able to reproduce the issue at #!/usr/bin/env bash
# This script attempts to cause geth to panic on shutdown because
# of a nil current header number.
#
# The script waits for geth to be in the 'middle' of downloading,
# waiting for a log line matching a receipts import,
# and then kills geth with SIGINT (ie ctrl-c).
#
# I used it to sucessfully reproduce the issue at
# https://github.com/etclabscore/core-geth/issues/101
# with core-geth version v1.11.3,
# and unsuccessfully reproduce at core-geth v1.11.4.
make geth
./build/bin/geth version |& tee geth.version.log
rm -rf ./tempdd
trial=0
run_and_interrupt(){
>geth.$trial.log
(
./build/bin/geth --datadir ./tempdd |& tee geth.$trial.log
)&
gethpid=$!
echo "Watching geth pid: $gethpid"
tail -f geth.$trial.log | while read line; do
if echo "$line" | grep -q -E 'Imported .* receipts'; then
echo "Saw receipts, killing $gethpid"
pkill --signal 2 geth
return
fi
done
}
grep_log_for_panic(){
[[ ! -f geth.$trial.log ]] && return 0
if cat geth.$trial.log | grep -q panic; then
echo "Found panic"
return 1
else
echo "Did not find panic"
return 0
fi
}
while grep_log_for_panic; do
if [[ $trial -gt 10 ]]; then
echo "Max trials, exiting."
exit 0
fi
trial=$((trial+1))
echo "Running. Trials=$trial"
run_and_interrupt
sleep 5
done |
@priom I'm going to assume this is resolved as of https://github.com/etclabscore/core-geth/releases/tag/v1.11.4 and close the issue. Please reopen if the issue persists for you. |
Thank you @meowsbits. I'll retry and if the issue persists then I'll reopen this issue. |
System information
Geth version:
1.11.3
OS & Version: Ubuntu 18.04
Expected behaviour
Should shutdown gracefully by safely saving the state and db
Actual behaviour
Throws Panic with Segmentation Violation
Steps to reproduce the behaviour
Run core-geth and kill by
ctrl+c
and see the errorThe text was updated successfully, but these errors were encountered: