Bug 2715 - Crash during startup after accepting certificate (ssl)
: Crash during startup after accepting certificate (ssl)
Status: RESOLVED FIXED
Product: Email
General
: unspecified
: All Linux
: Medium normal (vote)
: ---
Assigned To: unassigned
: modest-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2008-01-05 19:07 UTC by Krischan Keitsch
Modified: 2008-12-06 15:21 UTC (History)
1 user (show)

See Also:


Attachments


Note

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


Description Krischan Keitsch (reporter) 2008-01-05 19:07:54 UTC
STEPS TO REPRODUCE THE PROBLEM:
After updating to 1.0-2008.02-2 modest crashes after promting "Trying to
establish secure connection to server blablabla with an unknown certificate."

Two accounts are configured, both use ssl. The second account works after
accepting the certificate.

EXPECTED OUTCOME:
Accepting certificate and list available emails.

ACTUAL OUTCOME:
Modest crashes. No further information.

REPRODUCIBILITY:
always

EXTRA SOFTWARE INSTALLED:
lots

OTHER COMMENTS:
Instead of accepting the certificate it is possible to cancel. The application
will then continue to work with my second email account.
This problem did not occur with the previous version of modest.

If further information is required please email me. Thank you.

Krischan
Comment 1 Dirk-Jan C. Binnema nokia 2008-01-08 23:15:57 UTC
hmmm (i guess this counts as 'email you' :)

what imap server are using (which one makes modest crash?)

[ you can email me directly if you don't want to put information here ]
Comment 2 Krischan Keitsch (reporter) 2008-01-12 14:06:22 UTC
(In reply to comment #1)
> hmmm (i guess this counts as 'email you' :)
> 
> what imap server are using (which one makes modest crash?)
> 
> [ you can email me directly if you don't want to put information here ]
> 
Hi,
the imap server is: mail.cs.tu-berlin.de

Does that information help you?
By the way the problem remains with latest version 1.0-2008.03-1.

Krischan
Comment 3 Tilman Vogel 2008-01-15 01:47:17 UTC
I think, I have the same problem with the same version.

run-standalone.sh modest showui

reveals that after accepting the SSL certificate and entering the password,
modest is struck by a segmentation fault.
Comment 4 Dirk-Jan C. Binnema nokia 2008-01-18 17:21:50 UTC
can you try again (we just made a new version available with some fixes);
thanks!
Comment 5 Krischan Keitsch (reporter) 2008-01-18 18:28:35 UTC
Good news. Import of the ssl certificate worked fine. No crash!
Thank you very much. Keep up the good work.
Comment 6 Tilman Vogel 2008-01-18 22:18:06 UTC
(In reply to comment #4)

Ok, I tried again with 1.0-2008.04-1 and it still crashes the same way. Sorry!
Comment 7 Tilman Vogel 2008-01-18 22:32:11 UTC
(In reply to comment #6)

I just realise, I am probably commenting in the wrong bug as my crash comes
after the password prompt, not after accepting the certificate...
Comment 8 Tilman Vogel 2008-01-18 22:50:07 UTC
The last ltrace lines before the crash are:

gtk_events_pending(0, 1, 0, 1, 975784)                        = 1
gtk_main_iteration(1, 1, 1, 1, 0)                             = 0
g_free(966160, 0x411a3a9c, 0, 1, 0)                           = 971104
g_str_hash(0x18ccb8, 0x18ccb8, 0x18ccb8, 958132, 946460)      = 0x5be974c0
g_str_equal(0x1b94f8, 0x18ccb8, 815056, 128992, 946460)       = 1
g_type_instance_get_private(0x149128, 0x139f68, 0x139f68, 0, 0x18c950) =
0x149228
dbus_message_is_signal(0x18c950, 738980, 738968, 0, 968384)   = 0
+++ killed by SIGTRAP +++


strace doesn't give anything sensible...

Shall I try to get a core file?
Comment 9 Tilman Vogel 2008-01-18 23:42:31 UTC
Ok, I think I traced down the problem (thanks to gdb):

My IMAP server doesn't seem to support namespaces, so the code reaches line
tinymail/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c:1923

But in my case (store->summary == NULL) such that a strlen(store->summary)
inside 
camel_imap_store_summary_namespace_new() causes the Segfault.

I tried manually to "jump 1927" which gets me past the point of segfault and
shows all my IMAP folders :-))

As I don't really understand the code, I don't want to propose any concrete
patch but maybe this ad-hoc observation helps somehow?
Comment 10 Tilman Vogel 2008-01-18 23:45:27 UTC
Sorry to comment in such small bits, but even though all my folders are shown
after the jump, only the INBOX lists any contents.
Comment 11 Tilman Vogel 2008-01-19 00:05:15 UTC
Sorry, I meant (store->namespace == NULL).
Comment 12 Dirk-Jan C. Binnema nokia 2008-01-26 20:48:12 UTC
thanks for the analysis!

i think it should be fixed in the latest upgrade.
Comment 13 Tilman Vogel 2008-01-31 11:43:08 UTC
No, I am sorry, it still crashes exactly the same way. This is with
1.0-2008.05-1. Also, I didn't see any changes in svn which seem to be directly
related to the problem I described.
Comment 14 Dirk-Jan C. Binnema nokia 2008-01-31 19:12:52 UTC
actually, the change was in tinymail, not modest, so that's why it didn't show
up in svn.

do you have some test account at the server?
Comment 15 Tilman Vogel 2008-02-01 00:21:08 UTC
(In reply to comment #14)
> actually, the change was in tinymail, not modest, so that's why it didn't show
> up in svn.

Well, I looked at the tinymail svn of course. Actually at

tinymail/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c
tinymail/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store-summary.c
Revision: 3299

> do you have some test account at the server?

Not really, but it's the freenet.de imap server at mx.freenet.de. I think you
can register an account there for free.

The problem is in
camel_imap_store_summary_namespace_newcamel_imap_store_summary_namespace_new(CamelImapStoreSummary
*s, const char *full_name, char dir_sep)

In my case, this function is called with full_name == NULL. full_name is
g_strdup()ped to ns->full_name, giving another NULL pointer and then strlen()
is called on ns->full_name causing a segfault...
Comment 16 Dirk-Jan C. Binnema nokia 2008-02-06 19:45:42 UTC
hmmm.... i remember something very similar having been fixed,
but if you can still reproduce it... we'll take a look.
Comment 17 Philip Van Hoof 2008-02-09 12:32:08 UTC
Excellent bug report, splendid observations, thanks and fixed

http://tinymail.org/trac/tinymail/changeset/3384
Comment 18 Dirk-Jan C. Binnema nokia 2008-02-09 13:00:53 UTC
thanks philip; fix is in tinymail svn, and our next release.
Comment 19 Tilman Vogel 2008-02-21 11:15:47 UTC
Yes, thanks! Works for me now!