start tls

Michael Ströder michael at
Thu Aug 9 14:51:38 CEST 2001

Steffen Ries wrote:
> Can you run python inside gdb to get a traceback? Or give me more
> details how you got the segfaults?

I tried it but I'm a complete newbie regarding gdb. The seg faults
seem to happen at various places. Maybe it has to do with threading
problems? web2ldap can run threaded or "single-threaded". In
latter mode only a clean-up thread is running besides the main thread.
In multi-threaded mode each HTTP request is handled by an own
handler thread (my wrapper module ldapthreadlock is used in this
case to avoid re-entrant calls into the LDAP libs).

I've started the web2ldap stand-alone demon non-detached and
attached gdb to it by issuing

$ sbin/ -d off -t off
$ gdb /usr/bin/python [web2ldap's PID]
  snipped a lot of gdb-output related to shared lib loading
0x4012b772 in __libc_accept () from /lib/
(gdb) c

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1026 (LWP 2840)]
0x4002da78 in pthread_mutex_lock () from /lib/
(gdb) bt
#0  0x4002da78 in pthread_mutex_lock () from /lib/
#1  0x400d223b in free () from /lib/
#2  0x4038c47c in dealloc (self=0x4055ea10) at Modules/LDAPObject.c:46
#3  0x808ea38 in dict_dealloc (mp=0x405d517c) at Objects/dictobject.c:629
#4  0x807fad9 in instance_dealloc (inst=0x405d4ccc) at Objects/classobject.c:583
#5  0x805772d in eval_code2 (co=0x4018c120, globals=0x40190b3c, locals=0x0, 
    args=0x819e0b0, argcount=1, kws=0x819e0b4, kwcount=0, defs=0x0, defcount=0, 
    closure=0x0) at Python/ceval.c:1673
#6  0x80598fd in fast_function (func=0x401f309c, pp_stack=0xbf7ff9dc, n=1, na=1, 
    nk=0) at Python/ceval.c:3022
#7  0x8057f85 in eval_code2 (co=0x401a54a0, globals=0x401a735c, locals=0x0, 
    args=0x4051a438, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, 
    closure=0x0) at Python/ceval.c:1972
#8  0x80597e7 in call_eval_code2 (func=0x401af72c, arg=0x4051a42c, kw=0x0)
    at Python/ceval.c:2966
#9  0x80593e2 in call_object (func=0x401af72c, arg=0x4051a42c, kw=0x0)
    at Python/ceval.c:2805
#10 0x805969c in call_method (func=0x401af72c, arg=0x40177074, kw=0x0)
    at Python/ceval.c:2923
#11 0x80593c6 in call_object (func=0x4055f98c, arg=0x40177074, kw=0x0)
    at Python/ceval.c:2803
#12 0x80592ae in PyEval_CallObjectWithKeywords (func=0x4055f98c, arg=0x40177074, 
    kw=0x0) at Python/ceval.c:2740
#13 0x8072d19 in t_bootstrap (boot_raw=0x8165fc8) at ./Modules/threadmodule.c:190
#14 0x4002cca3 in pthread_start_thread () from /lib/

Ciao, Michael.

More information about the python-ldap mailing list