office-gobmx/framework
Noel Grandin 92d9888e79 fix deadlock observed on jenkins
where we are locking SolarMutex and UndoManagerHelper_Impl::m_aMutex in
different orders in different code-paths, which is deadly when we call
into the same class recursively.

Thread 2 (Thread 0x7f5cf303b700 (LWP 22637)):
(this=0x7f5cf3037cd8) at include/vcl/svapp.hxx:1373
framework::UndoManagerHelper_Impl::impl_clear() (this=0x5f90d50) at
framework/source/fwe/helper/undomanagerhelper.cxx:691
  holds UndoManagerHelper_Impl::m_aMutex
  tries to acquire SolarMutex
framework::UndoManagerHelper_Impl::clear(framework::IMutexGuard&)::$_3::operator()()
const (this=0x5519040) at
framework/source/fwe/helper/undomanagerhelper.cxx:403
framework::UndoManagerHelper_Impl::clear(framework::IMutexGuard&)::$_3>::_M_invoke(std::_Any_data
const&) (__functor=...) at
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/std_function.h:316
(this=0x5519040) at
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/std_function.h:706
namespace)::UndoManagerRequest::execute() (this=0x5519030) at
framework/source/fwe/helper/undomanagerhelper.cxx:160
framework::UndoManagerHelper_Impl::impl_processRequest(std::function<void
()> const&, framework::IMutexGuard&) (this=0x5f90d50, i_request=...,
i_instanceLock=...) at
framework/source/fwe/helper/undomanagerhelper.cxx:490
framework::UndoManagerHelper_Impl::clear(framework::IMutexGuard&)
(this=0x5f90d50, i_instanceLock=...) at
framework/source/fwe/helper/undomanagerhelper.cxx:402
framework::UndoManagerHelper::clear(framework::IMutexGuard&)
(this=0x5f90c38, i_instanceLock=...) at
framework/source/fwe/helper/undomanagerhelper.cxx:999
at chart2/source/model/main/UndoManager.cxx:278
void*, _typelib_TypeDescriptionReference*, bool, unsigned long*,
unsigned int, unsigned long*, double*) (pThis=0x5f90bc8,
nVtableIndex=18, pRegisterReturn=0x0, pReturnTypeRef=0xa2dac0,
bSimpleReturn=true, pStack=0x7f5cf30380e0, nStack=0,
pGPR=0x7f5cf30383e0, pFPR=0x7f5cf30383a0) at
bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77
cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*,
bridges::cpp_uno::shared::VtableSlot,
_typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*,
void*, void**, _uno_Any**) (pThis=0x5e40ac0, aVtableSlot=...,
pReturnTypeRef=0xa2dac0, nParams=0, pParams=0x0, pUnoReturn=0x0,
pUnoArgs=0x0, ppUnoExc=0x7f5cf30388e0) at
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233
pMemberDescr=0x551dd30, pReturn=0x0, pArgs=0x0,
ppException=0x7f5cf30388e0) at
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413
binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*,
std::__debug::vector<binaryurp::BinaryAny,
std::allocator<binaryurp::BinaryAny> >*) const (this=0x28a3cc0,
returnValue=0x7f5cf3039040, outArguments=0x7f5cf3039008) at
binaryurp/source/incomingrequest.cxx:236
(this=0x28a3cc0) at binaryurp/source/incomingrequest.cxx:79

Thread 1 (Thread 0x7f5cfd03eec0 (LWP 22302)):
(this=0x7ffcdf1b1720, t=...) at include/osl/mutex.hxx:144
comphelper::OInterfaceContainerHelper3<com::sun::util::XModifyListener>::addInterface(com::sun::uno::Reference<com::sun::util::XModifyListener>
const&) (this=0x5f90da0, rListener=...) at
include/comphelper/interfacecontainer3.hxx:313
    trying to acquire UndoManagerHelper_Impl::m_aMutex
framework::UndoManagerHelper_Impl::addModifyListener(com::sun::uno::Reference<com::sun::util::XModifyListener>
const&) (this=0x5f90d50, i_listener=...) at
framework/source/fwe/helper/undomanagerhelper.cxx:286
framework::UndoManagerHelper::addModifyListener(com::sun::uno::Reference<com::sun::util::XModifyListener>
const&) (this=0x5f90c38, i_listener=...) at
framework/source/fwe/helper/undomanagerhelper.cxx:1047
chart::UndoManager::addModifyListener(com::sun::uno::Reference<com::sun::util::XModifyListener>
const&) (this=0x5f90bc0, i_listener=...) at
chart2/source/model/main/UndoManager.cxx:338
(this=0x1d470d0) at
chart2/source/controller/main/UndoCommandDispatch.cxx:57
chart::CommandDispatchContainer::getDispatchForURL(com::sun::util::URL
const&) (this=0x5f66e58, rURL=...) at
chart2/source/controller/main/CommandDispatchContainer.cxx:93
chart::ChartController::queryDispatch(com::sun::util::URL const&,
rtl::OUString const&, int) (this=0x5f66c50, rURL=...,
rTargetFrameName=...) at
chart2/source/controller/main/ChartController.cxx:1055
    locks SolarMutex
chart::ChartController::queryDispatch(com::sun::util::URL const&,
rtl::OUString const&, int) () at
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/../program/libchartcontrollerlo.so
framework::DispatchProvider::implts_queryFrameDispatch(com::sun::uno::Reference<com::sun::frame::XFrame>
const&, com::sun::util::URL const&, rtl::OUString const&, int)
(this=0x5f5e6c0, xFrame=..., aURL=..., sTargetFrameName=...,
nSearchFlags=0) at framework/source/dispatch/dispatchprovider.cxx:352
framework::DispatchProvider::queryDispatch(com::sun::util::URL
const&, rtl::OUString const&, int) (this=0x5f5e6c0, aURL=...,
sTargetFrameName=..., nSearchFlags=0) at
framework/source/dispatch/dispatchprovider.cxx:106
framework::DispatchProvider::queryDispatch(com::sun::util::URL
const&, rtl::OUString const&, int) () at
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/libfwklo.so
framework::InterceptionHelper::queryDispatch(com::sun::util::URL
const&, rtl::OUString const&, int) (this=0x5f59ce0, aURL=...,
sTargetFrameName=..., nSearchFlags=0) at
framework/source/dispatch/interceptionhelper.cxx:87
framework::InterceptionHelper::queryDispatch(com::sun::util::URL
const&, rtl::OUString const&, int) () at
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/libfwklo.so
namespace)::XFrameImpl::queryDispatch(com::sun::util::URL const&,
rtl::OUString const&, int) (this=0x5f599c0, aURL=...,
sTargetFrameName=..., nSearchFlags=0) at
framework/source/services/frame.cxx:2329
namespace)::XFrameImpl::queryDispatch(com::sun::util::URL const&,
rtl::OUString const&, int) () at
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/instdir/program/libfwklo.so
(this=0x5fe8b00) at svtools/source/uno/toolboxcontroller.cxx:520
(this=0x5fe8b00) at svtools/source/uno/toolboxcontroller.cxx:242
(this=0x5fdd060) at framework/source/uielement/toolbarmanager.cxx:731
framework::ToolBarManager::AsyncUpdateControllersHdl(Timer*)
(this=0x5fdd060) at framework/source/uielement/toolbarmanager.cxx:2298
framework::ToolBarManager::LinkStubAsyncUpdateControllersHdl(void*,
Timer*) (instance=0x5fdd060, data=0x5fdd258) at
framework/source/uielement/toolbarmanager.cxx:2285
(this=0x5fdd278, data=0x5fdd258) at include/tools/link.hxx:111
vcl/source/app/timer.cxx:75
vcl/source/app/scheduler.cxx:474
vcl/inc/saltimer.hxx:54
(this=0xa1ab10, bExecuteTimers=true) at vcl/headless/svpinst.cxx:161

Change-Id: I1971d094513cc747eff44db8e2a131ad0aae1506
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145316
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-11 12:25:23 +00:00
..
dtd dtd files are not xml files and shouldn't have xml headers 2021-06-09 12:41:53 +02:00
inc Revert all the recent loplugin:unocast changes 2023-01-05 11:45:51 +00:00
qa CppunitTest_framework_services: inherit from UnoApiTest 2022-11-22 14:52:43 +01:00
source fix deadlock observed on jenkins 2023-01-11 12:25:23 +00:00
uiconfig/startmodule/menubar Align macro menu in start center with other places 2022-05-01 09:58:08 +02:00
util WASM --enable-wasm-strip now skips lots of LO code 2022-01-20 12:28:54 +01:00
AllLangMoTarget_fwk.mk migrate to boost::gettext 2017-07-21 08:20:50 +01:00
CppunitTest_framework_dispatch.mk CppunitTest_framework_dispatch: inherit from UnoApiTest 2022-11-22 13:24:58 +01:00
CppunitTest_framework_loadenv.mk CppunitTest_framework_loadenv: inherit from UnoApiTest 2022-11-22 14:32:40 +01:00
CppunitTest_framework_services.mk CppunitTest_framework_services: inherit from UnoApiTest 2022-11-22 14:52:43 +01:00
IwyuFilter_framework.yaml tdf#42949 Fix new IWYU warnings in directories [e-f]* 2020-11-12 10:53:07 +01:00
JunitTest_framework_complex.mk Remove java mouse/keyboard event tests 2019-05-13 09:19:51 +02:00
JunitTest_framework_unoapi.mk Simplify and fix Java UNO API test makefiles 2018-11-09 07:37:00 +01:00
Library_fwk.mk WASM --enable-wasm-strip now skips lots of LO code 2022-01-20 12:28:54 +01:00
Makefile switch to include-based build rather than sourced-based build 2012-02-05 19:34:05 -06:00
Module_framework.mk tdf#137356 framework: fix opening the same document twice for long loads 2020-10-14 18:41:26 +02:00
Package_dtd.mk gbuild: set Package default target to INSTDIR 2013-10-28 20:17:26 +01:00
README.md Updated README.md files to represent current code / use Markdown format 2021-04-07 17:47:16 +02:00
UIConfig_startmodule.mk translation domain of sfx for .ui in framework doesn't look right 2021-04-06 21:28:35 +02:00

UNO Framework

Toolbars, menus, UNO stuff, including accelerators and interaction, etc.

See Also

http://wiki.openoffice.org/wiki/Framework