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 303067 - Random crash looking up addresses in new email
Random crash looking up addresses in new email
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
unspecified
Other other
: High critical
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
: 304783 526828 528233 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-05-04 22:23 UTC by Raul Acevedo
Modified: 2008-04-15 19:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed eds patch (29.27 KB, patch)
2008-03-05 21:01 UTC, Milan Crha
committed Details | Review
proposed eex patch (14.43 KB, patch)
2008-03-05 22:26 UTC, Milan Crha
committed Details | Review
proposed eds patch ][ (42.32 KB, patch)
2008-03-06 18:31 UTC, Milan Crha
none Details | Review

Description Raul Acevedo 2005-05-04 22:23:58 UTC
Distribution: Fedora Core release 2 (Tettnang)
Package: Evolution
Severity: normal
Version: GNOME2.10.1 unspecified
Gnome-Distributor: GARNOME
Synopsis: Random crash looking up addresses in new email
Bugzilla-Product: Evolution
Bugzilla-Component: Miscellaneous
Bugzilla-Version: unspecified
BugBuddy-GnomeVersion: 2.0 (2.10.0)
Description:
Description of the crash:
I'm in the middle of composing an email.  I go to any of the address
fields, start typing a recipient, and suddenly I get a dialog saying
evolution-exchange-storage has crashed.

How often does this happen?
It's random.  Once or twice a day.

Additional Information:
Evolution 2.3.1, GARNOME/GNOME 2.10.1, Fedora Core 2.


Debugging Information:

Backtrace was generated from
'/home/garnome/2.10.1/libexec/evolution-exchange-storage'




------- Bug moved to this database by unknown@bugzilla.gnome.org 2005-05-04 22:23 UTC -------

Comment 1 Raul Acevedo 2005-05-04 22:27:33 UTC
I guess bug buddy didn't really generate a stack trace.

Because I've seen this before, I had evolution-exchange-storage attached to gdb.
 However, when the crash happened, gdb didn't stop... so before I filled out the
bug report, while evolution was hung, I Ctrl-c in gdb and got a stack trace then:

Program received signal SIGINT, Interrupt.
[Switching to Thread -1222265760 (LWP 26324)]
0x443047a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) thread apply all bt

Thread 179 (Thread -1282409552 (LWP 28409))

  • #0 _dl_sysinfo_int80
    from /lib/ld-linux.so.2
  • #1 __waitpid_nocancel
    from /lib/tls/libpthread.so.0
  • #2 libgnomeui_segv_handle
    from /home/garnome/2.10.1/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 _dl_sysinfo_int80
    from /lib/ld-linux.so.2
  • #5 raise
    from /lib/tls/libc.so.6
  • #6 abort
    from /lib/tls/libc.so.6
  • #7 __assert_fail
    from /lib/tls/libc.so.6
  • #8 ldap_search_ext
  • #9 start_book_view
  • #10 e_book_backend_start_book_view
    from /home/garnome/2.10.1/lib/libedata-book-1.2.so.2
  • #11 impl_GNOME_Evolution_Addressbook_BookView_start
    from /home/garnome/2.10.1/lib/libedata-book-1.2.so.2
  • #12 _ORBIT_skel_small_GNOME_Evolution_Addressbook_BookView_start
    from /home/garnome/2.10.1/lib/libedata-book-1.2.so.2
  • #13 ORBit_POAObject_invoke
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #14 ORBit_OAObject_invoke
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #15 ORBit_small_invoke_adaptor
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #16 ORBit_POAObject_handle_request
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #17 ORBit_POAObject_invoke_incoming_request
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #18 giop_thread_queue_process
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #19 giop_request_handler_thread
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #20 g_thread_pool_thread_proxy
    from /home/garnome/2.10.1/lib/libglib-2.0.so.0
  • #21 g_thread_create_proxy
    from /home/garnome/2.10.1/lib/libglib-2.0.so.0
  • #22 start_thread
    from /lib/tls/libpthread.so.0
  • #23 clone
    from /lib/tls/libc.so.6

Comment 2 Raul Acevedo 2005-05-04 22:30:55 UTC
Then I did a continue in gdb, which allowed me to use bug buddy.  After bug
buddy was done, gdb stopped the process, so I did another thread dump just in
case, this one slightly different:

(gdb) cont
Continuing.

Program received signal SIGCONT, Continued.
0x443047a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) thread apply all bt

Thread 179 (Thread -1282409552 (LWP 28409))

  • #0 _dl_sysinfo_int80
    from /lib/ld-linux.so.2
  • #1 __waitpid_nocancel
    from /lib/tls/libpthread.so.0
  • #2 libgnomeui_segv_handle
    from /home/garnome/2.10.1/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 _dl_sysinfo_int80
    from /lib/ld-linux.so.2
  • #5 raise
    from /lib/tls/libc.so.6
  • #6 abort
    from /lib/tls/libc.so.6
  • #7 __assert_fail
    from /lib/tls/libc.so.6
  • #8 ldap_search_ext
  • #9 start_book_view
  • #10 e_book_backend_start_book_view
    from /home/garnome/2.10.1/lib/libedata-book-1.2.so.2
  • #11 impl_GNOME_Evolution_Addressbook_BookView_start
    from /home/garnome/2.10.1/lib/libedata-book-1.2.so.2
  • #12 _ORBIT_skel_small_GNOME_Evolution_Addressbook_BookView_start
    from /home/garnome/2.10.1/lib/libedata-book-1.2.so.2
  • #13 ORBit_POAObject_invoke
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #14 ORBit_OAObject_invoke
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #15 ORBit_small_invoke_adaptor
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #16 ORBit_POAObject_handle_request
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #17 ORBit_POAObject_invoke_incoming_request
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #18 giop_thread_queue_process
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #19 giop_request_handler_thread
    from /home/garnome/2.10.1/lib/libORBit-2.so.0
  • #20 g_thread_pool_thread_proxy
    from /home/garnome/2.10.1/lib/libglib-2.0.so.0
  • #21 g_thread_create_proxy
    from /home/garnome/2.10.1/lib/libglib-2.0.so.0
  • #22 start_thread
    from /lib/tls/libpthread.so.0
  • #23 clone
    from /lib/tls/libc.so.6
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program:
/home/garnome/2.10.1/libexec/evolution/2.4/evolution-exchange-storage, process 26324
Comment 3 Olav Vitters 2005-05-05 19:49:20 UTC
Thanks for those stacktraces. These appear to be unique (not reported before).
Can you get us one with debugging symbols? Please see
http://live.gnome.org/GettingTraces for more information on how to do so.
Comment 4 Raul Acevedo 2005-05-05 22:04:51 UTC
I've recompiled evolution-exchange-storage with -g but I still get similar stack
traces.  What symbols exactly do you want me to use?  The "Getting Traces"
article didn't say much useful.

Here's a sample compile command while it was building... note -g and -O2 (not -O3):

cc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"evolution-exchange-storage\"
-DORBIT2=1 -pthread -I/home/garnome/2.10.1/include/evolution-2.4
-I/home/garnome/2.10.1/include/libgnome-2.0
-I/home/garnome/2.10.1/include/libgnomeui-2.0
-I/home/garnome/2.10.1/include/libbonoboui-2.0
-I/home/garnome/2.10.1/include/gal-2.6 -I/home/garnome/2.10.1/include/glib-2.0
-I/home/garnome/2.10.1/lib/glib-2.0/include
-I/home/garnome/2.10.1/include/orbit-2.0
-I/home/garnome/2.10.1/include/libbonobo-2.0
-I/home/garnome/2.10.1/include/gconf/2
-I/home/garnome/2.10.1/include/gnome-vfs-2.0
-I/home/garnome/2.10.1/lib/gnome-vfs-2.0/include
-I/home/garnome/2.10.1/include/bonobo-activation-2.0
-I/home/garnome/2.10.1/include/libgnomecanvas-2.0
-I/home/garnome/2.10.1/include/gtk-2.0 -I/home/garnome/2.10.1/include/libart-2.0
-I/home/garnome/2.10.1/include/pango-1.0 -I/usr/include/freetype2
-I/home/garnome/2.10.1/lib/gtk-2.0/include
-I/home/garnome/2.10.1/include/atk-1.0 -I/usr/X11R6/include
-I/usr/include/freetype2/config -I/home/garnome/2.10.1/include/libxml2
-I/home/garnome/2.10.1/include/libglade-2.0
-I/home/garnome/2.10.1/include/libgnomeprint-2.2
-I/home/garnome/2.10.1/include/evolution-data-server-1.4
-I/home/garnome/2.10.1/include/libsoup-2.2   -I/usr/include
-I/opt/openldap-ntlm-2.2.24/include -DPREFIX=\"/home/garnome/2.10.1\"
-DSYSCONFDIR=\""/home/garnome/2.10.1/etc"\"
-DDATADIR=\""/home/garnome/2.10.1/share"\"
-DLIBDIR=\""/home/garnome/2.10.1/share"\"
-DCONNECTOR_GLADEDIR=\""/home/garnome/2.10.1/share/evolution-exchange/2.4/glade"\"
-DCONNECTOR_IMAGESDIR=\""/home/garnome/2.10.1/share/evolution-exchange/2.4/images"\"
-DCONNECTOR_UIDIR=\""/home/garnome/2.10.1/share/evolution-exchange/2.4/ui"\"
-DCONNECTOR_LOCALEDIR=\""/home/garnome/2.10.1/share/locale\"" -I.. -I../lib
-I../xntlm -I../mail -I../shell -I../camel -I../calendar -I../shell -I../lib 
-I/home/garnome/2.10.1/include  -g -I/home/garnome/2.10.1/include
-L/home/garnome/2.10.1/lib -O2 -pipe -Wall -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wno-sign-compare  -Wno-sign-compare -c `test -f
'exchange-offline-listener.c' || echo './'`exchange-offline-listener.c
Comment 5 Olav Vitters 2005-05-06 10:36:34 UTC
All lines should look like the following:

  • #8 ldap_search_ext

Eg.. stuff between the (). I think gargnome strips the debugging symbols. That
should be disabled (not sure how with gargnome).
Comment 6 Elijah Newren 2005-05-20 01:43:13 UTC
*** Bug 304783 has been marked as a duplicate of this bug. ***
Comment 7 Elijah Newren 2005-05-20 01:43:49 UTC
Raul: You need to recompile the dependent libraries in addition to
evolution-exchange-storage.  That would include evolution-data-server and ORBit2.

Bug 304783 has debugging symbols for evolution-data-server (but not for ORBit2).
 That may be enough additional information, so I'll reopen so that a maintainer
can look...
Comment 8 Not Zed 2005-08-18 05:03:21 UTC
connector right?  m oving component.
Comment 9 Sarfraaz Ahmed 2005-10-05 06:18:43 UTC
Can you please verify this with 2.4.1. There was a mutex lock added in GAL
handling of exchange to solve this. Please get the traces for all the exchange
threads if you still see this.
Comment 10 Sushma Rai 2006-01-10 11:18:18 UTC
Please re-open the bug if you are still seeing this issue.
Comment 11 Milan Crha 2008-03-05 16:22:09 UTC
Reopening, I see weak points in an ldap addressbook backend, in these functions, which should be fixed to have this fixed properly.

First thing is every use of priv->ldap should be guarded with eds_ldap_handler_lock, but in ..._search function it isn't.
And in other functions too.

The second thing I believe is also wrong is the logic of this construction:

   ldap = priv->ldap;
   do {
      lock();
      xxx (ldap, ...);
      unlock();
   } while (e_book_backend_ldap_reconnect (...));

it's in pseudo code only, but my point is that the e_book_backend_ldap_reconnect *can* change priv->ldap, thus next use of local variable ldap will do a crash or unexpected behavior.

Does it make sense?
Comment 12 Milan Crha 2008-03-05 21:01:51 UTC
Created attachment 106642 [details] [review]
proposed eds patch

for evolution-data-server;

patch fixing things in a way described in previous comment.
Comment 13 Milan Crha 2008-03-05 22:26:51 UTC
Created attachment 106647 [details] [review]
proposed eex patch

for evolution-exchange;

Please notice this chunk:
@@ -1459,8 +1470,8 @@ build_contact_from_entry (EBookBackendGA
I changed 'ldap' to 'subldap'. I believe it's the right thing.
Comment 14 Ross Burton 2008-03-06 10:51:15 UTC
Regarding the eds patch, why is the lock global when there can be multiple backend instances?  
Comment 15 Milan Crha 2008-03-06 13:55:46 UTC
Good question. I have no idea, I kept it as it was. If you feel it should be changed, then I've nothing against it.
Comment 16 Ross Burton 2008-03-06 15:15:55 UTC
If the lock can be per-instance then it should, otherwise you are blocking all instances.
Comment 17 Milan Crha 2008-03-06 18:31:02 UTC
Created attachment 106703 [details] [review]
proposed eds patch ][

for evolution-data-server;

Updated based on the Ross' comments above. Thanks Ross.
To be honest, I should do that in the first patch, god knows why I didn't.
Comment 18 Ross Burton 2008-03-07 10:31:02 UTC
Oh, it turns out that libldap is tragically thread unsafe, so the lock is really to guard libldap access.
Comment 19 Milan Crha 2008-03-07 13:58:08 UTC
Hehe :)

Thanks for the review Ross.
Comment 20 Srinivasa Ragavan 2008-03-13 09:43:52 UTC
2.22.1 & 2.23.1
Comment 21 Milan Crha 2008-03-13 12:50:48 UTC
eds part committed to trunk. Committed revision 8572.
eds part committed to gnome-2-22. Committed revision 8573.

eex part is waiting for a review :)
Comment 22 Srinivasa Ragavan 2008-03-27 05:21:15 UTC
Milan, commit it to stable/trunk.
Comment 23 Milan Crha 2008-03-27 10:18:40 UTC
eex committed to trunk. Committed revision 1617.
eex committed to gnome-2-22. Committed revision 1618.
Comment 24 Tobias Mueller 2008-04-08 15:04:02 UTC
*** Bug 526828 has been marked as a duplicate of this bug. ***
Comment 25 Susana 2008-04-15 19:15:19 UTC
*** Bug 528233 has been marked as a duplicate of this bug. ***