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 456276 - crash in Passwords and Encryption Keys: syncing keys with keyser...
crash in Passwords and Encryption Keys: syncing keys with keyser...
Status: RESOLVED NOTABUG
Product: seahorse
Classification: Applications
Component: general
1.0.1
Other All
: High critical
: 2.20.0
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks:
 
 
Reported: 2007-07-12 15:41 UTC by Yuri Pankov
Modified: 2007-12-30 13:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
fix SIGSEGV on FreeBSD/amd64 (308 bytes, patch)
2007-07-21 02:17 UTC, Yuri Pankov
none Details | Review

Description Yuri Pankov 2007-07-12 15:41:01 UTC
What were you doing when the application crashed?
syncing keys with keyserver (hkp://subkeys.pgp.net)


Distribution: Unknown
Gnome Release: 2.18.3 2007-07-08 (FreeBSD GNOME Project)
BugBuddy Version: 2.18.1

System: FreeBSD 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Sun Jul  8 22:40:45 MSD 2007     root@darklight.org.ru:/usr/obj/usr/src/sys/DARKLIGHT amd64
X Vendor: The X.Org Foundation
X Vendor Release: 70200000
Selinux: No
Accessibility: Disabled
GTK+ Theme: nimbus
Icon Theme: nimbus

Memory status: size: 123716 vsize: 123716 resident: 28468 share: 101961850 rss: 28468 rss_rlim: 7117
CPU usage: start_time: 0 rtime: 399 utime: 0 stime: 0 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 133

Backtrace was generated from '/usr/local/bin/seahorse'

[New Thread 0x806501120 (LWP 100060)]

Thread 34465648928 (LWP 100060)

  • #0 wait4
    at wait4.S line 2
  • #1 __waitpid
    at /usr/src/lib/libc/gen/waitpid.c line 46
  • #2 ___waitpid
    at /usr/src/lib/libthr/thread/thr_syscalls.c line 594
  • #3 gnome_gtk_module_info_get
    from /usr/local/lib/libgnomeui-2.so.0
  • #4 <signal handler called>
  • #5 ldap_simple_bind
    at sbind.c line 76
  • #6 resolved_callback
    at seahorse-ldap-source.c line 663
  • #7 IA__g_cclosure_marshal_VOID__INT
    at gmarshal.c line 216
  • #8 signal_once_metamarshal
    from /usr/local/lib/libsoup-2.2.so.8
  • #9 IA__g_closure_invoke
    at gclosure.c line 490
  • #10 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #11 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #12 IA__g_signal_emit
    at gsignal.c line 2243
  • #13 update_address
    from /usr/local/lib/libsoup-2.2.so.8
  • #14 do_async_callback
    from /usr/local/lib/libsoup-2.2.so.8
  • #15 g_idle_dispatch
    at gmain.c line 3928
  • #16 g_main_dispatch
    at gmain.c line 2045
  • #17 IA__g_main_context_dispatch
    at gmain.c line 2596
  • #18 g_main_context_iterate
    at gmain.c line 2677
  • #19 IA__g_main_loop_run
    at gmain.c line 2881
  • #20 IA__gtk_main
    at gtkmain.c line 1154
  • #21 main
    at main.c line 88

----------- .xsession-errors ---------------------
*** NSPlugin Wrapper *** WARNING: unhandled variable 11 in NPP_GetValue()
*** NSPlugin Wrapper *** WARNING: unhandled variable 11 in NPP_GetValue()
*** NSPlugin Wrapper *** WARNING: unhandled variable 11 in NPP_GetValue()
WARNING: not using secure memory for passwords
** Message: init gpgme version 1.1.3
LibGTop-Server: pid 97788 received eof.
WARNING: not using secure memory for passwords
** Message: init gpgme version 1.1.5
warning: Source file is more recent than executable.
Variable "pid" is not available.
Variable "pid" is not available.
/usr/local/share/gnome/bug-buddy/gdb-cmd:3: Error in sourced command file:
Variable "curthread" is not available.
--------------------------------------------------
Comment 1 Adam Schreiber 2007-07-12 16:28:56 UTC
I added the key server you specified and could not replicate your bug.  Could you please list all of the key servers on the "Key Servers" tab in the preferences and indicate which server you're publishing to?

Your stack trace indicates the problem has something to do with LDAP so make sure you've installed OpenLDAP correctly.
Comment 2 Yuri Pankov 2007-07-12 19:46:34 UTC
Sorry for not providing all info from start...

Key servers:
hkp://pgp.mit.edu:11371
ldap://keyserver.pgp.com
hkp://subkeys.pgp.net:11371

Publish keys to:
hkp://subkeys.pgp.net:11371

If I remove ldap://keyserver.pgp.com from list, seahorse doesn't crash during keys sync.

I've tried to debug it further:

Breakpoint 1, resolved_callback (unused=0x807b8a370, status=200, lop=0x807be7580) at seahorse-ldap-source.c:607
607         guint port = LDAP_PORT;
(gdb) p lop->ldap
$2 = (LDAP *) 0x0
(gdb) p* lop
$3 = {parent = {parent = {g_type_instance = {g_class = 0x807bec7a0}, ref_count = 2, qdata = 0x8070d2b40}, 
    message = 0x807f18bc0 "Resolving server address: keyserver.pgp.com", progress = -1, is_running = 1, is_done = 0, is_cancelled = 0, error = 0x0, 
    result = 0x807f0a400, result_destroy = 0}, addr = 0x807b8a370, lsrc = 0x8065ca8a0, ldap = 0x0, ldap_op = -1, stag = 0, 
  ldap_cb = 0x462710 <done_bind_start_info>, chain_cb = 0x463910 <get_key_from_ldap>}
(gdb) break 662
Breakpoint 2 at 0x462bd8: file seahorse-ldap-source.c, line 662.
(gdb) cont
Continuing.

Breakpoint 2, resolved_callback (unused=0x807b8a370, status=200, lop=0x807be7580) at seahorse-ldap-source.c:663
663         lop->ldap_op = ldap_simple_bind (lop->ldap, NULL, NULL);
(gdb) p* lop
$4 = {parent = {parent = {g_type_instance = {g_class = 0x807bec7a0}, ref_count = 2, qdata = 0x8070d2b40}, 
    message = 0x807f18bc0 "Connecting to: keyserver.pgp.com", progress = -1, is_running = 1, is_done = 0, is_cancelled = 0, error = 0x0, 
    result = 0x807f0a400, result_destroy = 0}, addr = 0x807b8a370, lsrc = 0x8065ca8a0, ldap = 0x7bc1010, ldap_op = -1, stag = 0, 
  ldap_cb = 0x462710 <done_bind_start_info>, chain_cb = 0x463910 <get_key_from_ldap>}

Pointer to lop->ldap seems to be truncated.

Program received signal SIGSEGV, Segmentation fault.
0x0000000801fbab1b in ldap_simple_bind (ld=0x7bc1010, dn=0x0, passwd=0x0) at sbind.c:76
76              assert( LDAP_VALID( ld ) );

Any other info that I can provide?
Comment 3 Yuri Pankov 2007-07-21 02:17:06 UTC
Created attachment 92097 [details] [review]
fix SIGSEGV on FreeBSD/amd64

Well, I've found the cause of pointer truncation:
seahorse-ldap-source.c: In function 'resolved_callback':
seahorse-ldap-source.c:642: warning: implicit declaration of function 'ldap_init'
seahorse-ldap-source.c:642: warning: assignment makes pointer from integer without a cast

FreeBSD now uses openldap 2.3 by default and ldap_init is deprecated in this version (it's ifdef'ed in ldap.h), so you need to define LDAP_DEPRECATED for function prototype to be visible. I've attached patch that fixes SIGSEGV on FreeBSD/amd64.
Comment 4 Teppo Turtiainen 2007-12-30 11:50:00 UTC
I think the requested information has been provided. Reopening.
Comment 5 Yuri Pankov 2007-12-30 13:01:10 UTC
Well, problem seems to be using deprecated functions without -DLDAP_DEPRECATED, so it's actually not a bug, different "distros" use different openldap-client versions. I'm going to mark it as closed but please either define that flag with newer OpenLDAP versions, or use non-deprecated functions. Anyway, thanks for nice program!