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

Re: (ITS#4476) connection deadlock



On Wed, 2006-04-05 at 15:36 -0700, Howard Chu wrote:
> Pierangelo Masarati wrote:
> > On Wed, 2006-04-05 at 15:09 -0700, Howard Chu wrote:
> >   
> >> 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.
> >>     
> >
> > yep.  that's still running, if there's anything I should print.
> >
> >
> >   
> You can try printing the contents of the mutex and see if it recorded an 
> owner thread ID, and associate that with one of the active threads.

(gdb) p ((Connection*)0x2aaa0ce530)->c_mutex
$8 = {__m_reserved = 0, __m_count = 0, __m_owner = 0x100000000, __m_kind = 0,
  __m_lock = {__status = 0, __spinlock = 0}}
(gdb) p ((Connection*)0x2aaa0ce530)->c_write_mutex
$9 = {__m_reserved = 2, __m_count = 0, __m_owner = 0x100005a8c, __m_kind = 0,
  __m_lock = {__status = 0, __spinlock = 0}}
(gdb) p ((Connection*)0x2aaa0507c0)->c_mutex
$10 = {__m_reserved = 0, __m_count = 0, __m_owner = 0x100000000, __m_kind = 0,
  __m_lock = {__status = 0, __spinlock = 0}}
(gdb) p ((Connection*)0x2aaa0507c0)->c_write_mutex
$11 = {__m_reserved = 2, __m_count = 0, __m_owner = 0x100005a99, __m_kind = 0,
  __m_lock = {__status = 0, __spinlock = 0}}

I'm not quite good at interpreting mutexes, but none of them seems to be
locked (__status member of __m_lock); the two c_write_mutex seem to
belong to Thread 9 and 3 ((0xFFFF & __m_owner) == LWP), those that are
waiting on ldap_pvt_thread_cond_wait().  This doesn't make too much
sense, as it seems that the mutexes are not locked, and that the threads
that are now waiting on the condition are those that owned them last.

p.




Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------