-
Notifications
You must be signed in to change notification settings - Fork 96
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
IMAP loop sometimes gets into busy loop and consumes 100% CPU after suspend #6477
Comments
We also had similar problem reported by @dignifiedquire on 2025-01-07:
|
In my log for non-chatmail account that got into 100% CPU state I have this:
Overall it looks like INBOX loop got stuck, it is not interrupted anymore. It seems INBOX got into IDLE at 2025-01-25T09:01:16.859Z, and after unsuspend it's DeltaChat loop that logged in and got into IDLE at 2025-01-25T09:02:13.551Z while INBOX loop never recovered. |
I improved logging around IMAP in #6485, this got into 1.155.2 IDLE code inside |
Got this problem on Desktop again. Inspecting connections with Then I tried switching "only watch delta chat folder" setting back and forth, and it recovered, but keeps using 100% CPU. So the stuck task was not killed by stopping and starting IO. |
maybe related? deltachat/deltachat-ios#2579 |
This code also does not look right:
We should always await EDIT: made a PR to fix this at #6526 |
#6526 is merged. Now I think we need further refactorings to async-imap to get rid of future cancellations there and stop token. Currently async-imap uses timeout internally and this means it can cancel futures there. |
Hey, I don't know if this is the right issue, but my Delta Chat desktop 1.54.2 started taking up CPU on Windows after leaving it open for a while. Edit: DC Desktop 1.54.2 (git: v1.54.2), core v1.156.2. Just this account is affected. Other ones can receive messages. Exactly as in #6532 (comment), I can send messages, and see them on the other device, but I cannot receive. I see this in the logs, several hours before I noticed the forever "Connecting". Could it be related? log
I'll leave DC in that state for a while, please let me know if you'd like me to try something, or to get more logs. |
@WofWca Is this the first account (account ID, the one at the top of your account list) that got stuck? The last entry for account 1 and INBOX is this?
|
Yes, the first account, with ID 1. I didn't get the second question. |
Are there any more log entries for the "INBOX" of account 1 below? Or did IMAP loop for INBOX folder got stuck completely after this line? |
I'm not that good at reading core logs, so I edited the post to include the logs for the next few hours, to when I focused the Delta Chat window. |
On both the latest
main
(roughly 1.155.1 for me on Linux) and 1.152.1 reported by @Simon-Laux on macOS there are cases whendeltachat-rpc-server
consumes 100% CPU after suspend and messages are not fetched anymore.Important detail is that for affected account the last message is
"46 mails read from \"DeltaChat\""
or similar, i.e. laptop was suspended before IMAP loop went IDLE.The text was updated successfully, but these errors were encountered: