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

Update the unclean shutdown marker every 5 minutes #22580

Closed
ligi opened this issue Mar 26, 2021 · 8 comments · Fixed by #24077
Closed

Update the unclean shutdown marker every 5 minutes #22580

ligi opened this issue Mar 26, 2021 · 8 comments · Fixed by #24077

Comments

@ligi
Copy link
Member

ligi commented Mar 26, 2021

I had a unclean shutdown less than a day ago and got this warning afterwards:

WARN [03-26|10:10:29.944] Unclean shutdown detected booted=2021-03-17T13:16:42+0000 age=1w1d20h

As it would be better to have the "age=" part closer to the shutdown @holiman suggested to update the marker like every 5 minutes

@David-C-Lee
Copy link

To clarify, you would like the "age=" to be precise, down to the minute?
PrettyAge() prints the age with precision of three units:

"age", common.PrettyAge(t))

Therefore, as far as I understand, an unclean shutdown that happened < one week ago will display the days, hours, and minutes. An unclean shutdown that happened > one month ago will only display months, weeks, and days.

To solve your issue, we need to use something other than PrettyAge().

If I am misunderstanding anything, please correct me, as I am brand new to the codebase.

@MariusVanDerWijden
Copy link
Member

No @David-C-Lee the problem is, that we set the unclean-shutdown marker on startup. If the node crashes two weeks after startup, the age that is printed is the old startup age. It would be better to write the unclean-shutdown time every five minutes, thus we could see better when a node crashed

@ethereum ethereum deleted a comment Mar 31, 2021
@prb22
Copy link

prb22 commented May 4, 2021

The reason it posts the startup time is because the crash doesn't last the entire time it takes to reboot. It only recognizes the last clean shutdown.

@Meegada-Mahesh
Copy link

Meegada-Mahesh commented May 17, 2021

Hi, can i work on it ?? last comment by @MariusVanDerWijden , i will take that as requirement for this feature

@MariusVanDerWijden
Copy link
Member

MariusVanDerWijden commented May 17, 2021

Sure @Meegada-Mahesh, just send a PR when your done and I'll take a look

@Meegada-Mahesh
Copy link

/assign

@BitBaseBit
Copy link

Hey, @MariusVanDerWijden I've submitted a PR at #22974 that fixes this.

@jayboy-mabushi
Copy link

@Meegada-Mahesh I am getting unclean shutdown error and it is not pulling any new data. How can I resolve this?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment