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

[Bug] CPU usage 100% when offline #108

Closed
krackout opened this issue Aug 9, 2022 · 4 comments
Closed

[Bug] CPU usage 100% when offline #108

krackout opened this issue Aug 9, 2022 · 4 comments
Assignees

Comments

@krackout
Copy link

krackout commented Aug 9, 2022

I I've noticed that CPU usage goes 100% when nmail is started offline. It must have appeared somewhere around version 3.74 I think. The bug mustn't be there when I started using nmail; I'm often offline plus the fan of my CPU makes noticeable noise when going 100%. I initially thought it was incidental but I can reproduce it by simply opening nmail without an active internet connection. I'm attaching a verbose log file.

nmail--offline-100percent-log.txt

@d99kris d99kris self-assigned this Aug 9, 2022
@d99kris
Copy link
Owner

d99kris commented Aug 9, 2022

Hi, I checked here and I can reproduce it too. I haven't checked the code for the root cause yet, but based on my testing it seems a temporary workaround is to manually start nmail in offline mode: nmail -o

This is a quite bad bug though, so I'll definitely look into fixing it as soon as I get a chance.

@Kabouik
Copy link
Contributor

Kabouik commented Aug 9, 2022

Just posting because I observed the same issue long before 3.73, probably even early last year, so it might be necessary to look into other commits too (I hope I am not wrong though). Usually this would happen when I put my laptop to sleep and then wake it the next day and have no Internet connection, but still have nmail instances running in Termux.

Apparently I failed to report it, sorry. It might be partly related to #74? I suppose the CPU hog when offline could be an extension over longers duration of the CPU spike when trying to connect?

@d99kris
Copy link
Owner

d99kris commented Aug 10, 2022

I can confirm that this is a very old bug. It affects the scenario when nmail is started and unable to connect to the IMAP server at first login attempt. The high CPU usage should not occur if there was first a connection made and later was lost, and neither in the case when nmail is manually started in offline mode with -o flag.

I have some idea on how it should be fixed. Will prepare a fix and perform some testing on my side before pushing a fix.

@d99kris
Copy link
Owner

d99kris commented Aug 13, 2022

This should be fixed with above commit. Please let me know if you're still encountering any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants