Bug 3855 - Claws mail segfault at startup with old profile and IMAP account (bisected)
Summary: Claws mail segfault at startup with old profile and IMAP account (bisected)
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Folders/IMAP (show other bugs)
Version: 3.15.0
Hardware: PC Linux
: P3 critical
Assignee: users
URL:
: 3879 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-02 23:21 UTC by Julien
Modified: 2017-08-21 17:07 UTC (History)
1 user (show)

See Also:


Attachments
Claws mail error at startup (2.65 KB, application/octet-stream)
2017-08-02 23:21 UTC, Julien
no flags Details
Claws mail error at startup (2.65 KB, text/plain)
2017-08-02 23:24 UTC, Julien
no flags Details
Complete (hopefully) stacktrace (13.68 KB, text/plain)
2017-08-03 19:01 UTC, Julien
no flags Details
Dummy profile (17.22 KB, application/x-bzip)
2017-08-03 19:22 UTC, Julien
no flags Details

Description Julien 2017-08-02 23:21:22 UTC
Created attachment 1770 [details]
Claws mail error at startup

Hello,

I'm the maintainer of claws mail on Mageia (mga). Due to the lateness of mageia 6, we made a jump from claws 3.11.1 to 3.15.0.

After the upgrade, we got reports (https://bugs.mageia.org/show_bug.cgi?id=20970) of segfault during startup if claws is used with a profile from mga5 (I attach the error message). A new profile doesn't have the problem.

a bisection point to this commit :

300f811f3bbf10455ca55d9b01da6705dd1e07bb is the first bad commit
commit 300f811f3bbf10455ca55d9b01da6705dd1e07bb
Author: Ricardo Mones <ricardo@mones.org>
Date:   Sat Feb 25 13:14:35 2017 +0100

    Remove duplicated code and include


I remarked than v3.14 modify accountrc and clawsrc and if I reflect the modification to my old profile and open it with v3.15.0, the crash disappears :
in accountrc, modify protocol from value 3 to value 1
in clawsrc, add config_version=2 just below [Common] at the start of the file.

thanks
regards

Julien
Comment 1 Julien 2017-08-02 23:22:04 UTC
I forgot to add that the problem is still present with git from today.

regards
Julien
Comment 2 Julien 2017-08-02 23:24:06 UTC
Created attachment 1771 [details]
Claws mail error at startup

Use the correct mimetype this time
Comment 3 Ricardo Mones 2017-08-03 18:13:40 UTC
Can you get a full backtrace with symbols of the crash?

Mageia's bug traceback is suspiciously similar to a recently closed Debian bug https://bugs.debian.org/868700 which appeared to be caused by old libraries.

Thanks in advance,
Comment 4 Ricardo Mones 2017-08-03 18:53:32 UTC
If you can provide a tarball of a .claws-mail directory from Mageia with a dummy account which makes it crash it would be appreciated too :-)
Comment 5 Julien 2017-08-03 19:01:04 UTC
Created attachment 1772 [details]
Complete (hopefully) stacktrace

Here is the trace with all debuginfo.
Comment 6 Andrej Kacian 2017-08-03 19:07:16 UTC
I propose:
 - a quick, short-term solution, reverting the mentioned commit and bringing back the original imap_folder_get_path() function,
 - a long-term solution, separating accounts config_version update (with per-account config_version, or a global one on top of accountrc file), and running it just after loading the accounts from accountrc, before loading folders
Comment 7 Julien 2017-08-03 19:22:28 UTC
Created attachment 1773 [details]
Dummy profile

Dummy profile created with claws 3.11 on mageia 5 which exhibit the crash when used on mageia 6 with claws 3.15.0


Like with my personnal profile, if I edit accountrc (protocol=3 => 1) and clawsrc (add config_version=2) the crash disappears.

regards
Julien
Comment 8 users 2017-08-09 17:10:02 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2017-08-09 17:10:02.359618626 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=3550790cd80decd8e3509e2e14ead365cf23c7e7
Merge: bbf3f0f 667c9d3
Author: Colin Leroy <colin@colino.net>
Date:   Wed Aug 9 17:10:01 2017 +0200

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=667c9d3eaf0487193cc7873e6d3a63959a03d7f9
Author: Ricardo Mones <ricardo@mones.org>
Date:   Wed Aug 9 16:48:38 2017 +0200

    Fix bug #3855: segfault at startup with old profile and IMAP account
    
    Revert "Remove duplicated code and include".
    
    This reverts commit 300f811f3bbf10455ca55d9b01da6705dd1e07bb.
Comment 9 Julien 2017-08-14 21:59:37 UTC
Hi,

the patch in git fix the crash.

Thanks :)
regards
Julien
Comment 10 Ricardo Mones 2017-08-21 17:07:01 UTC
*** Bug 3879 has been marked as a duplicate of this bug. ***
Comment 11 users 2017-09-21 10:25:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2017-09-21 10:25:02.852051630 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=f37bf609960848db3a671fb4c914ea7153b6cf7d
Merge: 456c54b 130c1bd
Author: Colin Leroy <colin@colino.net>
Date:   Thu Sep 21 10:25:02 2017 +0200

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=130c1bd6b45d1c4333d43e97554c543945d33585
Author: Ricardo Mones <ricardo@mones.org>
Date:   Wed Sep 20 22:06:03 2017 +0200

    Revert "Fix bug #3855: segfault at startup with old profile and IMAP account"
    
    Thanks to commit c3167bf1a4bf76a75813856d48e9d3c00f6c3849 which allows
    to access folder class functions at earlier stages without causing #3855.
    
    This reverts commit 667c9d3eaf0487193cc7873e6d3a63959a03d7f9.

Note You need to log in before you can comment on or make changes to this bug.