Opened 8 years ago

Closed 8 years ago

#10537 closed Bugs (duplicate)

Application crash on throw exception

Reported by: anonymous Owned by: viboes
Milestone: Component: thread
Version: Boost 1.41.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

I am getting following backtrace,which occur only once, please let me know on this:

#0  0x00007f05e797dd95 in raise () from /lib64/libc.so.6
#1  0x00007f05e797f2ab in abort () from /lib64/libc.so.6
#2  0x00007f05e85bef2d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#3  0x00007f05e85bd0d6 in ?? () from /usr/lib64/libstdc++.so.6
#4  0x00007f05e85bd103 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5  0x00007f05e85bd1fe in __cxa_throw () from /usr/lib64/libstdc++.so.6
#6  0x00000000019b5a16 in boost::throw_exception<boost::lock_error> (e=...) at /usr/include/boost/throw_exception.hpp:61
#7  0x00000000019b4a31 in boost::mutex::lock (this=0x47ef3a8) at /usr/include/boost/thread/pthread/mutex.hpp:55
#8  0x00000000019b5c66 in boost::unique_lock<boost::mutex>::lock (this=0x7f058c5f5ce0) at /usr/include/boost/thread/locks.hpp:412
#9  0x00000000019b5b21 in boost::unique_lock<boost::mutex>::unique_lock (this=0x7f058c5f5ce0, m_=...)
    at /usr/include/boost/thread/locks.hpp:290
#10 0x00000000019b54c9 in boost::shared_mutex::unlock_and_lock_upgrade (this=0x47ef3a0)
    at /usr/include/boost/thread/pthread/shared_mutex.hpp:274
#11 0x00000000019b79d6 in boost::upgrade_lock<boost::shared_mutex>::upgrade_lock (this=0x7f058c5f5d30, other=...)
    at /usr/include/boost/thread/locks.hpp:769
#12 0x00000000019b6f12 in boost::upgrade_lock<boost::shared_mutex>::operator=(boost::unique_lock<boost::shared_mutex>&&) (
    this=0x7f058c5f61f0, other=...) at /usr/include/boost/thread/locks.hpp:784
#13 0x00000000019b626e in boost::upgrade_to_unique_lock<boost::shared_mutex>::~upgrade_to_unique_lock (this=0x7f058c5f61d0, 
    __in_chrg=<optimized out>) at /usr/include/boost/thread/locks.hpp:932

Change History (10)

comment:1 by viboes, 8 years ago

Component: Nonethread
Owner: set to Anthony Williams

comment:2 by viboes, 8 years ago

Description: modified (diff)
Owner: changed from Anthony Williams to viboes
Status: newassigned

Please could you add the compiler, boost version and a small test that shows the backtrace?

comment:3 by viboes, 8 years ago

Could you see if the patch in #9569 fix the crash?

comment:4 by anonymous, 8 years ago

g++ (SUSE Linux) 4.6.2 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

boost-1_33_1

comment:5 by anonymous, 8 years ago

crash do come very rarely. We have 2 writer threads and multiple reader

comment:6 by anonymous, 8 years ago

My Boost version is 1.46.1..

comment:7 by viboes, 8 years ago

Have you applied the patch?

comment:8 by anonymous, 8 years ago

As crash is not reproducible so we cant be sure about the patch.

I read the issue fixed in the patch, As per my understanding, This patch do fix the upgrade lock issue (thread don't get upgrade lock if some read lock is already there). I am not sure, can this problem cause crash? Error code is EINVAL not EDEAD in my scenario.

Please correct me if my understanding is wrong.

comment:9 by viboes, 8 years ago

Sorry, I didn't see that you were on linux. I expect that you applied the patch at #5516 ;-)

Could you show the code?

comment:10 by viboes, 8 years ago

Milestone: To Be Determined
Resolution: duplicate
Status: assignedclosed

Yes, as there is a throw.

I will move it as duplicated of #5516.

Last edited 8 years ago by viboes (previous) (diff)
Note: See TracTickets for help on using tickets.