Sylpheed-CRITICAL **: file imap.c: line 2244 (imap_get_header): assertion `*cur_pos == '{'' failed. Sylpheed version 0.9.9claws GTK+ version 1.2.10 Features: gdk-pixbuf IPv6 libcompface GPGME OpenSSL LDAP GNU/aspell Operating system: Linux 2.6.1-1.149 (i686) C Library: GNU libc 2.3.2 -- Using host libthread_db library "/lib/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread -150649664 (LWP 28321)] 0x00678c32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #0 0x00678c32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x00522b03 in __waitpid_nocancel () from /lib/tls/libpthread.so.0 #2 0x080a4f1a in crash_handler (sig=0) at crash.c:536 #3 <signal handler called> #4 string_getline (buf=0xfef0af40 "\r\n", len=8192, str=0xfef0cf80) at procheader.c:78 #5 0x08137b84 in generic_get_one_field (buf=0xfef0af40 "\r\n", len=8192, data=0xfef0cf80, hentry=0x81df1e0, getline=0x8137ac0 <string_getline>, peekchar=0x8137b10 <string_peekchar>, unfold=1) at procheader.c:112 #6 0x08137ab1 in string_get_one_field (buf=0x0, len=0, str=0x0, hentry=0x0) at procheader.c:70 #7 0x08138289 in parse_stream (data=0xfef0cf80, isstring=1, flags={perm_flags = 0, tmp_flags = 524288}, full=0, decrypted=0) at procheader.c:729 #8 0x08138156 in procheader_parse_str (str=0x0, flags={perm_flags = 0, tmp_flags = 136180192}, full=0, decrypted=0) at procheader.c:484 #9 0x080d2d67 in imap_parse_envelope (sock=0x99561e8, item=0x0, line_str=0x9884180) at imap.c:2393 #10 0x080d1669 in imap_get_uncached_messages (session=0x9959c70, item=0x9956840, numlist=0x0) at imap.c:1875 #11 0x080d648a in imap_get_msginfos (folder=0x99693c0, item=0x9956840, msgnum_list=0x9b94c28) at imap.c:3905 #12 0x080bec9b in folder_item_scan_full (item=0x9956840, filtering=1) at folder.c:1576 #13 0x080bf349 in folder_item_read_cache (item=0x9956840) at folder.c:1778 #14 0x080bf67d in folder_item_get_msg_list (item=0x9956840) at folder.c:1864 #15 0x080c1daa in folder_item_apply_processing (item=0x9956840) at folder.c:3002 #16 0x080e6e08 in initial_processing (item=0x9956840, data=0x989dac8) at main.c:578
For the original poster: What IMAP server? Christoph: syntax alright (compliant IMAP server)? It's a NULL pointer param deref: #8 0x08138156 in procheader_parse_str (str=0x0, flags={perm_flags = 0, tmp_flags = 136180192}, full=0, decrypted=0) at procheader.c:484 src/imap.c: cur_pos = imap_get_header(sock, cur_pos, &headers, line_str); msginfo = procheader_parse_str(headers, flags, FALSE, FALSE); Extra check for cur_pos won't hurt too.
the problem exists since v0.9.7, v0.9.6 works fine with oure company imap server. no problem with other IMAP server. Only the with the server @ works crashs SC. $ nc 10.1.24.254 143 * OK liznt.nuhq.nunet IMAP4rev1 v12.250 server ready
I got a related crash using 0.9.9 with UW IMAP. I am including the mail that I sent to the list with more details (unfortunately, I don't have the full bt since I did not get it the first time and now I can't reproduce the error): From: Dimitar Haralanov <voidtrance@comcast.net> To: Sylpheed-Claws List <sylpheed-claws-users@lists.sourceforge.net> Subject: Crash with 0.9.9 went rebuilding folder trees Date: Mon, 9 Feb 2004 15:50:10 -0800 Sender: sylpheed-claws-users-admin@lists.sourceforge.net X-Mailer: Sylpheed version 0.9.9claws (GTK+ 1.2.10; i686-pc-linux-gnu) I downloaded, compiled, and installed sylpheed-claws 0.9.9 which I use for personal and work email. The work email is an IMAP account which gets accessed over an SSH tunel (which doesn't really have anything to do with the problem, but...) Today, I had to rebuild my folder tree of the IMAP work account. While sylpheed was cranking along on it, it crashed. I re-ran with with gdb and I got the following backtrace: ================================================================================ ================= Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 13074)] 0x08116371 in string_getline ( buf=0xbfffaab0 "58.GA1118@lazy.shackne20040206095058.GA1118@lazy. shacknesage-ID: <20040206095058.GA1118@lazy.shackneD: <20040206095058. GA1118@lazy.shackneri, 6 Feb 2004 10:50:58 +0100\r\nFrom: hungerburg <nospam@lazy.s"..., len=8192, str=0xbfffcb00) at procheader.c:78 78 if (!**str) (gdb) p str $1 = (char **) 0xbfffcb00 (gdb) p *str $2 = 0x0 (gdb) bt #0 0x08116371 in string_getline ( buf=0xbfffaab0 "58.GA1118@lazy.shackne20040206095058.GA1118@lazy. shacknesage-ID: <20040206095058.GA1118@lazy.shackneD: <20040206095058. GA1118@lazy.shackneri, 6 Feb 2004 10:50:58 +0100\r\nFrom: hungerburg <nospam@lazy.s"..., len=8192, str=0xbfffcb00) at procheader.c:78 #1 0x08116419 in generic_get_one_field ( buf=0xbfffaab0 "58.GA1118@lazy.shackne20040206095058.GA1118@lazy. shacknesage-ID: <20040206095058.GA1118@lazy.shackneD: <20040206095058. GA1118@lazy.shackneri, 6 Feb 2004 10:50:58 +0100\r\nFrom: hungerburg <nospam@lazy.s"..., len=8192, data=0xbfffcb00, hentry=0x81b2140, getline=0x8116360 <string_getline>, peekchar=0x81163b0 <string_peekchar>, unfold=1) at procheader.c:112 #2 0x08116357 in string_get_one_field ( buf=0xbfffaab0 "58.GA1118@lazy.shackne20040206095058.GA1118@lazy. shacknesage-ID: <20040206095058.GA1118@lazy.shackneD: <20040206095058. GA1118@lazy.shackneri, 6 Feb 2004 10:50:58 +0100\r\nFrom: hungerburg <nospam@lazy.s"..., len=8192, str=0xbfffcb00, hentry=0x81b2140) at procheader.c: 70 #3 0x08116a4c in parse_stream (data=0xbfffcb00, isstring=1, flags={perm_flags = 0, tmp_flags = 3221195292}, full=0, decrypted=0) at procheader.c:729 #4 0x08116931 in procheader_parse_str (str=0x0, flags={perm_flags = 0, tmp_flags = 524288}, full=0, decrypted=0) at procheader.c:484 #5 0x080c1e38 in imap_parse_envelope (sock=0x8284c30, item=0x0, line_str=0x820d238) at imap.c:2393 #6 0x080c0b23 in imap_get_uncached_messages (session=0x8611728, item=0x860fb98, numlist=0x83cf690) at imap.c:1875 #7 0x080c4e25 in imap_get_msginfos (folder=0x82dcd38, item=0x860fb98, msgnum_list=0x83cf690) at imap.c:3905 #8 0x080b0dfa in folder_item_scan_full (item=0x860fb98, filtering=0) at folder. c:1576 #9 0x080af7f0 in folder_scan_tree_func (node=0x0, data=0x8284c10) at folder.c: 731 #10 0x4042be7c in g_node_last_sibling () from /usr/lib/libglib-1.2.so.0 #11 0x4042a777 in g_node_traverse () from /usr/lib/libglib-1.2.so.0 #12 0x080af873 in folder_scan_tree (folder=0x82d40a4) at folder.c:758 #13 0x080b63c9 in folderview_rescan_tree (folder=0x82dcd38) at folderview.c:847 #14 0x4017f809 in gtk_item_factory_new () from /usr/lib/libgtk-1.2.so.0 (gdb) l 847 folder_scan_tree(folder); 848 folder_set_ui_func(folder, NULL, NULL); 849 850 folderview_set_all(); 851 852 gtk_widget_destroy(window); 853 inc_unlock(); 854 } 855 856 /** folderview_check_new() (gdb) ================================================================================ ================= At that point, I changed procheader.c (line 78) to the following
ok, i dont now what i do, but here is output of gdb ;) i try to attach this as file... 1.) add my account from work 2.) close sc (so i dont lost the account entry after segfault) 3.) restart and klick INBOX in the new account. Now sc crashs see attachment cya later /stephan
Created attachment 127 [details] bt of the crash i can reproduce this crash every time since SC v0.9.7
if this still happens, can any of you run sylpheed under valgrind?
In both BTs I see the following: #5 0x080d2d67 in imap_parse_envelope (sock=0x9c3e518, item=0x0, line_str=0x9b6d188) at imap.c:2393 #6 0x080d1669 in imap_get_uncached_messages (session=0x9c61e78, item=0x9c58de0, numlist=0x0) at imap.c:1875 #7 0x080d648a in imap_get_msginfos (folder=0x9c573a0, item=0x9c58de0, msgnum_list=0x9c25268) at imap.c:3905 What strikes me is that numlist (#6) is NULL, though it should have the same value as msgnum_list. Here's the code that leads to the offending call, imap.c, imap_get_msginfos(), line 3904-3915: session = imap_session_get(folder); g_return_val_if_fail(session != NULL, NULL); ok = imap_select(session, IMAP_FOLDER(folder), item->path, NULL, NULL, NULL, NULL); if (ok != IMAP_SUCCESS) return NULL; if (!(item->stype == F_QUEUE || item->stype == F_DRAFT)) { ret = g_slist_concat(ret, imap_get_uncached_messages( session, item, msgnum_list)); } else { I strongly some stack badness is happening in imap_select().
$ valgrind sylpheed [...] ==8511== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap() --8506-- FATAL: unhandled syscall: 7 --8506-- Do not panic. You may be able to fix this easily. --8506-- Read the file README_MISSING_SYSCALL_OR_IOCTL. [...] sched status: Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0 ==8506== at 0x8C4858: __GI___libc_waitpid (in /lib/libc-2.3.2.so) ==8506== by 0x9B2BEF: _gpgme_ath_waitpid (in /usr/lib/libgpgme.so.6.3.6) ==8506== by 0x9B366A: _gpgme_io_waitpid (in /usr/lib/libgpgme.so.6.3.6) ==8506== by 0x9B3554: _gpgme_io_spawn (in /usr/lib/libgpgme.so.6.3.6) ==8511== discard syms in /lib/libnss_files-2.3.2.so due to munmap() ==8511== ==8511== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 18 from 2) ==8511== malloc/free: in use at exit: 641169 bytes in 31457 blocks. ==8511== malloc/free: 48963 allocs, 17506 frees, 1874981 bytes allocated. ==8511== For a detailed leak analysis, rerun with: --leak-check=yes ==8511== For counts of detected errors, rerun with: -v
That syscall thing is Valgrind saying that it did not implement something. Try running the thing with: % valgrind --num-callers=20 --log-file=SYLPHEED-LOG (This will result in a log file called SYLPHEED.LOG.<some pid>) If the resulting file is not too big, attach it to this report. Thanks.
Is this still with version 0.9.9?
Created attachment 133 [details] valgrind output same as before imo $ sylpheed --version Sylpheed version 0.9.9claws11 its still version 0.9.9 because i cant compile 0.9.10 $ ./autogen.sh [...] Copying file m4/ulonglong.m4 aclocal: configure.ac: 236: macro `AM_PATH_OPENSSL' not found in library aclocal: configure.ac: 283: macro `AM_PATH_ASPELL' not found in library but this is another problem and offtopic in this place ;)
what about latest CVS?
same as before. s-c crashs after clicking INBOX Sylpheed-CRITICAL **: file imap.c: line 2249 (imap_get_header): assertion `*cur_pos == '{'' failed.
with current cvs (gtk1||gtk2) i can read mails and change folders. but when i try to delete one mail i get the same error as before (sylpheed:22910): Sylpheed-CRITICAL **: file imap.c: line 2249 (imap_get_header): assertion `*cur_pos == '{'' failed Speicherzugriffsfehler
i edit src/imap.c like this (line 2248) + debug_print("1: cur_pos = %d (%s)\n", cur_pos, cur_pos); while (isspace(*(guchar *)cur_pos)) cur_pos++; + debug_print("2: cur_pos = %d (%s)\n", cur_pos, cur_pos); now i have a look at the --debug output and post the truncat stuff in a attachement. i remove my Trashfolder (rm -fr) and create a new empty folder, and now it works
Created attachment 148 [details] debug output after edit src/imap.c
*** Bug 563 has been marked as a duplicate of this bug. ***
I tried to reproduce the crash with a mail without any header that sylpheed fetches and it does not crash here. Can you please add the log of the IMAP session.
what about -> http://www.thewildbeast.co.uk/sylpheed-claws/bugzilla/attachment.cgi?id=148&action=view i cant reproduce it since delete my Trashfolder on the server... sorry :(
Yes the debug output shows the problem too. It is a problem of the pretty lame IMAP response parser of sylpheed. I'll try to fix it.
Created attachment 155 [details] output from sylpheed --debug today a got another mail the force crashs sc a can read this mail, but after delete them (C^d) sc crashs. after crash the mail is in Trashfolder, and i can read this mail, but when i move the mail in another folder sylpheed crashs again. i will create another attachment with the mail an another with output of etheral PS: the same mail works fine on my IMAP Server at home
Created attachment 156 [details] sypheed crashs when i move this mail
Created attachment 157 [details] etheral output when sc moves the bad mail
Should be fixed in 1.9.11cvs32
*** Bug 728 has been marked as a duplicate of this bug. ***
works fine here thanks!