[Libreoffice-bugs] [Bug 122871] soffice process hanging on exit (mutex related)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Jul 23 16:00:39 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=122871

--- Comment #6 from Stephan Bergmann <sbergman at redhat.com> ---
(In reply to Robert Nagy from comment #0)
> Description:
> There has been a bug that has been annoying me for some time now.
> Whenever exiting the soffice UI the UI closes, but then the soffice process
> is lurking around in sleep mode, probably waiting for on a mutex.
> 
> On exit Desktop::DeInit() is called which calls RequestHandler::Disable() for
> and the process gets stuck in there.
> 
> #1  0x0000014efd92ef6b in _sem_wait (sem=0x14f122f1240, can_eintr=0,
> abstime=0x0, delayed_cancel=0x14efeb676d0 <_initial_thread+200>) at
> /usr/src/lib/librthread/synch.h:41
> #2  0x0000014efd9301fb in pthread_join (thread=0x14f122f1240, retval=0x0) at
> /usr/src/lib/librthread/rthread.c:304
> #3  0x0000014ec411b345 in desktop::RequestHandler::Disable() () from
> /usr/local/lib/libreoffice/program/libsofficeapp.so
> #4  0x0000014ec40ee26b in desktop::Desktop::DeInit() () from
> /usr/local/lib/libreoffice/program/libsofficeapp.so
> #5  0x0000014eaafc1c05 in DeInitVCL() () from
> /usr/local/lib/libreoffice/program/libvcllo.so
> #6  0x0000014eaafc1310 in ImplSVMain() () from
> /usr/local/lib/libreoffice/program/libvcllo.so
> #7  0x0000014eaafc26d3 in SVMain() () from
> /usr/local/lib/libreoffice/program/libvcllo.so
> #8  0x0000014ec41200c1 in soffice_main () from
> /usr/local/lib/libreoffice/program/libsofficeapp.so
> #9  0x0000014c56927331 in main ()

The relevant part is why the thread running PipeIpcThread::execute
(desktop/source/app/officeipcthread.cxx) does not finish.  Better provide a
backtrace of all threads still running when soffice.bin gets stuck for you.

> In the Desktop::Init() function ::Disable is only called on some specific
> process types and doing the same in ::DeInit fixes the issue for me.

Those two calls to RequestHandler::Disable from Desktop::Init and
Desktop::DeInit are not meant to be symmetric.  For a "normal" invocation of
soffice, your patch will just fail to join any still-running PipeIpcThread
(which can have bad consequences of its own); it does not address the root
issue why that pthread_join blocks for you.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200723/a7c5ffe5/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list