-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
A potential dead lock of BSC client which result in block syncing halt #58
Comments
unclezoro
changed the title
bsc dataseed sync stuck
A potential dead lock of BSC client which result in block syncing halt
Dec 30, 2020
3 tasks
pythonberg1997
pushed a commit
to pythonberg1997/bsc
that referenced
this issue
Mar 29, 2023
modify fork choice to prefer higher justified block number
galaio
pushed a commit
to galaio/bsc
that referenced
this issue
Jul 31, 2024
galaio
pushed a commit
to galaio/bsc
that referenced
this issue
Jul 31, 2024
…04.1 Merge upstream op-geth v1.101304.1
buddh0
added a commit
that referenced
this issue
Dec 9, 2024
* workflows: fix golangci-lint * fix accounts * fix core * fix eth * fix internal * fix miner * vix version * use `make lint` to run cilint * fix version * fix cmd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System information
Geth version: 1.9.13
OS & Version: Linux
Expected behaviour
Client sync block normal
Actual behaviour
Client failed to sync block.
Steps to reproduce the behaviour
First change the code to make it easier to reproduce:
Do request for multi times:
Backtrace
Here is the pprof of go routine:
goroutine.txt
According to the pprof, the code is blocked on
/server/bsc/event/feed.go:170
.select
.As we checked, new
NewPendingTransactionFilter
calls are pending on fetchingfiltersMu
lock.filtersMu
lock istimeoutLoop
:The code is:
Obvious it failed to do
sub.es.uninstall <- sub.f
.eventLoop
is responsible for consuming thesub.es.uninstall
channel.The routine is busy doing
handleTxsEvent
:It will push
hashes
tof.hashes
channel, and now it is blocking by that channel.f.hashes
channel?That is because, in the above step 3, the
Unsubscribe
may not consume all thehashes
and break out so that step4 stucked.The deadlock dependency is:
Routine A:
NewPendingTransactionFilter
want to lockfiltersMu
to consumehashes
;Routine B:
eventLoop
is waiting Routine A to consumehashes
so that it can push new hash to channel.Routine C:
Unsubscribe
is holding lockfiltersMu
, but it is waiting for Routine B to consumeuninstall
channel.The text was updated successfully, but these errors were encountered: