mirror of
https://github.com/d99kris/nmail.git
synced 2026-04-26 09:46:01 +03:00
[GH-ISSUE #108] [Bug] CPU usage 100% when offline #94
Labels
No labels
bug
enhancement
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nmail#94
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @krackout on GitHub (Aug 9, 2022).
Original GitHub issue: https://github.com/d99kris/nmail/issues/108
Originally assigned to: @d99kris on GitHub.
I I've noticed that CPU usage goes 100% when
nmailis 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 commented on GitHub (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 -oThis is a quite bad bug though, so I'll definitely look into fixing it as soon as I get a chance.
@Kabouik commented on GitHub (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 commented on GitHub (Aug 10, 2022):
I can confirm that this is a very old bug. It affects the scenario when
nmailis 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 whennmailis manually started in offline mode with-oflag.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 commented on GitHub (Aug 13, 2022):
This should be fixed with above commit. Please let me know if you're still encountering any issues.