Issue 117295 - lock order violation in cpp_uno bridge RTTI
Summary: lock order violation in cpp_uno bridge RTTI
Status: REOPENED
Alias: None
Product: udk
Classification: Code
Component: code (show other issues)
Version: DEV300m101
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 11:56 UTC by Stephan Bergmann
Modified: 2017-05-20 11:27 UTC (History)
2 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: 3.4.1
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2011-03-09 11:56:05 UTC
At least on DEV300_m101 based CWS sb140, unxlngx6 non-pro, running soffice under valgrind --tool=helgrind with an org.openofice.test.OfficeConnection-based test that simply calls OfficeConnection.setUp() immediately followed by OfficeConnection.tearDown(), valgrind reports

> Thread #1: lock order "0x4220948 before 0x5248160" violated
>   at 0x4C2BC62: pthread_mutex_lock (valgrind-3.6.1/helgrind/hg_intercepts.c:496)
>   by 0x4012E8A: _dl_open (/build/buildd/eglibc-2.11.1/elf/dl-open.c:499)
>   by 0x657AF65: dlopen_doit (/build/buildd/eglibc-2.11.1/dlfcn/dlopen.c:67)
>   by 0x400E8C5: _dl_catch_error (/build/buildd/eglibc-2.11.1/elf/dl-error.c:178)
>   by 0x657B2AB: _dlerror_run (/build/buildd/eglibc-2.11.1/dlfcn/dlerror.c:164)
>   by 0x657AEE0: dlopen@@GLIBC_2.2.5 (/build/buildd/eglibc-2.11.1/dlfcn/dlopen.c:88)
>   by 0x15C0C5F4: gcc3::RTTI::RTTI() (ooo/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx:121)
>   by 0x15C0C910: gcc3::raiseException(_uno_Any*, _uno_Mapping*) (ooo/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx:263)
>   by 0x15C10BF9: cpp2uno_call(bridges::cpp_uno::shared::CppInterfaceProxy*, _typelib_TypeDescription const*, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void**, void**, void**, unsigned long*) (ooo/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:216)
>   by 0x15C11488: cpp_vtable_call (ooo/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:384)
>   by 0x15C13349: privateSnippetExecutor (in unxlngx6/installation/opt/openoffice.org/ure/lib/libgcc3_uno.so)
>   by 0x6D3E4DE: cppu::throwException(com::sun::star::uno::Any const&) (ooo/cppuhelper/source/exc_thrower.cxx:239)
>   by 0x8FF68DA: ucbhelper::cancelCommandExecution(com::sun::star::ucb::IOErrorCode, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandProcessor> const&) (ooo/ucbhelper/source/provider/cancelcommandexecution.cxx:124)
>   by 0x1B863536: fileaccess::throw_handler(int, int, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, rtl::OUString const&, fileaccess::BaseContent*, bool) (ooo/ucb/source/ucp/file/filglob.cxx:394)
>   by 0x1B848249: fileaccess::TaskManager::endTask(int, rtl::OUString const&, fileaccess::BaseContent*) (ooo/ucb/source/ucp/file/filtask.cxx:105)
>   by 0x1B82232F: fileaccess::BaseContent::endTask(int) (ooo/ucb/source/ucp/file/bc.cxx:1297)
>   by 0x1B8261AA: fileaccess::BaseContent::execute(com::sun::star::ucb::Command const&, int, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) (ooo/ucb/source/ucp/file/bc.cxx:451)
>   by 0x8FAD1E9: ucbhelper::Content_Impl::executeCommand(com::sun::star::ucb::Command const&) (ooo/ucbhelper/source/client/content.cxx:1871)
>   by 0x8FAE399: ucbhelper::Content::executeCommand(rtl::OUString const&, com::sun::star::uno::Any const&) (ooo/ucbhelper/source/client/content.cxx:830)
>   by 0x939E043: utl::_UCBOpenContentSync(utl::UcbLockBytesRef, com::sun::star::uno::Reference<com::sun::star::ucb::XContent>, com::sun::star::ucb::Command const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>, com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler>, com::sun::star::uno::Reference<com::sun::star::ucb::XProgressHandler>, utl::UcbLockBytesHandlerRef) (ooo/unotools/source/ucbhelper/ucblockbytes.cxx:1216)
>   by 0x93A03B2: utl::UCBOpenContentSync(utl::UcbLockBytesRef, com::sun::star::uno::Reference<com::sun::star::ucb::XContent>, com::sun::star::ucb::Command const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>, com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler>, com::sun::star::uno::Reference<com::sun::star::ucb::XProgressHandler>, utl::UcbLockBytesHandlerRef) (ooo/unotools/source/ucbhelper/ucblockbytes.cxx:966)
>   by 0x93A1B7F: utl::UcbLockBytes::CreateLockBytes(com::sun::star::uno::Reference<com::sun::star::ucb::XContent> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, unsigned short, com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler> const&, utl::UcbLockBytesHandler*) (ooo/unotools/source/ucbhelper/ucblockbytes.cxx:1744)
>   by 0x93B3373: utl::lcl_CreateStream(String const&, unsigned short, com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler>, utl::UcbLockBytesHandler*, unsigned char, unsigned char) (ooo/unotools/source/ucbhelper/ucbstreamhelper.cxx:129)
>   by 0x93B3834: utl::UcbStreamHelper::CreateStream(String const&, unsigned short, utl::UcbLockBytesHandler*, unsigned char) (ooo/unotools/source/ucbhelper/ucbstreamhelper.cxx:159)
>   by 0x77DDB63: SfxApplication::GetDisabledSlotList_Impl() (ooo/sfx2/source/appl/appmisc.cxx:186)
>   by 0x78498B2: SfxDispatcher::Construct_Impl(SfxDispatcher*) (ooo/sfx2/source/control/dispatch.cxx:362)
>   by 0x78499DE: SfxDispatcher::SfxDispatcher(SfxDispatcher*) (ooo/sfx2/source/control/dispatch.cxx:382)
>   by 0x77DC73E: SfxApplication::Initialize_Impl() (ooo/sfx2/source/appl/appinit.cxx:278)
>   by 0x77D1AC1: SfxApplication::GetOrCreate() (ooo/sfx2/source/appl/app.cxx:309)
>   by 0x79775C6: SfxGlobalEvents_Impl::SfxGlobalEvents_Impl(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) (ooo/sfx2/source/notify/eventsupplier.cxx:589)
>   by 0x7977739: SfxGlobalEvents_Impl::impl_createInstance(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) (ooo/sfx2/source/notify/eventsupplier.cxx:577)
>   by 0x6D7CADC: cppu::OSingleFactoryHelper::createInstanceEveryTime(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (ooo/cppuhelper/source/factory.cxx:183)
>   by 0x6D7BCFC: cppu::OSingleFactoryHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (ooo/cppuhelper/source/factory.cxx:215)
>   by 0x6D7C389: cppu::OFactoryComponentHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (ooo/cppuhelper/source/factory.cxx:495)
>   by 0x6D7DDBC: cppu::ORegistryFactoryHelper::createInstanceEveryTime(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (ooo/cppuhelper/source/factory.cxx:763)
>   by 0x6D7BCFC: cppu::OSingleFactoryHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (ooo/cppuhelper/source/factory.cxx:215)
>   by 0x6D7C3FA: cppu::OFactoryComponentHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (ooo/cppuhelper/source/factory.cxx:499)
>   by 0x15E66D45: stoc_smgr::OServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (ooo/stoc/source/servicemanager/servicemanager.cxx:1250)
>   by 0x15E64DA9: stoc_smgr::OServiceManager::createInstance(rtl::OUString const&) (ooo/stoc/source/servicemanager/servicemanager.cxx:1360)
>   by 0x527DD0A: desktop::Desktop::Main() (ooo/desktop/source/app/app.cxx:1710)
>   by 0x9961F47: ImplSVMain() (ooo/vcl/source/app/svmain.cxx:189)
>   by 0x9962082: SVMain() (ooo/vcl/source/app/svmain.cxx:226)
>   by 0x52A89CF: soffice_main (ooo/desktop/source/app/sofficemain.cxx:49)
>   by 0x401192: sal_main (ooo/desktop/source/app/main.c:35)
>   by 0x401177: main (ooo/desktop/source/app/main.c:34)
>  Required order was established by acquisition of lock at 0x4220948
>   at 0x4C2BC62: pthread_mutex_lock (valgrind-3.6.1/helgrind/hg_intercepts.c:496)
>   by 0x4012E8A: _dl_open (/build/buildd/eglibc-2.11.1/elf/dl-open.c:499)
>   by 0x657AF65: dlopen_doit (/build/buildd/eglibc-2.11.1/dlfcn/dlopen.c:67)
>   by 0x400E8C5: _dl_catch_error (/build/buildd/eglibc-2.11.1/elf/dl-error.c:178)
>   by 0x657B2AB: _dlerror_run (/build/buildd/eglibc-2.11.1/dlfcn/dlerror.c:164)
>   by 0x657AEE0: dlopen@@GLIBC_2.2.5 (/build/buildd/eglibc-2.11.1/dlfcn/dlopen.c:88)
>   by 0x4E633A1: osl_psz_loadModule (ooo/sal/osl/unx/module.c:88)
>   by 0x4E63311: osl_loadModule (ooo/sal/osl/unx/module.c:66)
>   by 0x6D90043: cppu::loadSharedLibComponentFactory(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&, com::sun::star::uno::Reference<com::sun::star::registry::XRegistryKey> const&) (ooo/cppuhelper/source/shlib.cxx:367)
>   by 0x6D40185: cppu::bootstrapInitialSF(rtl::OUString const&) (ooo/cppuhelper/source/servicefactory.cxx:337)
>   by 0x6D575DA: cppu::(anonymous namespace)::defaultBootstrap_InitialComponentContext(rtl::Bootstrap const&) (ooo/cppuhelper/source/bootstrap.cxx:395)
>   by 0x6D581D0: cppu::defaultBootstrap_InitialComponentContext() (ooo/cppuhelper/source/bootstrap.cxx:477)
>   by 0x528A5DB: desktop::Desktop::CreateApplicationServiceManager() (ooo/desktop/source/app/appinit.cxx:213)
>   by 0x527893C: desktop::Desktop::Init() (ooo/desktop/source/app/app.cxx:739)
>   by 0x9961B1E: InitVCL(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) (ooo/vcl/source/app/svmain.cxx:319)
>   by 0x9961F17: ImplSVMain() (ooo/vcl/source/app/svmain.cxx:183)
>   by 0x9962082: SVMain() (ooo/vcl/source/app/svmain.cxx:226)
>   by 0x52A89CF: soffice_main (ooo/desktop/source/app/sofficemain.cxx:49)
>   by 0x401192: sal_main (ooo/desktop/source/app/main.c:35)
>   by 0x401177: main (ooo/desktop/source/app/main.c:34)
>  followed by a later acquisition of lock at 0x5248160
>   at 0x4C2BC62: pthread_mutex_lock (valgrind-3.6.1/helgrind/hg_intercepts.c:496)
>   by 0x4E61713: osl_acquireMutex (ooo/sal/osl/unx/mutex.c:129)
>   by 0x7009A2B: osl::Mutex::acquire() (unxlngx6/inc/osl/mutex.hxx:66)
>   by 0x7009A58: osl::Guard<osl::Mutex>::Guard(osl::Mutex*) (unxlngx6/inc/osl/mutex.hxx:145)
>   by 0x7009C4C: TypeDescriptor_Init_Impl::getMutex() (ooo/cppu/source/typelib/typelib.cxx:237)
>   by 0x70015F6: typelib_typedescriptionreference_new (ooo/cppu/source/typelib/typelib.cxx:2346)
>   by 0x700D752: typelib_static_type_getByTypeClass (ooo/cppu/source/typelib/static_types.cxx:305)
>   by 0x15E5406C: cppu::detail::getTypeFromTypeClass(_typelib_TypeClass) (unxlngx6/inc/cppu/unotype.hxx:111)
>   by 0x15E5408D: cppu::detail::cppu_detail_getUnoType(rtl::OUString const*) (unxlngx6/inc/cppu/unotype.hxx:194)
>   by 0x15E5409D: cppu::UnoType<rtl::OUString>::get() (unxlngx6/inc/cppu/unotype.hxx:269)
>   by 0x15E5C06A: com::sun::star::uno::Type const& cppu::getTypeFavourUnsigned<rtl::OUString>(rtl::OUString const*) (unxlngx6/inc/cppu/unotype.hxx:290)
>   by 0x15E5C092: com::sun::star::uno::Type const& cppu::getTypeFavourUnsigned<rtl::OUString>(com::sun::star::uno::Sequence<rtl::OUString> const*) (unxlngx6/inc/com/sun/star/uno/Sequence.hxx:228)
>   by 0x15E5C0D4: com::sun::star::uno::Sequence<rtl::OUString>::Sequence(rtl::OUString const*, int) (unxlngx6/inc/com/sun/star/uno/Sequence.hxx:82)
>   by 0x15E5F9C6: __static_initialization_and_destruction_0(int, int) (ooo/stoc/source/security/file_policy.cxx:70)
>   by 0x15E5FC06: global constructors keyed to _ZN8stoc_sec10FilePolicyC2ERKN3com3sun4star3uno9ReferenceINS4_17XComponentContextEEE (ooo/stoc/source/security/file_policy.cxx:604)
>   by 0x15EDAD21: ??? (in unxlngx6/installation/opt/openoffice.org/ure/lib/bootstrap.uno.so)
Comment 1 Stephan Bergmann 2011-03-09 11:58:09 UTC
fixed as <http://hg.services.openoffice.org/cws/sb140/rev/e4dcc915e530>
Comment 2 Stephan Bergmann 2011-03-11 08:53:23 UTC
...plus <http://hg.services.openoffice.org/cws/sb140/rev/07a447d0dc97>
Comment 3 Stephan Bergmann 2011-03-16 14:49:39 UTC
...plus <http://hg.services.openoffice.org/cws/sb140/rev/880847762f9c>
Comment 4 Oliver-Rainer Wittmann 2012-06-13 12:22:13 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.
Comment 5 Pedro Giffuni 2013-03-15 13:32:29 UTC
It looks like SB140 was never integrated into AOO so this should still be an issue.

(For some reason, I am unable to reopen this. Someone else should check it anyways.)
Comment 6 hdu@apache.org 2013-05-16 08:48:11 UTC
Agreed, that looks interesting for AOO too => reopening
Comment 7 Marcus 2017-05-20 11:27:31 UTC
Reset assigne to the default "issues@openoffice.apache.org".