You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Andrew Stitcher (JIRA)" <ji...@apache.org> on 2012/07/05 22:46:34 UTC

[jira] [Resolved] (QPID-2567) [c++] Timer - possible thread lock ordering violation

     [ https://issues.apache.org/jira/browse/QPID-2567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Stitcher resolved QPID-2567.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.17

Probably fixed by r1357827
                
> [c++] Timer - possible thread lock ordering violation
> -----------------------------------------------------
>
>                 Key: QPID-2567
>                 URL: https://issues.apache.org/jira/browse/QPID-2567
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.7
>         Environment: RHEL-6 beta
>            Reporter: Kim van der Riet
>            Assignee: Andrew Stitcher
>             Fix For: 0.17
>
>
> Starting the broker using valgrind and the helgrind thread check tool shows several lock order violations centered around the qpid::sys::Timer class.
> valgrind --tool=helgrind .libs/lt-qpidd --auth no --log-enable info+
> results in the following message (and others that are similar):
> ==31280== Thread #2: lock order "0x597D548 before 0x59AE350" violated
> ==31280==    at 0x4A0679C: pthread_mutex_lock (hg_intercepts.c:464)
> ==31280==    by 0x4E8C27B: qpid::sys::Mutex::lock() (Mutex.h:116)
> ==31280==    by 0x4E8CD82: qpid::sys::ScopedLock<qpid::sys::Mutex>::ScopedLock(qpid::sys::Mutex&) (Mutex.h:33)
> ==31280==    by 0x56346FF: qpid::sys::Timer::add(boost::intrusive_ptr<qpid::sys::TimerTask>) (Timer.cpp:162)
> ==31280==    by 0x4EFDCD0: qpid::broker::LinkRegistry::Periodic::fire() (LinkRegistry.cpp:73)
> ==31280==    by 0x563344C: qpid::sys::TimerTask::fireTask() (Timer.cpp:57)
> ==31280==    by 0x5634917: qpid::sys::Timer::fire(boost::intrusive_ptr<qpid::sys::TimerTask>) (Timer.cpp:190)
> ==31280==    by 0x5633E84: qpid::sys::Timer::run() (Timer.cpp:119)
> ==31280==    by 0x5525BEE: qpid::sys::(anonymous namespace)::runRunnable(void*) (Thread.cpp:35)
> ==31280==    by 0x4A0A1A5: mythread_wrapper (hg_intercepts.c:201)
> ==31280==    by 0x31D6C07950: start_thread (pthread_create.c:301)
> ==31280==    by 0x31D68E4D3C: clone (clone.S:115)
> ==31280==   Required order was established by acquisition of lock at 0x597D548
> ==31280==    at 0x4A095F6: pthread_cond_wait_WRK (hg_intercepts.c:653)
> ==31280==    by 0x4A096B8: pthread_cond_wait@* (hg_intercepts.c:675)
> ==31280==    by 0x4EF587A: qpid::sys::Condition::wait(qpid::sys::Mutex&) (Condition.h:63)
> ==31280==    by 0x4EF5932: qpid::sys::Monitor::wait() (Monitor.h:41)
> ==31280==    by 0x5633AA6: qpid::sys::Timer::run() (Timer.cpp:98)
> ==31280==    by 0x5525BEE: qpid::sys::(anonymous namespace)::runRunnable(void*) (Thread.cpp:35)
> ==31280==    by 0x4A0A1A5: mythread_wrapper (hg_intercepts.c:201)
> ==31280==    by 0x31D6C07950: start_thread (pthread_create.c:301)
> ==31280==    by 0x31D68E4D3C: clone (clone.S:115)
> ==31280==   followed by a later acquisition of lock at 0x59AE350
> ==31280==    at 0x4A0679C: pthread_mutex_lock (hg_intercepts.c:464)
> ==31280==    by 0x4E8C27B: qpid::sys::Mutex::lock() (Mutex.h:116)
> ==31280==    by 0x4E8CD82: qpid::sys::ScopedLock<qpid::sys::Mutex>::ScopedLock(qpid::sys::Mutex&) (Mutex.h:33)
> ==31280==    by 0x5633B97: qpid::sys::Timer::run() (Timer.cpp:108)
> ==31280==    by 0x5525BEE: qpid::sys::(anonymous namespace)::runRunnable(void*) (Thread.cpp:35)
> ==31280==    by 0x4A0A1A5: mythread_wrapper (hg_intercepts.c:201)
> ==31280==    by 0x31D6C07950: start_thread (pthread_create.c:301)
> ==31280==    by 0x31D68E4D3C: clone (clone.S:115)
> Running perftest against this broker shows numerous read/write conflicts too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org