Empty waker commands crashing the process
straylight-orbit opened this issue · 2 comments
Experiencing a crash that seems to originate from the fact that the number of waker commands should never be zero. Is this caused by popol
?
[TRACE nakamoto_net_poll::reactor] Woke up with 2 source(s) ready
[TRACE nakamoto_net_poll::reactor] Woken up by waker (0 command(s))
thread '<unnamed>' panicked at 'assertion failed: !commands.is_empty()', /home/[redacted]/.cargo/git/checkouts/nakamoto-7d1fe53db3dde129/e3b1cf9/net/poll/src/reactor.rs:249:33
This is a debug assertion which would be safe to remove, but doesn't trigger in release mode anyway. Normally, when the waker is used to wake up the event loop, it's because a command is ready to be processed. If it is woken up, yet no command is there, the assertion triggers a panic.
The assertion is there because it is my assumption that no one would wake the event loop up with the waker, unless a command was ready to be processed. This is how the client library works. But it seems like there are some rare cases where it can happen, and I don't have an explanation for it. Either way, it's harmless, but it may point to a bug somewhere else in the code.
Are you able to reproduce this, or do you have the logs from right before? Does it happen at a specific point in time, eg. startup or shutdown?
Ok looks like that there is already an issue open, and in there I had some logs #137