-
Notifications
You must be signed in to change notification settings - Fork 253
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
proc_loadavg: Sleep in loadavg thread should not slow down reloads #679
base: main
Are you sure you want to change the base?
Conversation
The signal handler will set |
Hello @DeyanSG, first of all, thanks for your report and proposed fix! From #678:
you are referring to this part of code:
right? Please, can you test the following simple fix:
Kind regards, |
Ah yes, catching the overflow definitely makes sense. We'd still be a bit delayed, but that's much less problematic than a near-endless sleep call and can still be addressed separately. |
Hi @mihalicyn and @Blub, Thanks for looking into this. It seems I somehow missed the overflow in the code and went on to look into the kernel code. Thanks for spotting this, @mihalicyn. We will deploy a patched version today that includes the suggested fix and some additional logging in case we skip the sleep, so we can see all the values. The issue is tricky to reproduce, as we do not trigger these live migrations. They are part of some GCE maintenance, and so far, the issue during a migration seems to occur rarely. Nevertheless, we will do our best to test and see if we can determine whether this patch will solve the issue. @Blub, I tested with SIGALRM and SIGVTALRM. However, sending these to the thread seems to kill the whole process. I am also not sure how good of an idea it is to set a custom handler for these signals. I also tested with SIGUSR2, and even without installing a handler for this signal, it seems to work correctly. Let me know if you are keen on merging this with SIGUSR2 (or another signal), or if we will stick to just the solution provided by @mihalicyn if it works. Regards, |
I think installing a handler for |
The thread might be sleeping. Make sure to interrupt so we can reload faster. Signed-off-by: Deyan Doychev <[email protected]>
Hi @Blub , I've modified it to use Feel free to suggest more improvements. Regards, |
This resolves the issue with reload described in #678