0

I'm running some tests on AIX, and I'm getting a bunch of crashes similar to the following:

build   25-May-2019 18:40:46    Segmentation fault in ThreadSafeSharedObject_cpp::ChangeRefCount(unsigned int&,int) at line 21 in file "" ($t8)
build   25-May-2019 18:40:46    Thread $t1
build   25-May-2019 18:40:46    glinkl.pthread_mutex_unlock() at 0xd5d4baac
build   25-May-2019 18:40:46    BlockingResponseQueue.Simba::Support::CriticalSection::Leave() const(0x2055a320), line 54 in "CriticalSection.h"
build   25-May-2019 18:40:46    BlockingResponseQueue.Simba::Support::CriticalSectionLock::~CriticalSectionLock()(0x2ff1c920, 0x2), line 38 in "CriticalSectionLock.h"
build   25-May-2019 18:40:46    CInterface.Simba::ODBC::DiagManager::Clear()(0x2055a2e8), line 132 in "DiagManager.h"
build   25-May-2019 18:40:46    Simba::ODBC::DiagManager::~DiagManager()(this = 0x2055a2e8, __dtorFlags = 2, __vtt = (nil)), line 110 in "DiagManager.cpp"
build   25-May-2019 18:40:46    Simba::ODBC::Descriptor::~Descriptor()(this = 0x2055a2c0, __dtorFlags = 0, __vtt = (nil)), line 121 in "Descriptor.cpp"
build   25-May-2019 18:40:46    Simba::ODBC::AppDescriptor::~AppDescriptor()(this = 0x2055a2c0, __dtorFlags = 0, __vtt = (nil)), line 24 in "AppDescriptor.cpp"
build   25-May-2019 18:40:46    Simba::ODBC::ImplicitAppDescriptor::~ImplicitAppDescriptor()(this = 0x2055a2c0, __dtorFlags = 3, __vtt = (nil)), line 28 in "ImplicitAppDescriptor.cpp"
build   25-May-2019 18:40:46    Simba::ODBC::Statement::~Statement()(this = 0x20525ed0, __dtorFlags = 3, __vtt = (nil)), line 448 in "Statement.cpp"
build   25-May-2019 18:40:46    Connection.void Connection_Connection_cpp::DeleteAndRemove<std::vector<Simba::ODBC::Statement*,std::allocator<Simba::ODBC::Statement*> > >(std::vector<Simba::ODBC::Statement*,std::allocator<Simba::ODBC::Statement*> >&,std::_Ptrit<Simba::ODBC::Statement*,long,Simba::ODBC::Statement**,Simba::ODBC::Statement*&,Simba::ODBC::Statement**,Simba::ODBC::Statement*&>)(in_vector = &(...), in_toDeleteAndRemove = &(...)), line 429 in "Connection.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::ODBC::Connection::DeleteStatement(Simba::ODBC::Statement*)(this = 0x20557700, in_statement = 0x20525ed0), line 846 in "Connection.cpp"
build   25-May-2019 18:40:46    Simba::ODBC::Connection::DeleteStatement(Simba::ODBC::Statement*)(this = 0x20557700, in_statement = 0x20525ed0), line 846 in "Connection.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::ODBC::ConnectionState::SQLFreeHandle(Simba::ODBC::Connection*,short,void*)(this = 0x20517318, in_connection = 0x20557700, HandleType = 3, Handle = 0x00000008), line 176 in "ConnectionState.cpp"
build   25-May-2019 18:40:46    Simba::ODBC::ConnectionState::SQLFreeHandle(Simba::ODBC::Connection*,short,void*)(this = 0x20517318, in_connection = 0x20557700, HandleType = 3, Handle = 0x00000008), line 176 in "ConnectionState.cpp"
build   25-May-2019 18:40:46    Simba::ODBC::Connection::SQLFreeHandle(short,void*)(this = 0x20557700, HandleType = 3, Handle = 0x00000008), line 1587 in "Connection.cpp"
build   25-May-2019 18:40:46    unnamed block in CInterface.SQLFreeHandle(HandleType = 3, Handle = 0x00000008), line 1931 in "CInterface.cpp"
build   25-May-2019 18:40:46    unnamed block in CInterface.SQLFreeHandle(HandleType = 3, Handle = 0x00000008), line 1931 in "CInterface.cpp"
build   25-May-2019 18:40:46    CInterface.SQLFreeHandle(HandleType = 3, Handle = 0x00000008), line 1931 in "CInterface.cpp"
build   25-May-2019 18:40:46    __SQLFreeHandle(0x30003, 0x206b3ed8) at 0xd05fcd98
build   25-May-2019 18:40:46    SQLFreeHandle.SQLFreeHandle(0x30003, 0x206b3ed8) at 0xd05fd28c
build   25-May-2019 18:40:46    Simba::ODBCTest::Cli::SqlFreeHandle(short,void*)(this = 0x1006f818, handleType = 0, handle = (nil)), line 1704 in "Cli.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::ODBCTest::Handle::~Handle()(this = 0x20489720, __dtorFlags = 0, __vtt = (nil)), line 236 in "Handle.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::ODBCTest::Handle::~Handle()(this = 0x20489720, __dtorFlags = 0, __vtt = (nil)), line 236 in "Handle.cpp"
build   25-May-2019 18:40:46    Simba::ODBCTest::Handle::~Handle()(this = 0x20489720, __dtorFlags = 0, __vtt = (nil)), line 236 in "Handle.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::ODBCTest::Statement::~Statement()(this = 0x102571f8, __dtorFlags = 0, __vtt = 0x0000005b), line 42 in "Statement.cpp"
build   25-May-2019 18:40:46    Simba::ODBCTest::Statement::~Statement()(this = 0x102571f8, __dtorFlags = 0, __vtt = 0x0000005b), line 42 in "Statement.cpp"
build   25-May-2019 18:40:46    TestCases_DriverSpecificTests_SimbaClient_AutoReconnectTests_cpp::AutoReconnectTestBase::executeCleanup()(this = 0xf09e19c8), line 238 in "SBTAutoPtr.h"
build   25-May-2019 18:40:46    unnamed block in Simba::Test::Case::runTest(const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&)(this = 0x20487320, runId = &(...)), line 205 in "SBTCase.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::Test::Case::runTest(const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&)(this = 0x20487320, runId = &(...)), line 205 in "SBTCase.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::Test::Case::runTest(const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&)(this = 0x20487320, runId = &(...)), line 205 in "SBTCase.cpp"
build   25-May-2019 18:40:46    Simba::Test::Case::runTest(const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&)(this = 0x20487320, runId = &(...)), line 205 in "SBTCase.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::Test::Engine::RunTests(Simba::Test::TestEnvironment*,int)(this = 0x2ff1dc40, testEnv = 0x204897f0, loopCount = 1), line 220 in "SBTEngine.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::Test::Engine::RunTests(Simba::Test::TestEnvironment*,int)(this = 0x2ff1dc40, testEnv = 0x204897f0, loopCount = 1), line 220 in "SBTEngine.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::Test::Engine::RunTests(Simba::Test::TestEnvironment*,int)(this = 0x2ff1dc40, testEnv = 0x204897f0, loopCount = 1), line 220 in "SBTEngine.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::Test::Engine::RunTests(Simba::Test::TestEnvironment*,int)(this = 0x2ff1dc40, testEnv = 0x204897f0, loopCount = 1), line 220 in "SBTEngine.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::Test::Engine::RunTests(Simba::Test::TestEnvironment*,int)(this = 0x2ff1dc40, testEnv = 0x204897f0, loopCount = 1), line 220 in "SBTEngine.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::Test::Engine::RunTests(Simba::Test::TestEnvironment*,int)(this = 0x2ff1dc40, testEnv = 0x204897f0, loopCount = 1), line 220 in "SBTEngine.cpp"
build   25-May-2019 18:40:46    unnamed block in Simba::Test::Engine::RunTests(Simba::Test::TestEnvironment*,int)(this = 0x2ff1dc40, testEnv = 0x204897f0, loopCount = 1), line 220 in "SBTEngine.cpp"
build   25-May-2019 18:40:46    Simba::Test::Engine::RunTests(Simba::Test::TestEnvironment*,int)(this = 0x2ff1dc40, testEnv = 0x204897f0, loopCount = 1), line 220 in "SBTEngine.cpp"
build   25-May-2019 18:40:46    unnamed block in Main_cpp::DoMain(int,char**)(argc = 0, argv = (nil)), line 646 in "Main.cpp"
build   25-May-2019 18:40:46    unnamed block in Main_cpp::DoMain(int,char**)(argc = 0, argv = (nil)), line 646 in "Main.cpp"
build   25-May-2019 18:40:46    unnamed block in Main_cpp::DoMain(int,char**)(argc = 0, argv = (nil)), line 646 in "Main.cpp"
build   25-May-2019 18:40:46    Main_cpp::DoMain(int,char**)(argc = 0, argv = (nil)), line 646 in "Main.cpp"
build   25-May-2019 18:40:46    Thread $t5
build   25-May-2019 18:40:46    __fd_select(??, ??, ??, ??, ??) at 0xd027284c
build   25-May-2019 18:40:46    unnamed block in sock.sock_select(??, ??, ??, ??, ??), line 817 in "time.h"
build   25-May-2019 18:40:46    sock.sock_select(??, ??, ??, ??, ??), line 817 in "time.h"
build   25-May-2019 18:40:46    unnamed block in swatch.swatch_get(??, ??, ??, ??), line 212 in "swatch.cpp"
build   25-May-2019 18:40:46    swatch.swatch_get(??, ??, ??, ??), line 212 in "swatch.cpp"
build   25-May-2019 18:40:46    unnamed block in TestFrameworkLibrary_Utils_SBTNetworkProxy_cpp::WorkerThread::DoExecute()(this = 0x2048939c), line 262 in "SBTNetworkProxy.cpp"
build   25-May-2019 18:40:46    TestFrameworkLibrary_Utils_SBTNetworkProxy_cpp::WorkerThread::DoExecute()(this = 0x2048939c), line 262 in "SBTNetworkProxy.cpp"
build   25-May-2019 18:40:46    Simba::Test::SBTThread::Execute()(this = 0x2048939c), line 144 in "SBTThread_Unix.cpp"
build   25-May-2019 18:40:46    Simba::Test::SBTThread::StartThreadFunction(void*)(in_thread = (nil)), line 165 in "SBTThread_Unix.cpp"
build   25-May-2019 18:40:46    Thread $t6
build   25-May-2019 18:40:46    .() at 0xdeadbeef
build   25-May-2019 18:40:46    Thread $t8
build   25-May-2019 18:40:46    ThreadSafeSharedObject_cpp::ChangeRefCount(unsigned int&,int)(io_refCount = 4294967295, delta = -1), line 21 in "ThreadSafeSharedObject.cpp"
build   25-May-2019 18:40:46    Simba::Support::ThreadSafeSharedObject::Release() const(this = 0x0300182c), line 41 in "ThreadSafeSharedObject.cpp"
build   25-May-2019 18:40:46    RazorChannel.Simba::Support::SharedPtr<Simba::Client::RequesterContext>::DecreaseRef()(0x4d0065), line 354 in "SharedPtr.h"
build   25-May-2019 18:40:46    RazorChannel.Simba::Support::SharedPtr<Simba::Client::RequesterContext>::~SharedPtr()(0x4d0065, 0x2), line 127 in "SharedPtr.h"
build   25-May-2019 18:40:46    RazorConnectionBuilder.void std::_Destroy<Simba::Support::SharedPtr<Simba::Client::RequesterContext> >(Simba::Support::SharedPtr<Simba::Client::RequesterContext>*)(0x4d0065), line 339 in "xmemory"
build   25-May-2019 18:40:46    RazorConnectionBuilder.std::allocator<Simba::Support::SharedPtr<Simba::Client::RequesterContext> >::destroy(Simba::Support::SharedPtr<Simba::Client::RequesterContext>*)(0x2055e1d8, 0x4d0065), line 420 in "xmemory"
build   25-May-2019 18:40:46    RazorConnectionBuilder.std::vector<Simba::Support::SharedPtr<Simba::Client::RequesterContext>,std::allocator<Simba::Support::SharedPtr<Simba::Client::RequesterContext> > >::_Destroy(Simba::Support::SharedPtr<Simba::Client::RequesterContext>*,Simba::Support::SharedPtr<Simba::Client::RequesterContext>*)(0x2055e1d8, 0x4d0065, 0x730073), line 317 in "vector"
build   25-May-2019 18:40:46    unnamed block in std::vector<Simba::Support::SharedPtr<Simba::Client::RequesterContext>,std::allocator<Simba::Support::SharedPtr<Simba::Client::RequesterContext> > >::erase(std::_Ptrit<Simba::Support::SharedPtr<Simba::Client::RequesterContext>,long,Simba::Support::SharedPtr<Simba::Client::RequesterContext>*,Simba::Support::SharedPtr<Simba::Client::RequesterContext>&,Simba::Support::SharedPtr<Simba::Client::RequesterContext>*,Simba::Support::SharedPtr<Simba::Client::RequesterContext>&>,std::_Ptrit<Simba::Support::SharedPtr<Simba::Client::RequesterContext>,long,Simba::Support::SharedPtr<Simba::Client::RequesterContext>*,Simba::Support::SharedPtr<Simba::Client::RequesterContext>&,Simba::Support::SharedPtr<Simba::Client::RequesterContext>*,Simba::Support::SharedPtr<Simba::Client::RequesterContext>&>)(this = 0x2055e1d8, __classReturn = &(...), _F = &(...), _L = &(...)), line 278 in "vector"
build   25-May-2019 18:40:46    std::vector<Simba::Support::SharedPtr<Simba::Client::RequesterContext>,std::allocator<Simba::Support::SharedPtr<Simba::Client::RequesterContext> > >::erase(std::_Ptrit<Simba::Support::SharedPtr<Simba::Client::RequesterContext>,long,Simba::Support::SharedPtr<Simba::Client::RequesterContext>*,Simba::Support::SharedPtr<Simba::Client::RequesterContext>&,Simba::Support::SharedPtr<Simba::Client::RequesterContext>*,Simba::Support::SharedPtr<Simba::Client::RequesterContext>&>,std::_Ptrit<Simba::Support::SharedPtr<Simba::Client::RequesterContext>,long,Simba::Support::SharedPtr<Simba::Client::RequesterContext>*,Simba::Support::SharedPtr<Simba::Client::RequesterContext>&,Simba::Support::SharedPtr<Simba::Client::RequesterContext>*,Simba::Support::SharedPtr<Simba::Client::RequesterContext>&>)(this = 0x2055e1d8, __classReturn = &(...), _F = &(...), _L = &(...)), line 278 in "vector"
build   25-May-2019 18:40:46    std::vector<Simba::Support::SharedPtr<Simba::Client::RequesterContext>,std::allocator<Simba::Support::SharedPtr<Simba::Client::RequesterContext> > >::clear()(this = 0x2055e1d8), line 282 in "vector"
build   25-May-2019 18:40:46    RazorConnectionBuilder_cpp::AutoReconnectTask::Reconnect()(this = 0x2055e1d0), line 1979 in "RazorConnectionBuilder.cpp"
build   25-May-2019 18:40:46    unnamed block in RazorConnectionBuilder_cpp::AutoReconnectTask::Run(void*)(in_param = 0x2055e1d0), line 1952 in "RazorConnectionBuilder.cpp"
build   25-May-2019 18:40:46    RazorConnectionBuilder_cpp::AutoReconnectTask::Run(void*)(in_param = 0x2055e1d0), line 1952 in "RazorConnectionBuilder.cpp"

they all have a single thread whose entire stack is just

.() at 0xdeadbeef

Since dbx always claims that the crash is from another thread, it wouldn't make sense to me that those threads have 'gone bad' (normally, I would assume that the next instruction executed on that thread would cause a segmentation fault). Given that 0xDEADBEEF is a well-known constant, I'm thinking this is some 'special case' in either the debugger or the runtime.

There's also a thread missing which I would expect to be here (in fact, it having already terminated could be the cause of the crash, since it 'owned' the object which seems to be invalid). Is it possible that ".() at 0xdeadbeef" indicates a thread which has terminated but not yet been joined?

edit: I don't think this question is a duplicate of "what does dead beef mean?", since I want to know what it means in this context, not in general (the question already mentioned I know it's a well known constant)

edit 2: It's also failing in 64-bit, and there it's .() at 0xbadc0ffee0ddf00d...

Bwmat
  • 4,314
  • 3
  • 27
  • 42
  • https://en.wikipedia.org/wiki/Deadbeef – Robert Harvey Jun 06 '19 at 19:14
  • 2
    [More common debug values](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_debug_values) – user4581301 Jun 06 '19 at 19:16
  • 2
    While the error is important, the code that generated the error is even more important. – tadman Jun 06 '19 at 19:22
  • That's the thing, I'm not convinced the part I'm asking about _is_ an error, that's what the question is. Unfortunately I can't provide the code – Bwmat Jun 06 '19 at 20:22
  • How do I get this reopened? It's NOT a duplicate – Bwmat Jun 06 '19 at 21:13
  • To re-open you should add a [mcve] that demonstrates that the problem is NOT covered by the duplicate. To be honest, I agree with you, it's not a good duplicate, but without an example we can pick over to find you a viable solution, the question cannot be answered and might as well stay locked. – user4581301 Jun 06 '19 at 21:54
  • It's not a duplicate at ALL though, IMO should close with the right reason at least. Do I really need a reproducer when asking about the meaning of debugger output? I don't see any feasible way with coming up with one, in any case. – Bwmat Jun 06 '19 at 22:18
  • 0xbadc0ffee0ddf00d = old IBMese for uninitialized register. – user4581301 Jun 07 '19 at 01:21
  • It can be anything as you are using Aix, C++ and multithreading: each of the three is very problematic in itself, let alone combined together. An example: if one of the components of your program was compiled with large-file-support, and one without it, the results is UB. The same is true for option `-pthread` (see `errno` and `_Errno` in errno.h). – Lorinczy Zsigmond Jun 07 '19 at 03:43
  • It turned out that this was caused by a thread finishing before I expected to, like I theorized in the question, so it seems like that *is* what dbx shows for a thread which has finished, but has not yet been joined. I can't reproduce this anymore after fixing the thread exiting early issue. – Bwmat Jun 28 '19 at 16:48

0 Answers0