summaryrefslogtreecommitdiff
path: root/animations
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-11 13:20:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-12 06:53:05 +0000
commit91c954f53f223bcdcfb33fc3625082f05234e16d (patch)
treebc3beef104b1df4708890bbbb7300e2efde91b16 /animations
parentc68606ca09d22caea7c37417d97c076524fecb38 (diff)
tsan:lock-order-inversion in AnimationNode
make -j 24 -rs -f /home/noel/libo-tsan/Makefile.gbuild CppunitTest_filter_svg [build CUT] filter_svg ================== WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=1138169) Cycle in lock order graph: M0 (0x7b0c0043c8c0) => M1 (0x7b0c00459090) => M0 Mutex M1 acquired here while holding mutex M0 in main thread: /home/noel/llvm-project/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_common_interceptors.inc:4481 (cppunittester+0x9b4c2) #1 osl_acquireMutex ??:? (libuno_sal.so.3+0x783ca) namespace)::AnimationNode::setParent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) animcore.cxx:? (libanimcorelo.so+0x1d34f) M1 try to lock namespace)::AnimationNode::setParent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) animcore.cxx:? (libanimcorelo.so+0x33bf2) namespace)::AnimationNode::appendChild(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> const&) animcore.cxx:? (libanimcorelo.so+0x27312) M0 locked namespace)::AnimationNode::appendChild(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> const&) animcore.cxx:? (libanimcorelo.so+0x34d29) xmloff::AnimationNodeContext::AnimationNodeContext(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> const&, SvXMLImport&, int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&, std::shared_ptr<xmloff::AnimationsImportHelperImpl> const&) animationimport.cxx:? (libxolo.so+0x338060) com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) animationimport.cxx:? (libxolo.so+0x33e010) com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) ??:? (libxolo.so+0x2ca188) com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) ??:? (libxolo.so+0x2cb106) namespace)::Event const*) fastparser.cxx:? (libexpwraplo.so+0x4731a) sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) fastparser.cxx:? (libexpwraplo.so+0x407fa) sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) ??:? (libexpwraplo.so+0x48d08) const&) ??:? (libxolo.so+0x2c7296) SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) ??:? (libxolo.so+0x2c74e2) namespace)::ReadThroughComponent(com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, char const*, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, char const*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, rtl::OUString const&, bool) sdxmlwrp.cxx:? (libsdlo.so+0x4f2088) (libsdlo.so+0x4ef8ed) #17 sd::DrawDocShell::Load(SfxMedium&) ??:? (libsdlo.so+0x5bdbeb) (libsfxlo.so+0x596b65) #19 SfxObjectShell::DoLoad(SfxMedium*) ??:? (libsfxlo.so+0x598732) SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ??:? (libsfxlo.so+0x5e5222) SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ??:? (libsfxlo.so+0x5e6135) namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) frmload.cxx:? (libsfxlo.so+0x6ca8fb) namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) frmload.cxx:? (libsfxlo.so+0x6cd749) (libfwklo.so+0x30000f) #25 framework::LoadEnv::start() loadenv.cxx:? (libfwklo.so+0x2fb828) com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) loadenv.cxx:? (libfwklo.so+0x2f98d0) framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) loadenv.cxx:? (libfwklo.so+0x2f8905) rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ??:? (libfwklo.so+0x322cbf) framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ??:? (libfwklo.so+0x322f11) rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ??:? (libunotest.so+0x13f41) (libsubsequenttest.so+0x5fc93) std::char_traits<char16_t> >, char const*) ??:? (libsubsequenttest.so+0x60570) (libtest_filter_svg.so+0x161bd) Mutex M0 acquired here while holding mutex M1 in main thread: /home/noel/llvm-project/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_common_interceptors.inc:4481 (cppunittester+0x9b4c2) #1 osl_acquireMutex ??:? (libuno_sal.so.3+0x783ca) namespace)::AnimationNode::fireChangeListener() animcore.cxx:? (libanimcorelo.so+0x3832f) M0 try to lock namespace)::AnimationNode::fireChangeListener() animcore.cxx:? (libanimcorelo.so+0x38814) namespace)::AnimationNode::fireChangeListener() animcore.cxx:? (libanimcorelo.so+0x38814) namespace)::AnimationNode::setParent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) animcore.cxx:? (libanimcorelo.so+0x1d514) namespace)::AnimationNode::setParent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) animcore.cxx:? (libanimcorelo.so+0x33bf2) namespace)::AnimationNode::appendChild(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> const&) animcore.cxx:? (libanimcorelo.so+0x27312) M1 locked namespace)::AnimationNode::appendChild(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> const&) animcore.cxx:? (libanimcorelo.so+0x34d29) xmloff::AnimationNodeContext::AnimationNodeContext(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> const&, SvXMLImport&, int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&, std::shared_ptr<xmloff::AnimationsImportHelperImpl> const&) animationimport.cxx:? (libxolo.so+0x338060) com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) animationimport.cxx:? (libxolo.so+0x33e010) com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) ??:? (libxolo.so+0x2ca188) com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) ??:? (libxolo.so+0x2cb106) namespace)::Event const*) fastparser.cxx:? (libexpwraplo.so+0x4731a) sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) fastparser.cxx:? (libexpwraplo.so+0x407fa) sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) ??:? (libexpwraplo.so+0x48d08) const&) ??:? (libxolo.so+0x2c7296) SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) ??:? (libxolo.so+0x2c74e2) namespace)::ReadThroughComponent(com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, char const*, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, char const*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, rtl::OUString const&, bool) sdxmlwrp.cxx:? (libsdlo.so+0x4f2088) (libsdlo.so+0x4ef8ed) #20 sd::DrawDocShell::Load(SfxMedium&) ??:? (libsdlo.so+0x5bdbeb) (libsfxlo.so+0x596b65) #22 SfxObjectShell::DoLoad(SfxMedium*) ??:? (libsfxlo.so+0x598732) SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ??:? (libsfxlo.so+0x5e5222) SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ??:? (libsfxlo.so+0x5e6135) namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) frmload.cxx:? (libsfxlo.so+0x6ca8fb) namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) frmload.cxx:? (libsfxlo.so+0x6cd749) (libfwklo.so+0x30000f) #28 framework::LoadEnv::start() loadenv.cxx:? (libfwklo.so+0x2fb828) com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) loadenv.cxx:? (libfwklo.so+0x2f98d0) framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) loadenv.cxx:? (libfwklo.so+0x2f8905) rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ??:? (libfwklo.so+0x322cbf) framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ??:? (libfwklo.so+0x322f11) rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ??:? (libunotest.so+0x13f41) Change-Id: Iecb3f5c1e553d8f4278c7caf7e81f6cb1f589e9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'animations')
-rw-r--r--animations/source/animcore/animcore.cxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index 04e7a7daa879..05b3ae010561 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -2010,22 +2010,23 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::removeChild( const Reference
// XTimeContainer
Reference< XAnimationNode > SAL_CALL AnimationNode::appendChild( const Reference< XAnimationNode >& newChild )
{
- Guard< Mutex > aGuard( m_aMutex );
-
- if( !newChild.is() )
- throw IllegalArgumentException("no child", static_cast<cppu::OWeakObject*>(this), 1);
+ Reference< XInterface > xThis( static_cast< OWeakObject * >(this) );
+ {
+ Guard< Mutex > aGuard( m_aMutex );
- if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() )
- throw ElementExistException();
+ if( !newChild.is() )
+ throw IllegalArgumentException("no child", static_cast<cppu::OWeakObject*>(this), 1);
- Reference< XInterface > xThis( static_cast< OWeakObject * >(this) );
- Reference< XInterface > xChild( newChild );
+ if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() )
+ throw ElementExistException();
- if( xThis == xChild )
- throw IllegalArgumentException("cannot append self", static_cast<cppu::OWeakObject*>(this), -1);
+ Reference< XInterface > xChild( newChild );
- maChildren.push_back( newChild );
+ if( xThis == xChild )
+ throw IllegalArgumentException("cannot append self", static_cast<cppu::OWeakObject*>(this), -1);
+ maChildren.push_back( newChild );
+ }
newChild->setParent( xThis );
return newChild;