#972928 claws-mail: Crash when attempted to enter IMAP folder

Package:
claws-mail
Source:
claws-mail
Description:
Fast, lightweight and user-friendly GTK based email client
Submitter:
curious_debian
Date:
2020-11-20 00:36:02 UTC
Severity:
normal
Tags:
#972928#5
Date:
2020-10-26 10:33:35 UTC
From:
To:
When attempted to enter IMAP folder, window instantly dissapeared (crash)

dmesg:

[Mon Oct 26 10:23:55 2020] claws-mail[1879911]: segfault at 1f ip
00000000004a35bd sp 00007ffe5872a4e0 error 4 in claws-mail[442000+230000]
[Mon Oct 26 10:23:55 2020] Code: 30 85 c0 0f 84 a4 02 00 00 c7 05 3e f6 2e 00
00 00 00 00 31 f6 48 89 df e8 c0 fc ff ff 49 8b 84 24 88 00 00 00 48 85 c0 74
19 <48> 8b 00 31 f6 83 38 04 48 8b 43 50 40 0f 94 c6 48 8b 78 30 e8 5a

Context: Folder I was entering to was just downloaded via "Check for new
folders" option.

Using Debian Stable AMD64.

#972928#10
Date:
2020-10-31 11:27:40 UTC
From:
To:
control: tags -1 moreinfo

Is that reproducible? I've seen similar sporadic segfaults in the past
and is unlikely is Claws Mail fault only. You can try translate the
faulting address into some more meaningful, see [1]. Also, if it's
reproducible you'll have to install debugging packages and get a proper
backtrace [2].

regards,

[1] https://stackoverflow.com/a/2549363
[2] https://wiki.debian.org/HowToGetABacktrace

#972928#17
Date:
2020-10-31 22:05:39 UTC
From:
To:
This now leaves some trail:

$ addr2line -e /usr/bin/claws-mail -f 00000000004a35bd
folderview_close_opened
??:?

I've never encountered it before. If it happens again, I will attach it
to the debugger.

#972928#22
Date:
2020-11-02 15:09:21 UTC
From:
To:
Dear Maintainer,
I just came across this report and want to note that since ASLR
got quite common the addr2line method is unreliable.

Therefore I want to point to here [1], were another method is
described to find out the source line where a crash happened.

Attached file contains this exercised for the given output
in the first message.
This would point to [3], folderview.c, line 2339.

The most convenient way I guess is to install a coredump collector,
and inspect that after a crash like in [2] you already mentioned.

Kind regards,
Bernhard


[1] https://wiki.debian.org/InterpretingKernelOutputAtProcessCrash
[2] https://wiki.debian.org/HowToGetABacktrace
[3] https://sources.debian.org/src/claws-mail/3.17.3-2/src/folderview.c/#L2339

#972928#27
Date:
2020-11-20 00:27:02 UTC
From:
To:
Hi Bernhard,

Many thanks for this, I hadn't realized ASLR was invalidating the
addr2line method.

[...]

A master class in debugging, thanks again!

Interesting that latter link, the list of suspiciously similar bugs is
really a bit worrying.

Looking at the code, the usage of a static variable can_select on that
function to act as a kind of mutex (which is not) is probably the cause
of those random crashes, that of course are hard to reproduce.

regards,