[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4476) connection deadlock



Unfortunately gdb seems to be messing up the backtraces.
Note that result.c:161 is a mutex_lock statement, the 
access_allowed_mask call is pure fantasy.

ando@sys-net.it wrote:
>
> Thread 2 (Thread 1216416096 (LWP 23194)):
> #0  0x0000003a48f0adfb in __lll_mutex_lock_wait ()
>    from /lib64/tls/libpthread.so.0
> #1  0x0000002ab9402380 in ?? ()
> #2  0x6f632e6f00000000 in ?? ()
> #3  0x0000003a48f07bd4 in pthread_mutex_lock () from /lib64/tls/libpthread.so.0
> #4  0x000000000046e11f in access_allowed_mask (op=0x5d8af6, e=0x4868e8f0,
>     desc=0x4868e8f0, val=0x4880fde0, access=1668048244,
>     state=0x3030303000000000, maskp=0x4868e240) at acl.c:427
> #5  0x0000000000458550 in send_ldap_ber (conn=0x2aaa0507c0, ber=0x4868e8f0)
>     at result.c:161
> (More stack frames follow...)
>
> Thread 1 (Thread 182894137632 (LWP 23152)):
> #0  0x0000003a48f06ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x00000000005d8a04 in ldap_pvt_thread_join (thread=1082132832,
>     thread_return=0x0) at thr_posix.c:193
> #2  0x0000000000443496 in slapd_daemon () at daemon.c:2241
> #3  0x000000000042c8c7 in main (argc=7, argv=0x7fbffff7b8) at main.c:902
>
> A quick summary:
>
> connection      n.thr.  threads
>
> 0x2aaa0507c0    7       17,11,7-5,3-2
> 0x2aaa0ce530    9       16-12,10-8,4
>
> 7 threads are stuck on one connection, and 9 on another.  I'm not much familiar
> with that code, but there should clearly be a deadlock.  One oddity is that 
>
> #3  0x0000003a48f07bd4 in pthread_mutex_lock () from /lib64/tls/libpthread.so.0
> #4  0x000000000046e11f in access_allowed_mask (op=0x5d8af6, e=0x40e7f8f0,
>     desc=0x40e7f8f0, val=0x41000de0, access=808525938,
>     state=0x40f316e00000000, maskp=0x40e7f240) at acl.c:427
>
> looks pretty inconsistent, as there is no in pthread_mutex_lock() at acl.c:427
> (this is HEAD code); note that the code was compiled by gcc 3.4.5 with -O0 so
> there should be no optimization around.
>
> p.
>
>
>
>
>   


-- 
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc
  OpenLDAP Core Team            http://www.openldap.org/project/