Termination signal handler is slow
sander2 opened this issue · comments
sander2 commented
Ctrl+c signal is not immediately handled. We thought we had addressed this through #360 but either there has been a regression, or it didn't fix the issue after all.
This is the log I obtained when I started the vault directly (i.e. not using the runner):
Oct 07 11:49:38.862 INFO vault::system: Initializing metrics...
q^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C
Oct 07 11:50:26.701 INFO vault::system: Waiting for new block...
Oct 07 11:50:26.701 INFO vault: Received termination signal: 2
Update
This is most likely because the future is busy-waiting, i.e. it does not return Poll::Pending
for a long time, so the select
that catches the shutdown signal handler does not get the opportunity to cancel the future.