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

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Jan 22 08:40:29 UTC 2019


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

            Bug ID: 122871
           Summary: soffice process hanging on exit (mutex related)
           Product: LibreOffice
           Version: 6.1.4.2 release
          Hardware: All
                OS: OpenBSD
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: framework
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: robert at openbsd.org

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 ()

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.
I don't know if this is the right way but here is the patch that I am
running with now:

--- desktop/source/app/app.cxx.orig
+++ desktop/source/app/app.cxx
@@ -551,6 +551,7 @@ void Desktop::InitFinished()

 void Desktop::DeInit()
 {
+    const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();                
     try {
         // instead of removing of the configManager just let it commit all the
changes                              
         utl::ConfigManager::storeConfigItems();
@@ -567,7 +568,9 @@ void Desktop::DeInit()
         // clear lockfile
         m_xLockfile.reset();

-        RequestHandler::Disable();
+        if ( !rCmdLineArgs.GetUnknown().isEmpty()
+                  || rCmdLineArgs.IsHelp() || rCmdLineArgs.IsVersion() )       
+            RequestHandler::Disable();
         if( pSignalHandler )
             osl_removeSignalHandler( pSignalHandler );
     } catch (const RuntimeException&) {


Steps to Reproduce:
1. Exit LibreOffice on OpenBSD
2.
3.

Actual Results:
Process hangs.

Expected Results:
Process should exit.


Reproducible: Always


User Profile Reset: No



Additional Info:

-- 
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/20190122/a2ea04c4/attachment.html>


More information about the Libreoffice-bugs mailing list