|
Boost Users : |
Subject: Re: [Boost-users] Threaded Daemon - boost::mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed.
From: Zeljko Vrba (zvrba_at_[hidden])
Date: 2009-06-28 15:44:26
On Sun, Jun 28, 2009 at 09:53:02PM +0300, John D wrote:
>
> /usr/include/boost/thread/pthread/mutex.hpp:50: void boost::mutex::lock():
> Assertion `!pthread_mutex_lock(&m)' failed.
>
Try to get the underlying mutex (pthread_mutex_t) from the mutex object, use
the pthread_mutex_lock function instead of the lock() method, inspect its
return value and log it somewhere.. Then you'll have a better idea on why the
lock fails. Not having a shell alone is not a plausible explanation for the
crash.
Maybe somebody better acquainted with Boost.Thread can suggest a less
round-about way of avoiding the assertion and retrieving a useful error code
from the lock() method.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net