Apache OpenOffice (AOO) Bugzilla – Issue 114675
binary URP bridge race on shut down, crash
Last modified: 2011-02-28 12:43:28 UTC
At least on DEV300_m87 based CWS sb123, building smoketestoo_native on unxlngx6 non-pro once failed during shutdown, triggering the OSL_ASSERT(pImpl->m_pWriter) at <http://hg.services.openoffice.org/DEV300/file/467bdca2a6ae/bridges/source/remote/urp/urp_environment.cxx#l200> and then crashing with the below stack (as m_pImpl->m_pWriter->getIdentifier() goes through a null pointer). What is dubious is that ~RemoteThreadPointer accesses remote_BridgeImpl's m_nRemoteThreads and m_bDisposed without locking urp_BridgeImpl's m_disposingMutex -- unlike RemoteEnvironmen_thisDispose, which might thus see a zero m_nRemoteThreads caused by the below stack's ~RemoteThreadCounter, and then do "delete p_Impl->m_pWriter; pImpl->m_pWriter = 0;" before the below stack expects a non-null m_pWriter in allThreadsAreGone. #0 0x00007f200168fb16 in osl::Thread::getIdentifier() const () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #1 0x00007f200168df47 in bridges_urp::allThreadsAreGone(_uno_Environment*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #2 0x00007f2001697050 in bridges_remote::RemoteThreadCounter::~RemoteThreadCounter() () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #3 0x00007f200169a50f in bridges_urp::Job::~Job() () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #4 0x00007f200169737e in bridges_urp::ClientJob::~ClientJob() () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #5 0x00007f2001696de7 in bridges_urp::urp_sendRequest_internal(_uno_Environment*, _typelib_TypeDescription const*, _rtl_uString*, _typelib_InterfaceTypeDescription*, void*, void**, _uno_Any**) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #6 0x00007f2001696ea4 in urp_sendRequest () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #7 0x00007f20016addfb in thisDispatch () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #8 0x00007f20016adeb9 in bridges_remote::Remote2RemoteStub::~Remote2RemoteStub() () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #9 0x00007f20016ae292 in bridges_remote::freeRemote2RemoteStub(_uno_ExtEnvironment*, void*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #10 0x00007f20047db24b in s_stub_defenv_revokeInterface () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #11 0x00007f20047e2276 in s_environment_invoke_v(_uno_Environment*, _uno_Environment*, void (*)(__va_list_tag (*) [1]), __va_list_tag (*) [1]) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #12 0x00007f20047e2312 in uno_Environment_invoke_v () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #13 0x00007f20047e23ae in uno_Environment_invoke () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #14 0x00007f20047da5e9 in defenv_revokeInterface () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #15 0x00007f20016ae392 in thisRelease () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #16 0x00007f20016ab481 in bridges_remote::Remote2UnoProxy::~Remote2UnoProxy() () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #17 0x00007f20016ac80e in bridges_remote::freeRemote2UnoProxy(_uno_ExtEnvironment*, void*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #18 0x00007f20047db24b in s_stub_defenv_revokeInterface () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #19 0x00007f20047e2276 in s_environment_invoke_v(_uno_Environment*, _uno_Environment*, void (*)(__va_list_tag (*) [1]), __va_list_tag (*) [1]) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #20 0x00007f20047e2312 in uno_Environment_invoke_v () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #21 0x00007f20047e23ae in uno_Environment_invoke () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #22 0x00007f20047da5e9 in defenv_revokeInterface () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #23 0x00007f20016ac73c in bridges_remote::releaseRemote2UnoProxy(_uno_Interface*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/liburp_uno.so #24 0x00007f2003267fb6 in bridges::cpp_uno::shared::freeCppInterfaceProxy(_uno_ExtEnvironment*, void*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libgcc3_uno.so #25 0x00007f20047db24b in s_stub_defenv_revokeInterface () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #26 0x00007f20047e2276 in s_environment_invoke_v(_uno_Environment*, _uno_Environment*, void (*)(__va_list_tag (*) [1]), __va_list_tag (*) [1]) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #27 0x00007f20047e2312 in uno_Environment_invoke_v () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #28 0x00007f20047e23ae in uno_Environment_invoke () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #29 0x00007f20047da5e9 in defenv_revokeInterface () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libuno_cppu.so.3 #30 0x00007f2003267e40 in bridges::cpp_uno::shared::CppInterfaceProxy::releaseProxy() () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libgcc3_uno.so #31 0x00007f20032640f8 in cpp_vtable_call () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libgcc3_uno.so #32 0x00007f2003266256 in privateSnippetExecutor () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libgcc3_uno.so #33 0x00007f20045b76ba in com::sun::star::uno::Reference<com::sun::star::frame::XDesktop>::~Reference() () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libtest.so #34 0x00007f20045b5a55 in test::OfficeConnection::tearDown() () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libtest.so #35 0x00007f2004cce967 in (anonymous namespace)::Test::tearDown() () from ./unxlngx6/lib/libsmoketest.so #36 0x00007f2004ccc73a in CppUnit::TestCaller<(anonymous namespace)::Test>::tearDown() () from ./unxlngx6/lib/libsmoketest.so #37 0x00007f2006a83fc4 in CppUnit::TestCaseMethodFunctor::operator()() const () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #38 0x00007f2006a7561b in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #39 0x00007f2006a7eb68 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #40 0x00007f2006a7e796 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #41 0x00007f2006a8e0a0 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #42 0x00007f2006a83e35 in CppUnit::TestCase::run(CppUnit::TestResult*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #43 0x00007f2006a848c0 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #44 0x00007f2006a8479c in CppUnit::TestComposite::run(CppUnit::TestResult*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #45 0x00007f2006a848c0 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #46 0x00007f2006a8479c in CppUnit::TestComposite::run(CppUnit::TestResult*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #47 0x00007f2006a920f9 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #48 0x00007f2006a8db36 in CppUnit::TestResult::runTest(CppUnit::Test*) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #49 0x00007f2006a91f82 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::string const&) () from /net/so-cwsserv02/export/cws/sb123/DEV300/unxlngx6/lib/libcppunit-1.12.so.1 #50 0x000000000040262c in sal_main() () #51 0x00000000004028b2 in main ()
.
The relevant code will be obsoleted through issue 116038.
issue 116038 has been fixed