GNOME Bugzilla – Bug 456276
crash in Passwords and Encryption Keys: syncing keys with keyser...
Last modified: 2007-12-30 13:01:36 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)]
+ Trace 147553
Thread 34465648928 (LWP 100060)
----------- .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. --------------------------------------------------
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.
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?
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.
I think the requested information has been provided. Reopening.
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!