Bug 3436 - claws-mail segfaults when trying to connect to IMAP server
Summary: claws-mail segfaults when trying to connect to IMAP server
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Folders/IMAP (show other bugs)
Version: 3.11.1
Hardware: PC Linux
: P3 blocker
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2015-06-10 15:26 UTC by Rob Campbell
Modified: 2015-06-16 16:25 UTC (History)
1 user (show)

See Also:


Attachments
output of backtrace with new IMAP account created (11.66 KB, text/x-log)
2015-06-10 15:26 UTC, Rob Campbell
no flags Details
A different backtrace output (10.21 KB, text/plain)
2015-06-10 17:15 UTC, Rob Campbell
no flags Details

Description Rob Campbell 2015-06-10 15:26:43 UTC
Created attachment 1514 [details]
output of backtrace with new IMAP account created

This morning claws-mail suddenly crashed with a segmentation fault when starting up.  I ran the debug version with gdb and got a backtrace.  I thought it was something to do with the "gdata" plugin, so I tried removing that by editing the clawsrc file.  Still no luck, so I moved the .claws-mail directory out of the way and started afresh.  When creating a gmail account, it crashed again as soon as it tried to access it.  The attached backtrace is from the latter (I thought it might be simpler).
Comment 1 Rob Campbell 2015-06-10 15:38:23 UTC
It appears that this segfault only occurs with SSL-enabled IMAP.  I have a different account that doesn't use SSL and I could create an account and connect to that just fine.
Comment 2 Rob Campbell 2015-06-10 16:26:18 UTC
In trying to figure out what might have changed between yesterday when it ran fine and today, I looked at what other packages changed on my system (Debian Testing amd64).  The only changes to claws-mail's dependencies between when I started the program yesterday and when I restarted it today were updates to the packages:

libldap-2.4-2
libarchive13
Comment 3 Michael Rasmussen 2015-06-10 16:54:26 UTC
(In reply to comment #2)
> In trying to figure out what might have changed between yesterday when it
> ran fine and today, I looked at what other packages changed on my system
> (Debian Testing amd64).  The only changes to claws-mail's dependencies
> between when I started the program yesterday and when I restarted it today
> were updates to the packages:
> 
> libldap-2.4-2
> libarchive13

These packages is not relevant for the bug in question. What is relevant is this from your debug log:
imap-thread.c:409:generic_cb
ssl_certificate.c:260:got 180 certs in crt_list! 0x7fffffffdd18
ssl_certificate.c:429:didn't get /home/rlc/.claws-mail/certs/imap.gmail.com.993.cert

Does this file exist: /home/rlc/.claws-mail/certs/imap.gmail.com.993.cert

I guess not and then claws fails to fetch/show the certificate from gmail.
Comment 4 Rob Campbell 2015-06-10 17:15:13 UTC
Created attachment 1515 [details]
A different backtrace output

This is the output of the backtrace for the original IMAP accounts rather than when trying to run claws-mail on a fresh directory tree.
Comment 5 Rob Campbell 2015-06-10 17:16:51 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > In trying to figure out what might have changed between yesterday when it
> > ran fine and today, I looked at what other packages changed on my system
> > (Debian Testing amd64).  The only changes to claws-mail's dependencies
> > between when I started the program yesterday and when I restarted it today
> > were updates to the packages:
> > 
> > libldap-2.4-2
> > libarchive13
> 
> These packages is not relevant for the bug in question. What is relevant is
> this from your debug log:
> imap-thread.c:409:generic_cb
> ssl_certificate.c:260:got 180 certs in crt_list! 0x7fffffffdd18
> ssl_certificate.c:429:didn't get
> /home/rlc/.claws-mail/certs/imap.gmail.com.993.cert
> 
> Does this file exist: /home/rlc/.claws-mail/certs/imap.gmail.com.993.cert
> 
> I guess not and then claws fails to fetch/show the certificate from gmail.

Well that was when I moved the original .claws-mail and Claws_Mail directories out of the way and started creating a fresh gmail account.  So, no, the certificate wasn't there.  I've attached another backtrace file from when the original .claws-mail and Claws_Mail directories were put back so that it is trying to access my original IMAP accounts (work and gmail).
Comment 6 Rob Campbell 2015-06-10 18:44:43 UTC
Sigh...  I tried on two other computers and tried to set up the same set of accounts.  One worked fine the other also segfaulted.  Both machines are also running the Debian Testing distribution.  The one that segfaulted is an amd64 while the one that did not is i386.
Comment 7 Rob Campbell 2015-06-16 16:25:47 UTC
I'm marking this as resolved.  I got the 32-bit version to work instead.  And then after seeing that the libgnutls package was updated, tried re-installing the 64-bit version and it seems to work fine.  I don't know for sure that libgnutls was the problem, but the segfault did seem to happen only when connecting to an IMAP server using TLS. 

Sorry for the noise!

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