You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using library to sync mails for a some users. My code runs on ubuntu 20.04 (net5.0 application). We use only async implemetation.
When application starts, it runs sync task for few users (let say 10 users) and cpu raise high to 100%. If I run this on Windows server it is no problem.
I add some logs, but it seems that code stuck somewhere in network calls (never returns from ImapClient functions).
It could be something related to dotnet/runtime#44422
Regards, Luka
The text was updated successfully, but these errors were encountered:
The Socket.SendAsync thread-safety thing shouldn't be an issue because you shouldn't be trying to invoke commands on the same ImapClient (or ImapFolder) from multiple threads. That's pretty much guaranteed to cause problems even if Socket.SendAsync() was thread-safe.
There's just no sane way to deal with that.
What more can you tell me? I'm leaning toward "if it works fine on Windows, then it's probably a .NET Core runtime bug on Linux"
Since you are using the Async APIs, then ImapStream.ReadAheadAsync should be using the ReadAsync method of the underlying stream rather than a hacky Poll() loop that runs when the synchronous API is used (which could cause a CPU spike if there were enough clients running concurrently).
I will compile library directly to my project and add some debug logs. I will let you know if i will discover something. I assume that something is cycling on reading from socket.
when I run windows mashine on prod the problamatic imap account finished syncing, so I could not detect/trace the problem. As soon I got I new user with same problem I will debug issue and let you know.
Hi,
I am using library to sync mails for a some users. My code runs on ubuntu 20.04 (net5.0 application). We use only async implemetation.
When application starts, it runs sync task for few users (let say 10 users) and cpu raise high to 100%. If I run this on Windows server it is no problem.
I add some logs, but it seems that code stuck somewhere in network calls (never returns from ImapClient functions).
It could be something related to dotnet/runtime#44422
Regards, Luka
The text was updated successfully, but these errors were encountered: