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 512605 - crash in Evolution: I pressed the "apply fil...
crash in Evolution: I pressed the "apply fil...
Status: RESOLVED NOTGNOME
Product: Evolution Exchange
Classification: Deprecated
Component: Connector
2.22.x
Other All
: High blocker
: ---
Assigned To: Connector Maintainer
Ximian Connector QA
: 512588 513180 513487 514234 514328 516304 516313 517175 518036 518609 519008 520048 520338 520341 520931 521588 521661 522063 523036 523422 525382 525383 525385 525387 525389 525611 525619 525641 525780 525808 525905 526222 526897 527165 527490 528544 529526 529912 529934 529948 530406 530499 530518 530934 531049 531855 531962 532032 532133 533070 533411 533463 534026 534053 534158 534214 534263 534452 535130 535219 536204 536326 536392 536867 537000 537451 537485 538796 538834 539133 539698 540863 540868 540888 541005 541116 541194 541353 542291 542320 542831 543043 544573 550702 553352 554570 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-01-28 16:23 UTC by manuel.garciaext
Modified: 2008-10-01 16:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description manuel.garciaext 2008-01-28 16:23:06 UTC
What were you doing when the application crashed?
I pressed the "apply filters" option under "Message" menu.


Distribution: Debian lenny/sid
Gnome Release: 2.20.3 2008-01-12 (Debian)
BugBuddy Version: 2.20.1

System: Linux 2.6.16-2-686-smp #1 SMP Fri Aug 18 19:25:21 UTC 2006 i686
X Vendor: The X.Org Foundation
X Vendor Release: 10300000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks
Icon Theme: gnome

Memory status: size: 50966528 vsize: 50966528 resident: 13893632 share: 8933376 rss: 13893632 rss_rlim: 4294967295
CPU usage: start_time: 1201535677 rtime: 60 utime: 52 stime: 8 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/lib/bug-buddy/evolution-exchange-storage'

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xa69076b0 (LWP 20916)]
[New Thread 0xa646cb90 (LWP 20918)]
0xa6fb9321 in waitpid () from /lib/libpthread.so.0

Thread 1 (Thread 0xa69076b0 (LWP 20916))

  • #0 waitpid
    from /lib/libpthread.so.0
  • #1 IA__g_spawn_sync
    at /build/buildd/glib2.0-2.14.5/glib/gspawn.c line 369
  • #2 IA__g_spawn_command_line_sync
    at /build/buildd/glib2.0-2.14.5/glib/gspawn.c line 677
  • #3 ??
    from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
  • #4 <signal handler called>
  • #5 raise
    from /lib/libc.so.6
  • #6 abort
    from /lib/libc.so.6
  • #7 __assert_fail
    from /lib/libc.so.6
  • #8 ber_flush2
    from /usr/lib/liblber-2.4.so.2
  • #9 ldap_int_flush_request
    from /usr/lib/libldap_r-2.4.so.2
  • #10 ldap_send_server_request
    from /usr/lib/libldap_r-2.4.so.2
  • #11 ldap_send_initial_request
    from /usr/lib/libldap_r-2.4.so.2
  • #12 ldap_ntlm_bind
    from /usr/lib/libldap_r-2.4.so.2
  • #13 connect_ldap
    at e2k-global-catalog.c line 243
  • #14 gc_search
  • #15 e2k_global_catalog_lookup
    at e2k-global-catalog.c line 796
  • #16 get_message
    at mail-stub-exchange.c line 2266
  • #17 connection_handler
    at mail-stub.c line 271
  • #18 g_io_unix_dispatch
    at /build/buildd/glib2.0-2.14.5/glib/giounix.c line 162
  • #19 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.14.5/glib/gmain.c line 2061
  • #20 g_main_context_iterate
    at /build/buildd/glib2.0-2.14.5/glib/gmain.c line 2694
  • #21 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.14.5/glib/gmain.c line 2898
  • #22 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #23 main
    at main.c line 238
  • #24 __libc_start_main
    from /lib/libc.so.6
  • #25 _start
  • #0 waitpid
    from /lib/libpthread.so.0


----------- .xsession-errors (14910 sec old) ---------------------
** (nm-applet:4477): WARNING **: <WARN>  nma_dbus_init(): could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.16" is not allowed to own the service "org.freedesktop.Networ
** (nm-applet:4477): WARNING **: <WARN>  nma_dbus_init(): could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.16" is not allowed to own the service "org.freedesktop.Networ
** (nm-applet:4477): WARNING **: <WARN>  nma_dbus_init(): could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.16" is not allowed to own the service "org.freedesktop.Networ
** (nm-applet:4477): WARNING **: <WARN>  nma_dbus_init(): could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.16" is not allowed to own the service "org.freedesktop.Networ
** (nm-applet:4477): WARNING **: <WARN>  nma_dbus_init(): could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.16" is not allowed to own the service "org.freedesktop.Networ
...Too much output, ignoring rest...
--------------------------------------------------
Comment 1 Akhil Laddha 2008-02-05 08:03:37 UTC
*** Bug 514234 has been marked as a duplicate of this bug. ***
Comment 2 Akhil Laddha 2008-02-05 08:03:54 UTC
*** Bug 513487 has been marked as a duplicate of this bug. ***
Comment 3 Akhil Laddha 2008-02-05 08:04:14 UTC
*** Bug 513180 has been marked as a duplicate of this bug. ***
Comment 4 Akhil Laddha 2008-02-05 08:04:32 UTC
*** Bug 512588 has been marked as a duplicate of this bug. ***
Comment 5 Akhil Laddha 2008-02-05 08:04:46 UTC
*** Bug 514328 has been marked as a duplicate of this bug. ***
Comment 6 Pedro Villavicencio 2008-02-13 22:55:39 UTC
*** Bug 516304 has been marked as a duplicate of this bug. ***
Comment 7 Pedro Villavicencio 2008-02-13 22:55:54 UTC
*** Bug 516313 has been marked as a duplicate of this bug. ***
Comment 8 Akhil Laddha 2008-02-18 10:13:17 UTC
*** Bug 517175 has been marked as a duplicate of this bug. ***
Comment 9 Akhil Laddha 2008-02-28 06:16:11 UTC
*** Bug 518036 has been marked as a duplicate of this bug. ***
Comment 10 Akhil Laddha 2008-02-28 06:16:22 UTC
*** Bug 518609 has been marked as a duplicate of this bug. ***
Comment 11 Akhil Laddha 2008-02-28 06:16:31 UTC
*** Bug 519008 has been marked as a duplicate of this bug. ***
Comment 12 Akhil Laddha 2008-03-06 13:51:18 UTC
*** Bug 520341 has been marked as a duplicate of this bug. ***
Comment 13 Akhil Laddha 2008-03-06 14:03:44 UTC
*** Bug 520338 has been marked as a duplicate of this bug. ***
Comment 14 Akhil Laddha 2008-03-06 14:07:11 UTC
*** Bug 520048 has been marked as a duplicate of this bug. ***
Comment 15 Akhil Laddha 2008-03-10 07:59:29 UTC
*** Bug 520931 has been marked as a duplicate of this bug. ***
Comment 16 Baptiste Mille-Mathias 2008-03-10 15:11:42 UTC
*** Bug 521588 has been marked as a duplicate of this bug. ***
Comment 17 Baptiste Mille-Mathias 2008-03-10 15:13:43 UTC
Dear Bug reporters,

Thanks for taking the time to report this bug.
Unfortunately, that stack trace is missing some elements that will help a lot to solve the problem, so it will be hard for the developers to fix that crash. Can you get us a stack trace with debugging symbols? Please see http://live.gnome.org/GettingTraces for more information on how to do so and reopen this bug or report a new one. Thanks in advance!
Comment 18 rob.dawson 2008-03-10 17:42:28 UTC
Is this a better stack trace? Or do I need to compile libc6-i686 and liborbit2.0 as debug and try again? ;-]

Note that the bug appears to be triggered when running filters on messages, but not -always- - certainly immediately after restarting, it tends to be ok, but if I leave evolution open for a couple of rounds of checking for new messages, it then triggers this fault. Mostly. I'm not sure if that helps identify it or not.
-----
Distribution: Debian lenny/sid
Gnome Release: 2.20.3 2008-01-12 (Debian)
BugBuddy Version: 2.20.1

System: Linux 2.6.22-3-686-bigmem #1 SMP Sun Feb 10 21:47:55 UTC 2008 i686
X Vendor: The X.Org Foundation
X Vendor Release: 10300000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Simple
Icon Theme: gnome

Memory status: size: 73728000 vsize: 73728000 resident: 19537920 share: 9293824 rss: 19537920 rss_rlim: 4294967295
CPU usage: start_time: 1205166763 rtime: 152 utime: 132 stime: 20 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/lib/bug-buddy/evolution-exchange-storage'

Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb65e76d0 (LWP 9846)]
[New Thread 0xb6411b90 (LWP 9847)]
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread 0xb65e76d0 (LWP 9846))

  • #0 __kernel_vsyscall
  • #1 waitpid
    from /lib/i686/cmov/libpthread.so.0
  • #2 IA__g_spawn_sync
    at /tmp/buildd/glib2.0-2.14.6/glib/gspawn.c line 369
  • #3 IA__g_spawn_command_line_sync
    at /tmp/buildd/glib2.0-2.14.6/glib/gspawn.c line 677
  • #4 ??
    from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
  • #5 <signal handler called>
  • #6 __kernel_vsyscall
  • #7 raise
    from /lib/i686/cmov/libc.so.6
  • #8 abort
    from /lib/i686/cmov/libc.so.6
  • #9 __assert_fail
    from /lib/i686/cmov/libc.so.6
  • #10 ber_flush2
    at /build/buildd/openldap2.3-2.4.7/libraries/liblber/io.c line 234
  • #11 ldap_int_flush_request
    at request.c line 152
  • #12 ldap_send_server_request
    at request.c line 348
  • #13 ldap_send_initial_request
    at request.c line 136
  • #14 ldap_ntlm_bind
    at ntlm.c line 73
  • #15 connect_ldap
    at e2k-global-catalog.c line 243
  • #16 gc_search
  • #17 e2k_global_catalog_lookup
    at e2k-global-catalog.c line 796
  • #18 get_message
    at mail-stub-exchange.c line 2266
  • #19 connection_handler
    at mail-stub.c line 271
  • #20 g_io_unix_dispatch
    at /tmp/buildd/glib2.0-2.14.6/glib/giounix.c line 162
  • #21 IA__g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.14.6/glib/gmain.c line 2061
  • #22 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.14.6/glib/gmain.c line 2694
  • #23 IA__g_main_loop_run
    at /tmp/buildd/glib2.0-2.14.6/glib/gmain.c line 2898
  • #24 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #25 main
    at main.c line 238
  • #26 __libc_start_main
    from /lib/i686/cmov/libc.so.6
  • #27 _start
  • #0 __kernel_vsyscall


----------- .xsession-errors ---------------------
(gnome-panel:3309): Wnck-WARNING **: Unhandled action type (nil)
(gnome-panel:3309): Wnck-WARNING **: Unhandled action type (nil)
(gnome-panel:3309): Wnck-WARNING **: Unhandled action type (nil)
(gnome-panel:3309): Wnck-WARNING **: Unhandled action type (nil)
(gnome-panel:3309): Wnck-WARNING **: Unhandled action type (nil)
(gnome-panel:3309): Wnck-WARNING **: Unhandled action type (nil)
(gnome-panel:3309): Wnck-WARNING **: Unhandled action type (nil)
(gnome-panel:3309): Wnck-WARNING **: Unhandled action type (nil)
--------------------------------------------------
Comment 19 Akhil Laddha 2008-03-20 14:09:03 UTC
*** Bug 523036 has been marked as a duplicate of this bug. ***
Comment 20 Akhil Laddha 2008-03-20 14:09:15 UTC
*** Bug 523422 has been marked as a duplicate of this bug. ***
Comment 21 Akhil Laddha 2008-03-20 14:09:27 UTC
*** Bug 522063 has been marked as a duplicate of this bug. ***
Comment 22 Akhil Laddha 2008-03-20 14:09:59 UTC
*** Bug 521661 has been marked as a duplicate of this bug. ***
Comment 23 Akhil Laddha 2008-03-20 14:12:02 UTC
It has good traces ....thanks Rob
Comment 24 Akhil Laddha 2008-04-03 14:04:52 UTC
*** Bug 525382 has been marked as a duplicate of this bug. ***
Comment 25 Akhil Laddha 2008-04-03 14:05:06 UTC
*** Bug 525905 has been marked as a duplicate of this bug. ***
Comment 26 Akhil Laddha 2008-04-03 14:05:36 UTC
*** Bug 525808 has been marked as a duplicate of this bug. ***
Comment 27 Akhil Laddha 2008-04-03 14:05:47 UTC
*** Bug 525780 has been marked as a duplicate of this bug. ***
Comment 28 Akhil Laddha 2008-04-03 14:06:06 UTC
*** Bug 525619 has been marked as a duplicate of this bug. ***
Comment 29 Akhil Laddha 2008-04-03 14:06:24 UTC
*** Bug 525641 has been marked as a duplicate of this bug. ***
Comment 30 Akhil Laddha 2008-04-03 14:06:44 UTC
*** Bug 525611 has been marked as a duplicate of this bug. ***
Comment 31 Akhil Laddha 2008-04-03 14:06:53 UTC
*** Bug 525387 has been marked as a duplicate of this bug. ***
Comment 32 Akhil Laddha 2008-04-03 14:07:07 UTC
*** Bug 525389 has been marked as a duplicate of this bug. ***
Comment 33 Akhil Laddha 2008-04-03 14:07:37 UTC
*** Bug 525385 has been marked as a duplicate of this bug. ***
Comment 34 Akhil Laddha 2008-04-03 14:09:41 UTC
*** Bug 525383 has been marked as a duplicate of this bug. ***
Comment 35 Milan Crha 2008-04-03 14:39:09 UTC
It would be nice to see a "thread apply all bt" gdb command on evolution-data-server and evolution-exchange processes too. Also the whole output on evolution's, evolution-data-server's and evolution-exchange's console.
I'm not sure whether it will help or not, but can make a better view on it.
Comment 36 Tobias Mueller 2008-04-08 13:40:46 UTC
*** Bug 526897 has been marked as a duplicate of this bug. ***
Comment 37 Tobias Mueller 2008-04-08 13:41:08 UTC
*** Bug 526222 has been marked as a duplicate of this bug. ***
Comment 38 André Klapper 2008-04-10 08:03:31 UTC
*** Bug 527165 has been marked as a duplicate of this bug. ***
Comment 39 Susana 2008-04-14 20:03:58 UTC
*** Bug 527490 has been marked as a duplicate of this bug. ***
Comment 40 Akhil Laddha 2008-04-17 12:57:31 UTC
*** Bug 528544 has been marked as a duplicate of this bug. ***
Comment 41 Susana 2008-04-23 21:40:40 UTC
*** Bug 529526 has been marked as a duplicate of this bug. ***
Comment 42 André Klapper 2008-04-27 00:57:53 UTC
*** Bug 529912 has been marked as a duplicate of this bug. ***
Comment 43 André Klapper 2008-04-27 01:00:18 UTC
*** Bug 529934 has been marked as a duplicate of this bug. ***
Comment 44 André Klapper 2008-04-27 01:01:02 UTC
*** Bug 529948 has been marked as a duplicate of this bug. ***
Comment 45 Akhil Laddha 2008-04-29 15:15:14 UTC
*** Bug 530406 has been marked as a duplicate of this bug. ***
Comment 46 Akhil Laddha 2008-04-29 15:15:27 UTC
*** Bug 530499 has been marked as a duplicate of this bug. ***
Comment 47 Akhil Laddha 2008-04-29 15:15:40 UTC
*** Bug 530518 has been marked as a duplicate of this bug. ***
Comment 48 Milan Crha 2008-04-29 18:39:42 UTC
Debian lenny/sid specific bug? What is the version of ldap there? I see it's patched with ntlm patch, but for some reason it crashes. Can someone point me to sources of that patched ldap?
Comment 49 Thomas E. Vaughan 2008-04-29 20:23:26 UTC
Regarding Comment #48:

The version of ldap in Debian sid appears to be '2.4.7' (plus Debian patches).  Strangely, the package name is still 'openldap2.3'.

Check out http://packages.debian.org/source/sid/openldap2.3

That page seems to have both a link to the upstream source tar file and a link to the diff that Debian applies to the upstream source.
Comment 50 Milan Crha 2008-04-30 15:35:43 UTC
Thanks for the pointer. I tried to reproduce with those packages compiled on my F8 box, with all debian patches in proper order, and it works. I'm sure I'm using this compiled version. I either do something wrong or the problem is somewhere else.
Comment 51 Akhil Laddha 2008-05-02 08:41:33 UTC
*** Bug 530934 has been marked as a duplicate of this bug. ***
Comment 52 Susana 2008-05-03 12:36:24 UTC
*** Bug 531049 has been marked as a duplicate of this bug. ***
Comment 53 Akhil Laddha 2008-05-08 14:07:35 UTC
*** Bug 531855 has been marked as a duplicate of this bug. ***
Comment 54 Akhil Laddha 2008-05-08 14:52:05 UTC
*** Bug 531962 has been marked as a duplicate of this bug. ***
Comment 55 Akhil Laddha 2008-05-08 14:57:54 UTC
*** Bug 532032 has been marked as a duplicate of this bug. ***
Comment 56 Akhil Laddha 2008-05-08 15:23:27 UTC
*** Bug 532133 has been marked as a duplicate of this bug. ***
Comment 57 Akhil Laddha 2008-05-14 08:16:30 UTC
*** Bug 533070 has been marked as a duplicate of this bug. ***
Comment 58 Paul Smith 2008-05-19 16:40:17 UTC
I thing bug #533411 and bug #533463 are also duplicates of this bug.  This bug doesn't happen because of filters: it happens because of LDAP lookup (Global Address List lookup on Exchange servers, in particular).

I'm running on a Ubuntu 8.04 (Hardy) system.  However, as below, I'm running my own, locally-built versions of Evolution & friends.

Here's a stack trace from a crash I got when trying to type in an address in the To: field of the composer.  The first address I typed worked, the second one caused evo exchange to crash as follows:

Attaching to program: /opt/evo/libexec/evolution/2.22/evolution-exchange-storage, process 18082
   ...
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb649f720 (LWP 18082)]
0xb7fbc410 in __kernel_vsyscall ()

(gdb) thread apply all bt


A few notes here: first, I'm running the very latest gnome-2.22 branch from SVN of evolution, e-d-s, and evolution-exchange.  I have them compiled locally with full debugging enabled, no optimization, and all logging enabled.

Second, this bug is not directly reproducible: I'll try it again and it will work.  However, I can make it happen once every day or two under moderate use; more under heavy use.
Comment 59 Paul Smith 2008-05-19 19:26:13 UTC
I installed the libldap-2.4.2-dbg package on my Ubuntu box to get the ldap libs built with debugging.  I just got another core (this time when I was clicking on an email in my summary window, and I see "Retriving message ....." at the bottom of the Evo window).  Even though it happens in a totally different place, this one someplace where it's not obvious that we're doing an LDAP lookup at all, the stack trace is similar.  Here it is with a bit more debugging (although still not as useful as it could be because it was built with -O):

Program received signal SIGABRT, Aborted.

Thread 140227984406432 (LWP 6228)

  • #0 raise
    from /lib/libc.so.6
  • #1 abort
    from /lib/libc.so.6
  • #2 __assert_fail
    from /lib/libc.so.6
  • #3 ber_flush2
    at /build/buildd/openldap2.3-2.4.7/libraries/liblber/io.c line 234
  • #4 ldap_int_flush_request
    at request.c line 152
  • #5 ldap_send_server_request
    at request.c line 348
  • #6 ldap_send_initial_request
    at request.c line 136
  • #7 ldap_ntlm_bind
    at ntlm.c line 73
  • #8 ntlm_bind
    at ../../../../../evolution-data-server/servers/exchange/lib/e2k-global-catalog.c line 243
  • #9 connect_ldap
    at ../../../../../evolution-data-server/servers/exchange/lib/e2k-global-catalog.c line 317
  • #10 get_gc_connection
    at ../../../../../evolution-data-server/servers/exchange/lib/e2k-global-catalog.c line 396
  • #11 gc_search
  • #12 e2k_global_catalog_lookup
    at ../../../../../evolution-data-server/servers/exchange/lib/e2k-global-catalog.c line 798
  • #13 unmangle_sender_field
    at ../../../evolution-exchange/mail/mail-stub-exchange.c line 2344
  • #14 get_message
    at ../../../evolution-exchange/mail/mail-stub-exchange.c line 2493
  • #15 connection_handler
    at ../../../evolution-exchange/mail/mail-stub.c line 271
  • #16 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #17 ??
    from /usr/lib/libglib-2.0.so.0
  • #18 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #19 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #20 main
    at ../../../evolution-exchange/storage/main.c line 238


I'm beginning to think that ALL of my Evo Exchange core dumps I've been seeing constantly with Evo 2.22 in Hardy are due to this GAL/LDAP lookup bug!!

I'll keep running it in the debugger.  I'd appreciate any pointers to how I can help fix this problem.
Comment 60 Akhil Laddha 2008-05-20 03:23:11 UTC
*** Bug 533463 has been marked as a duplicate of this bug. ***
Comment 61 Akhil Laddha 2008-05-20 03:23:21 UTC
*** Bug 533411 has been marked as a duplicate of this bug. ***
Comment 62 Srinivasa Ragavan 2008-05-20 04:53:35 UTC
Paul, this happens while looking up contacts. Im still analysing this bug. I have heard so many complaints on it. I suspect a lock/race issue here. If you can give me a valgrind --tool=memcheck report as well, it will be really helpful. Thanks
Comment 63 Paul Smith 2008-05-20 12:43:21 UTC
OK, I've renamed my evoluton-exchange-server to evolution-exchange-server.bin and created a shell script to invoke the real one under valgrind.  So far, not much interesting but I haven't had the crash yet either.  I have to say that the crash seemed somewhat timing related: it seemed to me that it happened less frequently when I ran evolution-exchange-server with the debugger attached for example.  But it might just be my imagination.  If it's true, though, it might be next to impossible to repro under valgrind.  I'll let you know what I find.  I'm also looking at how to build libldap from scratch so I have the source code to debug as well.  I'm not very familiar with building packages from DEB source.
Comment 64 Paul Smith 2008-05-20 16:06:10 UTC
I'm not sure I've found anything real; evolution-exchange-server hasn't died on me yet.  But, I've seen an odd output from valgind which might point to some kind of bug; here's the output (I've built myself a debug version of the LDAP libraries from the Ubuntu source DEB as well):

==00:00:26:48.006 18201== 
==00:00:26:48.006 18201== Invalid read of size 4
==00:00:26:48.006 18201==    at 0x4048ABF: ldap_send_server_request (request.c:213)
==00:00:26:48.006 18201==    by 0x4048FA3: ldap_send_initial_request (request.c:136)
==00:00:26:48.006 18201==    by 0x403DE77: ldap_sasl_bind (sasl.c:148)
==00:00:26:48.006 18201==    by 0x403E159: ldap_sasl_bind_s (sasl.c:182)
==00:00:26:48.006 18201==    by 0x403E32C: ldap_simple_bind_s (sbind.c:113)
==00:00:26:48.006 18201==    by 0x4E1F567: connect_ldap (e2k-global-catalog.c:327)
==00:00:26:48.006 18201==    by 0x4E1F796: get_gc_connection (e2k-global-catalog.c:396)
==00:00:26:48.006 18201==    by 0x4E1F026: gc_search (e2k-global-catalog.c:205)
==00:00:26:48.006 18201==    by 0x4E20875: e2k_global_catalog_lookup (e2k-global-catalog.c:798)
==00:00:26:48.006 18201==    by 0x8061397: unmangle_sender_field (mail-stub-exchange.c:2344)
==00:00:26:48.006 18201==    by 0x80618F7: get_message (mail-stub-exchange.c:249                                                                                     ==00:00:26:48.006 18201==    by 0x403DE77: ldap_sasl_bind (sasl.c:148)
==00:00:26:48.006 18201==    by 0x403E159: ldap_sasl_bind_s (sasl.c:182)
==00:00:26:48.006 18201==    by 0x403E32C: ldap_simple_bind_s (sbind.c:113)
==00:00:26:48.006 18201==    by 0x4E1F567: connect_ldap (e2k-global-catalog.c:327)
==00:00:26:48.006 18201==    by 0x4E1F796: get_gc_connection (e2k-global-catalog.c:396)
==00:00:26:48.006 18201==    by 0x4E1F026: gc_search (e2k-global-catalog.c:205)
==00:00:26:48.006 18201==    by 0x4E20875: e2k_global_catalog_lookup (e2k-global-catalog.c:798)
==00:00:26:48.006 18201==    by 0x8061397: unmangle_sender_field (mail-stub-exchange.c:2344)
==00:00:26:48.006 18201==    by 0x80618F7: get_message (mail-stub-exchange.c:2493)
==00:00:26:48.006 18201==    by 0x8065046: connection_handler (mail-stub.c:271)
==00:00:26:48.007 18201==  Address 0x6329210 is 32 bytes inside a block of size 48 free'd
==00:00:26:48.007 18201==    at 0x402265C: free (vg_replace_malloc.c:323)
==00:00:26:48.007 18201==    by 0x406DB99: ber_memfree_x (memory.c:152)
==00:00:26:48.036 18201==    by 0x4048221: ldap_free_connection (request.c:688)
==00:00:26:48.036 18201==    by 0x403460A: try_read1msg (result.c:564)
==00:00:26:48.036 18201==    by 0x40361DB: ldap_result (result.c:400)
==00:00:26:48.036 18201==    by 0x4E1EF7C: gc_ldap_result (e2k-global-catalog.c:182)
==00:00:26:48.037 18201==    by 0x4E1F0D3: gc_search (e2k-global-catalog.c:217)
==00:00:26:48.037 18201==    by 0x4E20875: e2k_global_catalog_lookup (e2k-global-catalog.c:798)
==00:00:26:48.037 18201==    by 0x8061397: unmangle_sender_field (mail-stub-exchange.c:2344)
==00:00:26:48.037 18201==    by 0x80618F7: get_message (mail-stub-exchange.c:2493)
==00:00:26:48.037 18201==    by 0x8065046: connection_handler (mail-stub.c:271)
==00:00:26:48.037 18201==    by 0x4F82C5C: (within /usr/lib/libglib-2.0.so.0.1600.3)

It seems to be something weird about the loop in e2k-global-catalog.c:217:gc_search(), like this:

        for (try = 0; try < 2; try++) {
                ldap_error = get_gc_connection (gc, op);
                if (ldap_error != LDAP_SUCCESS)
                        return ldap_error;
                ldap_error = ldap_search_ext (gc->priv->ldap, base, scope,
                                              filter, (char **)attrs,
                                              FALSE, NULL, NULL, NULL, 0,
                                              &msgid);
                if (ldap_error == LDAP_SERVER_DOWN)
                        continue;
                else if (ldap_error != LDAP_SUCCESS)
                        return ldap_error;

                ldap_error = gc_ldap_result (gc->priv->ldap, op, msgid, msg);
                if (ldap_error == LDAP_SERVER_DOWN)
                        continue;
                else if (ldap_error != LDAP_SUCCESS)
                        return ldap_error;

                return LDAP_SUCCESS;
        }

What's apparently  happening is that the first LDAP request is failing and when it fails, libldap is freeing some memory (that's the free operation) in the LDAP structure.  The ldap_free_connection() call in the trace only happens if we eventually return an error of LDAP_SERVER_DOWN.  It might be a connection timeout, or something else.

Anyway, we go back around the loop and invoke get_gc_connection() which eventually calls ldap_send_server_request() where it tries to access the lconn_status member of the LDAPConn structure, which gives the above error.

As I said, I'm not convinced this is the actual problem because it didn't dump core or anything for me when this happened.
Comment 65 Akhil Laddha 2008-05-21 04:08:47 UTC
*** Bug 534026 has been marked as a duplicate of this bug. ***
Comment 66 Akhil Laddha 2008-05-21 04:09:58 UTC
*** Bug 534053 has been marked as a duplicate of this bug. ***
Comment 67 Srinivasa Ragavan 2008-05-21 16:11:16 UTC
Paul, I think you got closer. Can you do some debug output like the try count, ldap_error so that we can find out in which iter it fails and what was the prev error.

Note: As you said, avoid, gdb/valgrind when you do debugging, as it can help you crash easily. [Sorry for not doing much, I have no way to reproduce this and it hardly happens for any of us with our test setups here and thanks a lot for your support]
Comment 68 Akhil Laddha 2008-05-22 08:17:27 UTC
*** Bug 534158 has been marked as a duplicate of this bug. ***
Comment 69 Akhil Laddha 2008-05-22 08:19:04 UTC
*** Bug 534214 has been marked as a duplicate of this bug. ***
Comment 70 Akhil Laddha 2008-05-22 08:21:02 UTC
*** Bug 534263 has been marked as a duplicate of this bug. ***
Comment 71 Paul Smith 2008-05-22 13:38:02 UTC
Just caught it again.  Here, just as suspected, "try" is 1 and "last_error" is -1.  If you look at the LDAP code where the free happens (as reported by valgrind) you'll see the only possible return code for that code path is LDAP_SERVER_DOWN so this is expected.

It seems that when the server connection is lost for whatever reason, the ldap library is freeing some data but then when we try to reconnect, we're trying to re-use that data.

Unfortunately my company is moving offices this weekend so we're packing up today and most systems will be down over the long weekend (in the U.S. Monday is a holiday).  I'll try building a debug version of libldap from source and see if I can get a core from that, which might help.
Comment 72 Paul Smith 2008-05-22 20:27:48 UTC
Aha.  I just got it to dump core in my version with a locally-built, debuggable libldap.  Here's the trace:

(gdb) bt
  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/tls/i686/cmov/libc.so.6
  • #2 abort
    from /lib/tls/i686/cmov/libc.so.6
  • #3 __assert_fail
    from /lib/tls/i686/cmov/libc.so.6
  • #4 ber_flush2
    at /opt/src/libldap/openldap2.3-2.4.7/libraries/liblber/io.c line 234
  • #5 ldap_int_flush_request
    at request.c line 152
  • #6 ldap_send_server_request
    at request.c line 348
  • #7 ldap_send_initial_request
    at request.c line 136
  • #8 ldap_ntlm_bind
    at ntlm.c line 73
  • #9 ntlm_bind
    at ../../../../../evolution-data-server/servers/exchange/lib/e2k-global-catalog.c line 243
  • #10 connect_ldap
    at ../../../../../evolution-data-server/servers/exchange/lib/e2k-global-catalog.c line 317
  • #11 get_gc_connection
    at ../../../../../evolution-data-server/servers/exchange/lib/e2k-global-catalog.c line 396
  • #12 gc_search
  • #13 e2k_global_catalog_lookup
    at ../../../../../evolution-data-server/servers/exchange/lib/e2k-global-catalog.c line 798
  • #14 unmangle_sender_field
    at ../../../evolution-exchange/mail/mail-stub-exchange.c line 2344
  • #15 get_message
    at ../../../evolution-exchange/mail/mail-stub-exchange.c line 2493
  • #16 connection_handler
    at ../../../evolution-exchange/mail/mail-stub.c line 271
  • #17 ??
    from /usr/lib/libglib-2.0.so.0
  • #18 ??
  • #19 ??
  • #20 ??
  • #21 ??
    from /usr/lib/libglib-2.0.so.0
  • #22 ??
  • #23 ??
  • #24 ??
  • #25 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #4 ber_flush2
    at /opt/src/libldap/openldap2.3-2.4.7/libraries/liblber/io.c line 234
$1 = (Sockbuf *) 0x812f728

SOCKBUF_VALID is defined as:

( (sb)->sb_valid == LBER_VALID_SOCKBUF )

(gdb) p *sb
$2 = {sb_opts = {lbo_valid = 0, lbo_options = 0, lbo_debug = 65}, sb_iod = 0x811ceb8, sb_fd = 135526392, sb_max_incoming = 135460864, sb_trans_needs_read = 0, sb_trans_needs_write = 0}

I assume that sb_valid is mapped to sb_opts.lbo_valid or similar.  It's pretty clear this structure is not as expected.

I'm still looking at this but fyi.
Comment 73 Paul Smith 2008-05-23 04:06:55 UTC
OK, found it.  As far as I can see this is a bug in openldap.  See the report I filed that describes in detail what's going wrong:

http://www.openldap.org/its/index.cgi/Incoming?id=5525;page=1;statetype=1
Comment 74 Srinivasa Ragavan 2008-05-23 05:02:07 UTC
Awesome Paul. 
Comment 75 Paul Smith 2008-05-23 23:30:21 UTC
Chuck Short created a PPA package of libldap for Ubuntu Hardy that contains the fix Howard Chu added to the OpenLDAP source base:

http://launchpad.net/~zulcss/+archive

I've installed it on my system and I've added a debugging message to the loop in gc_search() so I can see how many times it goes through the try.  I'll keep working with Evo and see if I can reproduce the situation (where try goes to > 0) and make sure we don't get a crash.

However, due to my company moving to a new building this weekend the Exchange server is offline ATM; I'll let you know how it goes.
Comment 76 Akhil Laddha 2008-05-26 04:48:44 UTC
*** Bug 534452 has been marked as a duplicate of this bug. ***
Comment 77 Akhil Laddha 2008-05-28 08:16:00 UTC
*** Bug 535130 has been marked as a duplicate of this bug. ***
Comment 78 Akhil Laddha 2008-05-29 04:52:04 UTC
*** Bug 535219 has been marked as a duplicate of this bug. ***
Comment 79 Bharath Acharya 2008-06-02 14:28:01 UTC
*** Bug 536204 has been marked as a duplicate of this bug. ***
Comment 80 alge 2008-06-03 13:44:00 UTC
(In reply to comment #75)
> Chuck Short created a PPA package of libldap for Ubuntu Hardy that contains the
> fix Howard Chu added to the OpenLDAP source base:
> http://launchpad.net/~zulcss/+archive

I've hit this bug 3 or 4 times today, so I have now installed libldap from <http://launchpad.net/~zulcss/+archive>. So if it stops crashing it should be a good indication that it fixed it. (=
Comment 81 Bharath Acharya 2008-06-03 14:30:44 UTC
*** Bug 536392 has been marked as a duplicate of this bug. ***
Comment 82 Bharath Acharya 2008-06-03 14:37:06 UTC
*** Bug 536326 has been marked as a duplicate of this bug. ***
Comment 83 Bharath Acharya 2008-06-06 03:15:47 UTC
*** Bug 536867 has been marked as a duplicate of this bug. ***
Comment 84 Bharath Acharya 2008-06-07 03:45:17 UTC
*** Bug 537000 has been marked as a duplicate of this bug. ***
Comment 85 Akhil Laddha 2008-06-10 04:30:56 UTC
*** Bug 537451 has been marked as a duplicate of this bug. ***
Comment 86 Akhil Laddha 2008-06-10 04:31:22 UTC
*** Bug 537485 has been marked as a duplicate of this bug. ***
Comment 87 Akhil Laddha 2008-06-18 03:24:05 UTC
*** Bug 538834 has been marked as a duplicate of this bug. ***
Comment 88 Akhil Laddha 2008-06-18 03:24:15 UTC
*** Bug 538796 has been marked as a duplicate of this bug. ***
Comment 89 Johnny Jacob 2008-06-19 18:38:40 UTC
*** Bug 539133 has been marked as a duplicate of this bug. ***
Comment 90 Paul Smith 2008-06-19 19:39:09 UTC
I think this bug should be marked closed: this is not a bug in Evolution, or even in Gnome: it's a bug in OpenLDAP.  Since the fix to OpenLDAP I've never seen this happen again, and there's nothing Evo can do about it anyway (this bug also causes failures in lots of other tools including ones as diverse as Apache, xscreensaver, etc.)

The fix package has been promoted to Hardy main; see the Ubuntu bug report here: https://bugs.launchpad.net/ubuntu/+source/openldap2.3/+bug/215904 (I know it doesn't look like an Evo bug but it IS the same bug).

Here's the relevant bug from Debian's BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=484802 --it doesn't seem that it's been fixed in Debian yet but Debian folks can track that bug instead of this one.

If you're using a distribution other than these please search for bugs including a reference to ber_flush2 in that distro's ldap packages and it will probably get you to the right place.  Maybe users of other distros can add notes pointing to the relevant bugs for their distros so they can be tracked.

Cheers!
Comment 91 Srinivasa Ragavan 2008-06-20 04:12:22 UTC
Paul you rock. Thanks a lot for your efforts.

I'm closing this as NOTGNOME. 
Comment 92 Susana 2008-06-23 19:51:43 UTC
*** Bug 539698 has been marked as a duplicate of this bug. ***
Comment 93 Akhil Laddha 2008-06-30 07:51:35 UTC
*** Bug 540863 has been marked as a duplicate of this bug. ***
Comment 94 Akhil Laddha 2008-06-30 08:24:56 UTC
*** Bug 540868 has been marked as a duplicate of this bug. ***
Comment 95 Akhil Laddha 2008-07-01 06:44:38 UTC
*** Bug 541005 has been marked as a duplicate of this bug. ***
Comment 96 Kandepu Prasad 2008-07-01 08:22:18 UTC
*** Bug 540888 has been marked as a duplicate of this bug. ***
Comment 97 Akhil Laddha 2008-07-03 04:31:27 UTC
*** Bug 541194 has been marked as a duplicate of this bug. ***
Comment 98 Johnny Jacob 2008-07-03 15:21:39 UTC
*** Bug 541353 has been marked as a duplicate of this bug. ***
Comment 99 Akhil Laddha 2008-07-10 04:34:34 UTC
*** Bug 542291 has been marked as a duplicate of this bug. ***
Comment 100 Bharath Acharya 2008-07-10 09:45:43 UTC
*** Bug 542320 has been marked as a duplicate of this bug. ***
Comment 101 Akhil Laddha 2008-07-14 04:56:10 UTC
*** Bug 542831 has been marked as a duplicate of this bug. ***
Comment 102 Bharath Acharya 2008-07-15 16:41:03 UTC
*** Bug 543043 has been marked as a duplicate of this bug. ***
Comment 103 Bharath Acharya 2008-07-25 03:08:59 UTC
*** Bug 544573 has been marked as a duplicate of this bug. ***
Comment 104 Pascal Terjan 2008-09-03 21:36:45 UTC
*** Bug 550702 has been marked as a duplicate of this bug. ***
Comment 105 Akhil Laddha 2008-09-23 04:16:51 UTC
*** Bug 541116 has been marked as a duplicate of this bug. ***
Comment 106 Akhil Laddha 2008-09-23 04:17:09 UTC
*** Bug 553352 has been marked as a duplicate of this bug. ***
Comment 107 Kandepu Prasad 2008-10-01 16:54:56 UTC
*** Bug 554570 has been marked as a duplicate of this bug. ***