Skip to content

Commit

Permalink
lo_dumpState doesn't take the SolarMutex, so dbgutil state dumping ca…
Browse files Browse the repository at this point in the history
…n assert

so disable the SolarMutex checks during dumpState and restore afterwards

	#8  0x00007fa179e287f3 in abort () at /lib/x86_64-linux-gnu/libc.so.6
	#9  0x00007fa179e2871b in  () at /lib/x86_64-linux-gnu/libc.so.6
	#10 0x00007fa179e39e96 in  () at /lib/x86_64-linux-gnu/libc.so.6
	#11 0x00007fa1706904de in ImplDbgTestSolarMutex() () at libreoffice/vcl/source/app/dbggui.cxx:35
		__PRETTY_FUNCTION__ = "void ImplDbgTestSolarMutex()"
	#12 0x00007fa1782cb713 in DbgTestSolarMutex() () at libreoffice/tools/source/debug/debug.cxx:54
	#13 0x00007fa170559ebb in VirtualDevice::AcquireGraphics() const (this=0x5589006636b0) at libreoffice/vcl/source/gdi/virdev.cxx:49
		pSVData = 0x7fff8a2386d0
	#14 0x00007fa17020d849 in OutputDevice::DrawRect(tools::Rectangle const&) (this=0x5589006636b0, rRect=...) at libreoffice/vcl/source/outdev/rect.cxx:67
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawRect(const tools::Rectangle&)"
		aRect = {static RECT_EMPTY = -32767, mnLeft = 0, mnTop = 0, mnRight = 10244, mnBottom = 269}
	#15 0x00007fa17021d997 in OutputDevice::DrawColorWallpaper(long, long, long, long, Wallpaper const&) (this=0x5589006636b0, nX=0, nY=0, nWidth=10245, nHeight=270, rWallpaper=...) at libreoffice/vcl/source/outdev/wallpaper.cxx:90
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawColorWallpaper(tools::Long, tools::Long, tools::Long, tools::Long, const Wallpaper&)"
		aOldLineColor = {{mValue = 0, {B = 0 '\000', G = 0 '\000', R = 0 '\000', T = 0 '\000'}}}
		aOldFillColor = {{mValue = 16777215, {B = 255 '\377', G = 255 '\377', R = 255 '\377', T = 0 '\000'}}}
		bMap = false
	#16 0x00007fa17021d851 in OutputDevice::DrawWallpaper(long, long, long, long, Wallpaper const&) (this=0x5589006636b0, nX=0, nY=0, nWidth=10245, nHeight=270, rWallpaper=...) at libreoffice/vcl/source/outdev/wallpaper.cxx:73
		__PRETTY_FUNCTION__ = "void OutputDevice::DrawWallpaper(tools::Long, tools::Long, tools::Long, tools::Long, const Wallpaper&)"
	#17 0x00007fa17021daa8 in OutputDevice::Erase() (this=0x5589006636b0) at libreoffice/vcl/source/outdev/wallpaper.cxx:106
		eRasterOp = RasterOp::OverPaint
	#18 0x00007fa17055c716 in VirtualDevice::InnerImplSetOutputSizePixel(Size const&, bool, unsigned char*) (this=0x5589006636b0, rNewSize=..., bErase=true, pBuffer=0x0) at libreoffice/vcl/source/gdi/virdev.cxx:292
		bRet = true
		nNewWidth = 10245
		nNewHeight = 270
		__PRETTY_FUNCTION__ = "bool VirtualDevice::InnerImplSetOutputSizePixel(const Size&, bool, sal_uInt8*)"
	#19 0x00007fa17055cbf5 in VirtualDevice::ImplSetOutputSizePixel(Size const&, bool, unsigned char*) (this=0x5589006636b0, rNewSize=..., bErase=true, pBuffer=0x0) at libreoffice/vcl/source/gdi/virdev.cxx:360
	#20 0x00007fa17055ceba in VirtualDevice::SetOutputSizePixel(Size const&, bool) (this=0x5589006636b0, rNewSize=..., bErase=true) at libreoffice/vcl/source/gdi/virdev.cxx:408
	#21 0x00007fa16fea3ca4 in VirtualDevice::SetOutputSize(Size const&) (this=0x5589006636b0, rNewSize=...) at libreoffice/include/vcl/virdev.hxx:163
	#22 0x00007fa16fe96388 in VclDrawingArea::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fe9ba320, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:3092
		pDevice = {<ScopedVclPtr<VirtualDevice>> = {<VclPtr<VirtualDevice>> = {m_rInnerRef = {m_pBody = 0x5589006636b0}}, <No data fields>}, <No data fields>}
		pRefDevice = 0x5588ff474fd0
		aRenderSize = {<Pair> = {mnA = 10245, mnB = 270}, <No data fields>}
		aOutputSize = {<Pair> = {mnA = 683, mnB = 18}, <No data fields>}
		aRect = {static RECT_EMPTY = -32767, mnLeft = 140735510973440, mnTop = 140331342376707, mnRight = 140735510973456, mnBottom = 94046886702440}
		aImage = {maBitmap = {_vptr.Bitmap = 0x7fff8a238c20, mxSalBmp = std::shared_ptr<class SalBitmap> (empty) = {get() = 0x7fa16fd029cc <std::__uniq_ptr_impl<WindowImpl, std::default_delete<WindowImpl> >::_M_ptr() const+28>}, maPrefMapMode = {mpImplMapMode = {m_pimpl = 0x7fff8a238d60}}, maPrefSize = {<Pair> = {mnA = 94046793857224, mnB = 140331516265348}, <No data fields>}}, maAlphaMask = {_vptr.Bitmap = 0x0, mxSalBmp = std::shared_ptr<class SalBitmap> (use count 1875914999, weak count 32672) = {get() = 0x5588ff46fa98}, maPrefMapMode = {mpImplMapMode = {m_pimpl = 0x7fa16fd030f7 <std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> >::_M_head(std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> > const&)+28>}}, maPrefSize = {<Pair> = {mnA = 94046793857224, mnB = 94046886754968}, <No data fields>}}, maBitmapSize = {<Pair> = {mnA = 140735510973568, mnB = 140331342377207}, <No data fields>}}
		aOStm = {<SvStream> = {_vptr.SvStream = 0x2ab, m_xLockBytes = {pObj = 0x12}, m_nActPos = 140735510973600, m_pRWBuf = std::unique_ptr<unsigned char []> = {get() = 0x7fa16fd03026 <std::__get_helper<0ul, WindowImpl*, std::default_delete<WindowImpl> >(std::_Tuple_impl<0ul, WindowImpl*, std::default_delete<WindowImpl> > const&)+28> "\311\303\363\017\036\372UH\211\345H\203\354\020H\211}\370H\213E\370H\211\307", <incomplete sequence \350\265>}, m_pBufPos = 0x7fff8a238cb0 "\340\214#\212\024", m_nBufSize = 64152, m_nBufActualLen = 65350, m_nBufActualPos = 21896, m_nBufFree = 0, m_isIoRead = 192, m_isIoWrite = 140, m_isDirty = 35, m_isSwap = 138, m_isEof = 255, m_nError = {m_value = 1875914499}, m_nCompressMode = (SvStreamCompressFlags::ZBITMAP | unknown: 0x7fa0), m_eLineDelimiter = (unknown: 0x8a238ce0), m_eStreamCharSet = 20, m_aCryptMaskKey = {pData = 0x5588ff46fa98}, m_nCryptMask = 224 '\340', m_nVersion = 16, m_nBufFilePos = 140735510975776, m_eStreamMode = 2317587744, m_isWritable = 255}, nSize = 140735510973776, nResize = 28087389472, nPos = 140735510975776, nEndOfData = 140735510975776, pBuf = 0x7fff8a238d58 " \225#\212\377\177", bOwnsData = 32}
	#23 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fa90, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -12124904
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fe9ba320
		pAccLabelFor = 0x7fff8a238de0
		pAccLabelledBy = 0x68a238db0
	#24 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fa90, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#25 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff46fd10, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -12221224
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff46fa90
		pAccLabelFor = 0x7fff8a238e58
		pAccLabelledBy = 0x7fff8a238e20
	#26 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff462d60, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = -1
		nTop = -1
		nWidth = 1
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff46fd10
		pAccLabelFor = 0x5588ff458838
		pAccLabelledBy = 0x7fff8a238e90
	#27 0x00007fa16fe8fecd in VclScrolledWindow::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff462d60, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:2184
	#28 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff458830, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -12220472
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff462d60
		pAccLabelFor = 0x7fff8a238fb0
		pAccLabelledBy = 0x68a238f80
	#29 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff458830, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#30 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff4587c0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -18974136
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff458830
		pAccLabelFor = 0x7fff8a239040
		pAccLabelledBy = 0x68a239010
	#31 0x00007fa16fe8becd in VclGrid::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff4587c0, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:1406
	#32 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fede7a40, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 20
		nTop = -22893640
		nWidth = 21896
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff4587c0
		pAccLabelFor = 0x7fff8a2390d0
		pAccLabelledBy = 0x68a2390a0
	#33 0x00007fa16fe86709 in VclBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fede7a40, rJsonWriter=...) at libreoffice/vcl/source/window/layout.cxx:398
	#34 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fea2abb0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977380544
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fede7a40
		pAccLabelFor = 0x7fff8a239148
		pAccLabelledBy = 0x7fff8a239110
	#35 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588feddd8a0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 0
		nTop = 2049803913
		nWidth = 32673
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fea2abb0
		pAccLabelFor = 0x7fa16fcdc774 <__gnu_debug::_Safe_sequence_base::~_Safe_sequence_base()+28>
		pAccLabelledBy = 0x0
	#36 0x00007fa16ff6e15e in ToolBox::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588feddd8a0, rJsonWriter=...) at libreoffice/vcl/source/window/toolbox2.cxx:1713
		childrenNode = {mrWriter = @0x7fa16fd6409c}
	#37 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fee04430, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = -1
		nTop = -1
		nWidth = 1
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588feddd8a0
		pAccLabelFor = 0x7fff8a2393c8
		pAccLabelledBy = 0x7fff8a239390
	#38 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588ff2738a0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977379792
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fee04430
		pAccLabelFor = 0x7fff8a239438
		pAccLabelledBy = 0x7fff8a239400
	#39 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fedbafd0, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 32767
		nTop = -1977379680
		nWidth = 32767
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588ff2738a0
		pAccLabelFor = 0x7fff8a2394a8
		pAccLabelledBy = 0x7fff8a239470
	#40 0x00007fa16ffbcaba in vcl::Window::DumpAsPropertyTree(tools::JsonWriter&) (this=0x5588fedc2d50, rJsonWriter=...) at libreoffice/vcl/source/window/window.cxx:3388
		childNode = {mrWriter = @0x7fff8a239520}
		nLeft = 21896
		nTop = 2045399353
		nWidth = 32673
		childrenNode = {mrWriter = @0x7fff8a239520}
		pChild = 0x5588fedbafd0
		pAccLabelFor = 0x7fff8a239520
		pAccLabelledBy = 0x7fff8a2394e0
	#41 0x00007fa170764efa in vcl::lok::dumpState(rtl::OStringBuffer&) (rState=...) at libreoffice/vcl/source/app/svapp.cxx:1868
		props = {mpBuffer = 0x5588ff911780 "{ \"id\": \"\", \"type\": \"borderwindow\", \"text\": \"hello-world.ods - Collabora OfficeDev Calc 23.05 [ebacfb1]\", \"enabled\": true, \"children\": [ { \"id\": \"\", \"type\": \"workwindo"..., mPos = 0x5588ff912c3c "", mSpaceAllocated = 8244, mStartNodeCount = 24, mbFirstFieldInNode = false, static JSON_WRITER_DEBUG_MARKER = 222 '\336'}
		pSVData = 0x7fa171f3aea0 <rtl::Static<ImplSVData, (anonymous namespace)::private_aImplSVData>::get()::instance>
		pWin = 0x5588fedc2d50
	#42 0x00007fa179b08219 in desktop::LibLibreOffice_Impl::dumpState(rtl::OStringBuffer&) (this=0x5588fa5a7710, rState=...) at libreoffice/desktop/source/lib/init.cxx:5105
	#43 0x00007fa179b08002 in lo_dumpState(LibreOfficeKit*, char const*, char**) (pThis=0x5588fa5a7710, pState=0x7fff8a239630) at libreoffice/desktop/source/lib/init.cxx:5086
		aState = {pData = 0x5588ffa27670, nCapacity = 1048576}
		pLib = 0x5588fa5a7710
		aStr = {pData = 0x5588ff9bfd30}
	#44 0x00005588f9b2e947 in lok::Office::dumpState(char const*, char**) (pState=0x7fff8a239630, pOption=0x5588f9bd5e4d "", this=<optimized out>) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:1149
		pState = 0x0

Change-Id: Icc5910238656566479ea0796c25779866ff8ec7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162794
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Michael Meeks <[email protected]>
  • Loading branch information
caolanm authored and mmeeks committed Jan 31, 2024
1 parent 05a47aa commit f4fa41c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vcl/source/app/svapp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include <vcl/scheduler.hxx>
#include <vcl/skia/SkiaHelper.hxx>

#include <dbggui.hxx>
#include <salinst.hxx>
#include <graphic/Manager.hxx>
#include <salframe.hxx>
Expand Down Expand Up @@ -1858,6 +1859,12 @@ void dumpState(rtl::OStringBuffer &rState)
if (!pSVData)
return;

#ifndef NDEBUG
// lo_dumpState deliberately doesn't take SolarMutexGuard
// so disable these checks during dumpState
DbgGUIDeInitSolarMutexCheck();
#endif

rState.append("\nWindows:\t");
rState.append(static_cast<sal_Int32>(Application::GetTopWindowCount()));

Expand All @@ -1876,6 +1883,10 @@ void dumpState(rtl::OStringBuffer &rState)
vcl::graphic::Manager::get().dumpState(rState);

pSVData->dumpState(rState);

#ifndef NDEBUG
DbgGUIInitSolarMutexCheck();
#endif
}

void trimMemory(int nTarget)
Expand Down

0 comments on commit f4fa41c

Please sign in to comment.