After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 612178 - Crash in camel_exchange_utils_send_message at camel-exchange-utils.c line 3005
Crash in camel_exchange_utils_send_message at camel-exchange-utils.c line 3005
Status: RESOLVED FIXED
Product: Evolution Exchange
Classification: Deprecated
Component: Connector
2.29.x
Other Linux
: Normal critical
: ---
Assigned To: Milan Crha
Ximian Connector QA
: 619168 619831 619912 620228 620979 621501 621658 621801 621964 622620 622701 623745 623834 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-03-08 12:01 UTC by Andreas Proschofsky
Modified: 2010-07-14 09:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
valgrind log file (78.50 KB, text/plain)
2010-04-20 06:38 UTC, Sepp O.
  Details
valgrind report for evolution (10.31 KB, text/x-log)
2010-05-21 07:24 UTC, ben.szurpit
  Details
second try (3.27 KB, text/x-log)
2010-05-21 09:12 UTC, ben.szurpit
  Details
camel_exchange_utils_send_message (332.05 KB, application/x-gzip)
2010-06-16 10:21 UTC, Felix Fritzsche
  Details
proposed eex patch (1.38 KB, patch)
2010-06-16 16:20 UTC, Milan Crha
committed Details | Review
Sent folder copy gdb output (8.29 KB, text/plain)
2010-07-14 06:43 UTC, Gabor SZOLLOSI
  Details
evo patch (gnome-2-30) (10.32 KB, patch)
2010-07-14 08:54 UTC, Milan Crha
committed Details | Review
eex patch (gnome-2-30) (4.83 KB, patch)
2010-07-14 08:57 UTC, Milan Crha
committed Details | Review

Description Andreas Proschofsky 2010-03-08 12:01:02 UTC
The following happens on every try to send a message (directly after hitting the send- button). This only happens with evolution-exchange messages:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xaa3bcb70 (LWP 20553)]
0xb507dbaa in camel_exchange_utils_send_message (service=0x941d020, from=0xa8c057f8 "xy@xy.at", 
    recipients=0x96dfd48, message=0xffffffff, ex=0xaa3bc220) at camel-exchange-utils.c:3005
3005	camel-exchange-utils.c: No such file or directory.
	in camel-exchange-utils.c
(gdb) thread apply all bt

Thread 72 (Thread 0xaa3bcb70 (LWP 20553))

  • #0 camel_exchange_utils_send_message
    at camel-exchange-utils.c line 3005
  • #1 exchange_send_to
    at camel-exchange-transport.c line 167
  • #2 camel_transport_send_to
    at camel-transport.c line 133
  • #3 mail_send_message
    at mail-ops.c line 545
  • #4 send_queue_exec
    at mail-ops.c line 766
  • #5 mail_msg_proxy
    at mail-mt.c line 471
  • #6 g_thread_pool_thread_proxy
    at gthreadpool.c line 315
  • #7 g_thread_create_proxy
    at gthread.c line 1893
  • #8 start_thread
    at pthread_create.c line 297
  • #9 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 130

Thread 1 (Thread 0xb678c720 (LWP 20405))

  • #0 g_atomic_pointer_get
    at gatomic-gcc.c line 81
  • #1 lookup_iface_entry_I
    at gtype.c line 557
  • #2 type_lookup_iface_vtable_I
    at gtype.c line 612
  • #3 type_node_check_conformities_UorL
    at gtype.c line 3410
  • #4 type_node_conforms_to_U
    at gtype.c line 3440
  • #5 IA__g_type_check_instance_is_a
    at gtype.c line 3919
  • #6 IA__g_file_query_info_finish
    at gfile.c line 1172
  • #7 query_info_callback
    at gtkfilesystem.c line 865
  • #8 IA__g_simple_async_result_complete
    at gsimpleasyncresult.c line 588
  • #9 complete_in_idle_cb_for_thread
    at gsimpleasyncresult.c line 653
  • #10 g_idle_dispatch
    at gmain.c line 4065
  • #11 g_main_dispatch
    at gmain.c line 1960
  • #12 IA__g_main_context_dispatch
    at gmain.c line 2513
  • #13 g_main_context_iterate
    at gmain.c line 2591
  • #14 IA__g_main_loop_run
    at gmain.c line 2799
  • #15 IA__gtk_main
    at gtkmain.c line 1219
  • #16 main
    at main.c line 607

Comment 1 Milan Crha 2010-03-19 20:32:58 UTC
Thanks for a bug report. The message=0xffffffff is an invalid pointer for some reason. I guess it's related to the message structure, because when I try to send a simple plain text email, then it's working fine here. Neither valgrind claims anything about the sending.

Could you try to send a simple plain text message, or whether it's a message structure dependant at all, and maybe run Evolution under valgrind (like "valgrind evolution &>v.log") and see whether it'll claim anything related in time of the sending of the email, please? Thanks in advance.
Comment 2 Sepp O. 2010-04-20 06:37:03 UTC
I have the same problem with evolution 2.30.01 and evolution-exchange 2.30.0.
I tried to send a simple plain text message and after hitting the send button evolution crashes:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xa7670b70 (LWP 23432)]
0xab480b3d in camel_exchange_utils_send_message ()
   from /usr/lib/evolution-data-server-1.2/camel-providers/libcamelexchange.so
(gdb) thread apply all bt


I'll attach a valgrind log file.
Comment 3 Sepp O. 2010-04-20 06:38:29 UTC
Created attachment 159139 [details]
valgrind log file
Comment 4 Andreas Proschofsky 2010-04-26 09:00:54 UTC
Still having the problem with Evolution 2.30.1, happens every time, also with plain text messages (which I send by default anyway)
Comment 5 Milan Crha 2010-04-26 16:34:59 UTC
I also tried to reproduce this with just released 2.30.1 (gnome-2-30 branch of gtkhtml, evolution-data-server, evolution, evolution-exchange and evolution-mapi (the last is unrelated to this issue)) and I cannot reproduce this, neither valgrind shows anything related to me.

Sepp, that yours is showing quite many issues with Python, I would guess disabling Python plugin may help you, maybe. 

> Thread 6:
> Invalid read of size 4
>    at 0x7FAEB3D: camel_exchange_utils_send_message (in libcamelexchange.so)
>    by 0x7FAB703: ??? (in libcamelexchange.so)
>    by 0x43761B9: camel_transport_send_to (in libcamel-provider-1.2.so.14.0.1)
>    by 0x7E3525D: ??? (in /usr/lib/evolution/2.30/libevolution-mail.so.0.0.0)
>    by 0x7E30557: ??? (in /usr/lib/evolution/2.30/libevolution-mail.so.0.0.0)
>    by 0x5AD77D4: ??? (in /usr/lib/libglib-2.0.so.0.2400.0)
>    by 0x5AD5B84: ??? (in /usr/lib/libglib-2.0.so.0.2400.0)
>    by 0x5A5991E: start_thread (in /lib/libpthread-2.11.so)
>    by 0x5C2236D: clone (in /lib/libc-2.11.so)
>  Address 0x3 is not stack'd, malloc'd or (recently) free'd

with the above I see that you do not have installed debug info packages for evolution-exchange and evolution-data-server, but also that the evolution-exchange chose some strange pointer as a connection to use, but reading the code itself I do not see how that can happen, as either an old connection object is used, or a new one is created, otherwise NULL is returned, but here wasn't returned a NULL.
Comment 6 Andreas Proschofsky 2010-04-26 18:28:06 UTC
Just a quick note: Building without python-support didn't help here
Comment 7 Milan Crha 2010-04-27 09:26:06 UTC
I just realized that you are talking about "replying" in the bug summary, which I overlooked yesterday, and I cannot test it right now as my server is down. So I'm asking to clarify, is there the same issue when you are trying to send a fresh new email too, or this only happens when replying to an existing exchange email?
Comment 8 Andreas Proschofsky 2010-04-27 09:55:09 UTC
No, this also happens with a fresh mail, sorry for the confusion.
Comment 9 Andreas Proschofsky 2010-04-29 22:21:28 UTC
This seems to be related to bug #612802 , see:

https://bugzilla.gnome.org/show_bug.cgi?id=612082#c18

On Gentoo we also use --enable-largefile in eds, after disabling this crash here is also gone. So seems indeed like largefile-support is pretty broken.
Comment 10 Milan Crha 2010-04-30 13:05:35 UTC
Aha, thanks for the update. (I believe the first bug number is a typo.) Will we mark this as a duplicate of the other?
Comment 11 Fabio Durán Verdugo 2010-05-20 15:05:18 UTC
*** Bug 619168 has been marked as a duplicate of this bug. ***
Comment 12 ben.szurpit 2010-05-21 07:19:54 UTC
According to Fabios insctructions in Bug 619168:

- Evolution crashes when writing a new mail or replying to one
- Valgind has trouble itself, so i hope the logfile is still usefull

If you need any further information, please let me know!
Comment 13 ben.szurpit 2010-05-21 07:24:54 UTC
Created attachment 161611 [details]
valgrind report for evolution
Comment 14 Milan Crha 2010-05-21 08:25:53 UTC
Thanks for the update. Your valgrind log doesn't show anything directly related to the backtrace, unfortunately. It's pretty clean from the one in comment #3. I hoped to see something like mentioned in comment #5.
Comment 15 ben.szurpit 2010-05-21 09:12:15 UTC
one more try later.. valgrind produced a valid logfile.. please have a look, if this is more helpfull.
Comment 16 ben.szurpit 2010-05-21 09:12:35 UTC
Created attachment 161617 [details]
second try
Comment 17 Milan Crha 2010-05-21 14:49:26 UTC
Thanks, though still not. The point is to run evolution under valgrind and reproduce the crash, it'll show the issue as above. But as the valgrind log is here already, then it's not needed to spend a time on it. The problem, and reason for needinfo for this, is that there are no exact steps how to reproduce this. Do not understand me wrong, here are steps, but the bug depends also on other circumstances, which are not known at the moment. (I cannot reproduce it, for example.)

The other reason for needinfo is comment #9 and comment #10, whether also Andreas feels this one is the same as the other he found.
Comment 18 Akhil Laddha 2010-05-28 04:30:46 UTC
*** Bug 619831 has been marked as a duplicate of this bug. ***
Comment 19 Akhil Laddha 2010-05-28 08:05:43 UTC
*** Bug 619912 has been marked as a duplicate of this bug. ***
Comment 20 Akhil Laddha 2010-06-08 16:14:14 UTC
*** Bug 620979 has been marked as a duplicate of this bug. ***
Comment 21 Akhil Laddha 2010-06-14 10:58:14 UTC
*** Bug 621501 has been marked as a duplicate of this bug. ***
Comment 22 Akhil Laddha 2010-06-14 10:58:25 UTC
*** Bug 620228 has been marked as a duplicate of this bug. ***
Comment 23 Akhil Laddha 2010-06-16 03:44:54 UTC
*** Bug 621658 has been marked as a duplicate of this bug. ***
Comment 24 Felix Fritzsche 2010-06-16 06:42:33 UTC
Hello,
i have the same problem, i think.
In my bugreport 621658 i send some data. So what can i do for help you to solve the problem?
Here are much answers, i don't what i can do.

Greetings 

Felix
Comment 25 Felix Fritzsche 2010-06-16 06:47:40 UTC
I've forgotten to tel, i have an Debian System Squeeze with the latest Evolution
2.30.1.2-3. I don't think it is the large file support.

in my var log messages i have some infos like kernel messages:
Jun 15 16:26:52 p40213ff kernel: [ 6384.149700] evolution[6686]: segfault at 3 ip af555af5 sp a84ff030 error 4 in libcamelexchange.so[af536000+59000]
Jun 15 16:28:07 p40213ff kernel: [ 6459.679042] evolution[6873]: segfault at 3 ip af5d0af5 sp ac9fe030 error 4 in libcamelexchange.so[af5b1000+59000]
Jun 15 17:04:30 p40213ff kernel: [ 8641.898946] evolution[8416]: segfault at 3 ip af537af5 sp a97dc030 error 4 in libcamelexchange.so[af518000+59000]
Jun 15 17:09:19 p40213ff kernel: [ 8931.398019] evolution[8703]: segfault at 6 ip b654863a sp aaefba7c error 4 in libc-2.11.1.so[b64dd000+140000]
Jun 15 17:20:34 p40213ff kernel: [ 9606.133388] evolution[9001]: segfault at 3 ip b049faf5 sp ab744030 error 4 in libcamelexchange.so[b0480000+59000]
Comment 26 Milan Crha 2010-06-16 09:41:36 UTC
Ah, I found the way how to get the useful valgrind trace, one should do this:
   $ export G_SLICE=always-malloc
   $ valgrind evolution &>evo.log

This may ensure there will be nothing like in comment #5:
>  Address 0x3 is not stack'd, malloc'd or (recently) free'd
but a real place where the memory was freed/modified/whatever.

Before you upload any valgrind log, please make sure it'll contain "camel_exchange_utils_send_message" (quotes for clarity only) and that you've installed all debug info packages for evolution-data-server, evolution and evolution-exchange. Thanks in advance.
Comment 27 Felix Fritzsche 2010-06-16 10:01:36 UTC
for now the first resaults: 
==22886== Warning: invalid file descriptor -1 in syscall close()
==22886== 
==22886== Process terminating with default action of signal 11 (SIGSEGV)
==22886==  Access not within mapped region at address 0x3
==22886==    at 0x7EEBAF5: camel_exchange_utils_send_message (camel-exchange-utils.c:3005)
==22886==    by 0x7EE76A0: exchange_send_to (camel-exchange-transport.c:167)
==22886==    by 0x4253FAE: camel_transport_send_to (camel-transport.c:133)
==22886==    by 0x628C3BE: send_queue_exec (mail-ops.c:545)
==22886==    by 0x6286FA7: mail_msg_proxy (mail-mt.c:471)
==22886==    by 0x517E5BB: ??? (in /lib/libglib-2.0.so.0.2400.1)
==22886==    by 0x517C69E: ??? (in /lib/libglib-2.0.so.0.2400.1)
==22886==    by 0x47C9954: start_thread (pthread_create.c:300)
==22886==    by 0x52AC10D: clone (clone.S:130)
==22886==  If you believe this happened as a result of a stack
==22886==  overflow in your program's main thread (unlikely but
==22886==  possible), you can try to increase the size of the
==22886==  main thread stack using the --main-stacksize= flag.
==22886==  The main thread stack size used in this run was 8388608.
==22886== 
==22886== HEAP SUMMARY:
==22886==     in use at exit: 15,605,162 bytes in 288,957 blocks
==22886==   total heap usage: 5,058,668 allocs, 4,769,711 frees, 453,264,372 bytes allocated
==22886== 
==22886== LEAK SUMMARY:
==22886==    definitely lost: 226,763 bytes in 4,379 blocks
==22886==    indirectly lost: 70,833 bytes in 3,156 blocks
==22886==      possibly lost: 13,231,759 bytes in 249,201 blocks
==22886==    still reachable: 2,075,807 bytes in 32,221 blocks
==22886==         suppressed: 0 bytes in 0 blocks
==22886== Rerun with --leak-check=full to see details of leaked memory
==22886== 
==22886== For counts of detected and suppressed errors, rerun with: -v
==22886== Use --track-origins=yes to see where uninitialised values come from
==22886== ERROR SUMMARY: 35574 errors from 1000 contexts (suppressed: 3 from 2)
Comment 28 Felix Fritzsche 2010-06-16 10:05:18 UTC
evolution --force-shutdown
(evolution:23442): e-utils-WARNING **: Something called e_alert_dialog_constructed() with a NULL parent window.  This is no longer legal, please fix it.
error : unterminated entity reference              Co
Comment 29 Felix Fritzsche 2010-06-16 10:17:58 UTC
so i've make a new log file "evo.log" with contains the string "camel_exchange_utils_send_message" in line ==23544==.
i will upload the hole file.
Comment 30 Felix Fritzsche 2010-06-16 10:21:42 UTC
Created attachment 163795 [details]
camel_exchange_utils_send_message

this is the log file for above comment
Comment 31 Milan Crha 2010-06-16 16:20:36 UTC
Created attachment 163846 [details] [review]
proposed eex patch

for evolution-exchange;

Thanks for the update. Strange, it claims quite many issues with strlen/__strlen_sse2 on your system. That might be something with the glibc, I guess.

Anyway, seeing the place where it crashed, and knowing about two other similar bugs, I believe this change should help you. I didn't think of this before, I'm sorry. (I know, the change itself doesn't make much sense, but as it worked on those other bugs, then it may work here as well.)

Please give it a try and let me know, the best till the end of this week, thus this would come to the Monday release of 2.30.2. Thanks in advance.
Comment 32 Felix Fritzsche 2010-06-16 21:43:36 UTC
Hi,
thank you very much, but i can try it on friday first. i will wrote a new comment here.
Felix
Comment 33 Akhil Laddha 2010-06-17 03:39:10 UTC
*** Bug 621801 has been marked as a duplicate of this bug. ***
Comment 34 Felix Fritzsche 2010-06-18 07:41:26 UTC
Hi,
can you tell me, what must i do?
Which file must i patch?
Must i have the sources, or can i patch without the sources?
Comment 35 Akhil Laddha 2010-06-18 11:01:06 UTC
*** Bug 621964 has been marked as a duplicate of this bug. ***
Comment 36 Akhil Laddha 2010-06-25 10:35:44 UTC
*** Bug 622620 has been marked as a duplicate of this bug. ***
Comment 37 Akhil Laddha 2010-06-25 10:44:24 UTC
(In reply to comment #34)
> Hi,
> can you tell me, what must i do?
> Which file must i patch?
> Must i have the sources, or can i patch without the sources?

Do you build evolution sources or do you use binaries (rpm,deb etc) ?

If you have sources, you can apply patch mentioned in comment#31.
Comment 38 Akhil Laddha 2010-06-25 10:46:40 UTC
*** Bug 622701 has been marked as a duplicate of this bug. ***
Comment 39 Gabor SZOLLOSI 2010-06-25 11:54:08 UTC
(In reply to comment #37)
> (In reply to comment #34)
> > Hi,
> > can you tell me, what must i do?
> > Which file must i patch?
> > Must i have the sources, or can i patch without the sources?
> 
> Do you build evolution sources or do you use binaries (rpm,deb etc) ?
> 
> If you have sources, you can apply patch mentioned in comment#31.

Hi,

I patched evolution-exchange-2.30.1 (debian source package) with comment#31 and it's works fine.
Thank you very much!
Comment 40 Felix Fritzsche 2010-06-28 09:29:07 UTC
Hi Akhil,
i'm using the debian debs, from squeeze. 
Evolution Version: 2.30.1.2-3 
Evolution-Exchange Version:  2.30.1-2+b1

I've updated my system this morning.

Greetings 

Felix
Comment 41 Felix Fritzsche 2010-06-28 09:30:42 UTC
The Problem still exist, crash on send and receive.
Comment 42 Akhil Laddha 2010-06-28 09:44:44 UTC
(In reply to comment #40)
> Hi Akhil,
> i'm using the debian debs, from squeeze. 
> Evolution Version: 2.30.1.2-3 
> Evolution-Exchange Version:  2.30.1-2+b1
> 

Patch hasn't been committed yet in sources. May be you can use deb which Gabor has built as per comment#39.
Comment 43 Felix Fritzsche 2010-06-28 10:51:05 UTC
(In reply to comment #39)
> (In reply to comment #37)
> > (In reply to comment #34)
> > > Hi,
> > > can you tell me, what must i do?
> > > Which file must i patch?
> > > Must i have the sources, or can i patch without the sources?
> > 
> > Do you build evolution sources or do you use binaries (rpm,deb etc) ?
> > 
> > If you have sources, you can apply patch mentioned in comment#31.
> 
> Hi,
> 
> I patched evolution-exchange-2.30.1 (debian source package) with comment#31 and
> it's works fine.
> Thank you very much!

Hi, can you give me the deb file or tell me how you build the deb.
On my system i get some error while build the deb.

Thank You

Felix
Comment 44 Milan Crha 2010-06-28 12:02:45 UTC
Created commit 33a93de in ex gnome-2-30 (2.30.3+)

The similar code change was done in eex master some time ago already, thus this was for stable only. Pity I missed 2.30.2 release with it.
Comment 45 Gabor SZOLLOSI 2010-06-28 14:00:15 UTC
(In reply to comment #43)
> (In reply to comment #39)
> > (In reply to comment #37)
> > > (In reply to comment #34)
> > > > Hi,
> > > > can you tell me, what must i do?
> > > > Which file must i patch?
> > > > Must i have the sources, or can i patch without the sources?
> > > 
> > > Do you build evolution sources or do you use binaries (rpm,deb etc) ?
> > > 
> > > If you have sources, you can apply patch mentioned in comment#31.
> > 
> > Hi,
> > 
> > I patched evolution-exchange-2.30.1 (debian source package) with comment#31 and
> > it's works fine.
> > Thank you very much!
> 
> Hi, can you give me the deb file or tell me how you build the deb.
> On my system i get some error while build the deb.

http://dev.localnet.hu/debs
Comment 46 Felix Fritzsche 2010-06-29 08:07:19 UTC
@All, my Problem is solved.
Thank you a lot! 
Work with Outlook in a VM is so terrible!

@Gabor
Thank you for build the debs. I've no problems to install.

Greetings 

Felix
Comment 47 Akhil Laddha 2010-07-07 11:20:47 UTC
*** Bug 623745 has been marked as a duplicate of this bug. ***
Comment 48 Fabio Durán Verdugo 2010-07-08 23:22:40 UTC
*** Bug 623834 has been marked as a duplicate of this bug. ***
Comment 49 Karlheinz Schreiber 2010-07-13 08:06:48 UTC
Thanks to Gabor for the debs. But a problem still exists: evolution sends the mail now but can't copy the sent mail to the exchange/sent-objects folder, still chrashes with same behavior then before. 
work-arround is to set the sent folder to a local one.


Greetings
Sebastian
Comment 50 Gabor SZOLLOSI 2010-07-14 06:42:15 UTC
(In reply to comment #49)

Yes, problem still exists. Move message to exchange sent folder caused:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xacbf3b70 (LWP 6678)]
0xb08304ea in camel_exchange_utils_append_message (service=0x84389e8, 
    folder_name=0xab408668 "personal/Elküldött üzenetek", flags=16, 
    subject=0x8f34f68 "TEST...", message=0xffffffff, new_uid=0xacbf303c, 
    ex=0x91f8824) at camel-exchange-utils.c:2441
2441		status = e_folder_exchange_put_new (mfld->folder, NULL, subject,
Comment 51 Gabor SZOLLOSI 2010-07-14 06:43:10 UTC
Created attachment 165846 [details]
Sent folder copy gdb output
Comment 52 Milan Crha 2010-07-14 07:46:48 UTC
Thanks for the update. The real cause is described in bug #612082 comment #57, but as the change is too "large" to be available in 2.30.x (it's an API change), then I will try to workaround the issue in evolution-exchange.
Comment 53 Milan Crha 2010-07-14 08:54:33 UTC
Created attachment 165854 [details] [review]
evo patch (gnome-2-30)

for evolution (gnome-2-30);

Workaround the issue in evolution itself.
Comment 54 Milan Crha 2010-07-14 08:57:15 UTC
Created attachment 165855 [details] [review]
eex patch (gnome-2-30)

for evolution-exchange (gnome-2-30);

Workaround the issue in evolution-exchange.

Both patches are the same, do not use
> ((CamelStreamMem *)mem)->buffer->...
but create a memory stream with a byte array defined, and use the byte array itself.
Comment 55 Milan Crha 2010-07-14 09:00:43 UTC
Created commit 5ff9e8d in evo gnome-2-30 (2.30.3+)
Created commit ae44308 in eex gnome-2-30 (2.30.3+)