~rjarry/aerc-discuss

6 4

Imap timeout

Nicolas Goy <me@kuon.ch>
Details
Message ID
<D1AENXXJBR2F.1YE3GSLQZO2WP@kuon.ch>
DKIM signature
pass
Download raw message
Hello,

when I navigate folder quickly, sometimes aerc hangs for about 30 seconds then
it display imap connection closed in the status bar.

It happens only when I am on wifi and not on ethernet. I suspect my wifi cannot
follow (I didn't take time to do some packet inspection).

Anyway, I wonder if on the aerc side we can modify the timeout or change the
bahavior to avoid the full UI lock.

Cheers

-- 
Nicolas Goy
Developer and electronic engineer
Goyman SA

https://kuon.ch
https://goyman.com
Details
Message ID
<D1FBLG41B3WW.CE75MVLW39PU@mailbox.org>
In-Reply-To
<D1AENXXJBR2F.1YE3GSLQZO2WP@kuon.ch> (view parent)
DKIM signature
pass
Download raw message
There is the `connection-timeout` config option. Maybe that helps?

see `man aerc-imap`
Nicolas Goy <me@kuon.ch>
Details
Message ID
<D1G7TTPWK84O.32AGUNNZF3MK6@kuon.ch>
In-Reply-To
<D1FBLG41B3WW.CE75MVLW39PU@mailbox.org> (view parent)
DKIM signature
pass
Download raw message
On Tue May 21, 2024 at 2:27 PM CEST, Tillman X wrote:
> There is the `connection-timeout` config option. Maybe that helps?
>
> see `man aerc-imap`

No it doesn't change anything.

And the hang can be several minutes.

I will build a debug version and hook gdb to it to see where it is hanging.

Regards



-- 
Nicolas Goy
Developer and electronic engineer
Goyman SA

https://kuon.ch
https://goyman.com
Nicolas Goy <me@kuon.ch>
Details
Message ID
<D1G83TGP79J6.64506ARIAHUZ@kuon.ch>
In-Reply-To
<D1FBLG41B3WW.CE75MVLW39PU@mailbox.org> (view parent)
DKIM signature
pass
Download raw message
I built a debug version of aerc, and when the hang occurs, here is the backtrace
in GDB.

This particular hang lasted 7 minutes and then finally unlocked itself.

I wasn't on my home wifi, and I was browsing the net without issue during the
hang.

I read the backtrace, and it seems to be some kind of deadlock, but I don't have
more details.

I can reproduce the issue 100% in a few seconds, I just have to navigate
mailboxes with >100 messages and it happens.

Regards



-- 
Nicolas Goy
Developer and electronic engineer
Goyman SA

https://kuon.ch
https://goyman.com
Details
Message ID
<D1HCVMEQB740.2ZC81ILAUKER5@ringo>
In-Reply-To
<D1G83TGP79J6.64506ARIAHUZ@kuon.ch> (view parent)
DKIM signature
pass
Download raw message
Hi Nicolas,

Nicolas Goy, May 22, 2024 at 15:55:
> I built a debug version of aerc, and when the hang occurs, here is the 
> backtrace in GDB.

thanks a lot for the report and the debug traces. In order to get better 
backtraces, could you start aerc redirecting all output to a file 
(including stderr), and when aerc freezes, wait a few seconds and kill 
it with SIGQUIT. It will cause the go runtime to dump all goroutines 
stacks.

  aerc >log 2>&1
  ...
  killall -QUIT aerc

Make sure to strip out any private info from the logs before sharing 
them.

> This particular hang lasted 7 minutes and then finally unlocked itself.

Now this is weird. If it unlocks itself after a while, it means that is 
not a real deadlock. Maybe the logs will tell us more about what is 
going on.

Thanks.
Nicolas Goy <me@kuon.ch>
Details
Message ID
<D1NMPXBVP4EF.2M5R0CG1KPQZA@kuon.ch>
In-Reply-To
<D1HCVMEQB740.2ZC81ILAUKER5@ringo> (view parent)
DKIM signature
pass
Download raw message
On Thu May 23, 2024 at 11:52 PM CEST, Robin Jarry wrote:
> Hi Nicolas,
>
> Nicolas Goy, May 22, 2024 at 15:55:
> > I built a debug version of aerc, and when the hang occurs, here is the 
> > backtrace in GDB.
>
> thanks a lot for the report and the debug traces. In order to get better 
> backtraces, could you start aerc redirecting all output to a file 
> (including stderr), and when aerc freezes, wait a few seconds and kill 
> it with SIGQUIT. It will cause the go runtime to dump all goroutines 
> stacks.
>
>   aerc >log 2>&1
>   ...
>   killall -QUIT aerc
>

Hello,

I was able to use this method to find out that my notify command caused the
hang. (mail-received command)

My notify daemon was crashing and restarting in a loop due to some dbus
weirdness.

This had nothing to do with aerc, but this made me realize that maybe some
configuration option to define a timeout when running an external command and
display an helpful error message could be something aerc could do. Even if I am
not convinced it would be something aerc should be responsible of. Just that it
was something silly and it consumed quite some time to be debugged, so if it is
possible to avoid this to others in the futures.

Regards




-- 
Nicolas Goy
Developer and electronic engineer
Goyman SA

https://kuon.ch
https://goyman.com
Details
Message ID
<D1O3RTYC8L6F.1XR6Q5DE3KXRR@ferdinandy.com>
In-Reply-To
<D1NMPXBVP4EF.2M5R0CG1KPQZA@kuon.ch> (view parent)
DKIM signature
missing
Download raw message
On Fri May 31, 2024 at 08:51, Nicolas Goy <me@kuon.ch> wrote:
> Hello,
>
> I was able to use this method to find out that my notify command caused the
> hang. (mail-received command)
>
> My notify daemon was crashing and restarting in a loop due to some dbus
> weirdness.
>
> This had nothing to do with aerc, but this made me realize that maybe some
> configuration option to define a timeout when running an external command and
> display an helpful error message could be something aerc could do. Even if I am
> not convinced it would be something aerc should be responsible of. Just that it
> was something silly and it consumed quite some time to be debugged, so if it is
> possible to avoid this to others in the futures.

Yeah, if failing hooks could also log their output that would be great :)

>
> Regards




-- 
+36305425054
bence.ferdinandy.com
Reply to thread Export thread (mbox)