id summary reporter owner description type status milestone component version severity resolution keywords cc 11158 Pthread thread deadlock when faketime used slobodyanukma@… viboes "Following code deadlocked on pthread_cond_timedwait call if started like {{{ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 FAKETIME=""+30d"" ./a.out }}} {{{ #include #include using namespace std; void f() { int n=50; while (n--) { cout << n << endl; boost::this_thread::sleep(boost::posix_time::seconds(1)); // boost::this_thread::sleep_for( boost::chrono::seconds(1) ); // sleep(1); } } int main(int argc, char* argv[]) { boost::thread th(f); th.join(); return 0; } }}} Here is backtarce: {{{ #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238 #1 0x0000000000da8ed3 in boost::condition_variable::do_wait_until(boost::unique_lock&, timespec const&) () #2 0x0000000000da792f in boost::this_thread::hiden::sleep_until(timespec const&) () #3 0x0000000000978ff6 in boost::this_thread::sleep (abs_time=...) at /home/sl/project/Elephantdrive/devroot/3rdparty/boost/boost/thread/pthread/thread_data.hpp:249 #4 0x0000000000979065 in boost::this_thread::sleep (rel_time=...) at /home/sl/project/Elephantdrive/devroot/3rdparty/boost/boost/thread/pthread/thread_data.hpp:255 }}} But no deadlocks if used sleep(1) instead. I belive it is some pthread_cond_timedwait issue but will be good call sleep() or usleep() in boost's internals instead in according points if possible. " Bugs closed Boost 1.60.0 thread Boost 1.55.0 Problem fixed