Bug 118573 - Process Soffice.bin does not stop at x64 Windows shutdown/logoff when Quickstarter is used from LO 6.0
Summary: Process Soffice.bin does not stop at x64 Windows shutdown/logoff when Quickst...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.0.5.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.2.0 target:6.1.4
Keywords: bibisectRequest, regression
: 118744 119550 (view as bug list)
Depends on:
Blocks: 109085 Quickstarter
  Show dependency treegraph
 
Reported: 2018-07-06 11:23 UTC by Bruno MONDIN
Modified: 2018-11-06 08:59 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
DDE Server Windows soffice.bin (42.29 KB, image/png)
2018-07-06 11:30 UTC, Bruno MONDIN
Details
two different error message during logoff soffice.bin / dde server (683.90 KB, application/pdf)
2018-10-30 08:18 UTC, Oliver Brinzing
Details
crashdump / windbg 1 (5.29 KB, text/plain)
2018-11-04 16:26 UTC, Oliver Brinzing
Details
crashdump / windbg 2 (5.29 KB, text/plain)
2018-11-04 16:27 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno MONDIN 2018-07-06 11:23:51 UTC
Description:
Configuration :
PC on Windows 7 version.
LibreOffice 6.0.5.2 (same thing with old release of 6.0.x)

When I close my Windows session, I have a popup with soffice.exe closing error.
The Windows system must force the closing of the process.

Steps to Reproduce:
1. Have the quick start active
2. Close the windows session
3. Popup with soffice.exe error that does not close

Actual Results:
Crash soffice.exe

Expected Results:
clean closure of the process


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Comment 1 Bruno MONDIN 2018-07-06 11:30:45 UTC
Created attachment 143345 [details]
DDE Server Windows soffice.bin
Comment 2 Bruno MONDIN 2018-07-06 11:34:06 UTC
It's soffice.bin and not soffice.exe.
See error in attachement.
Regards
Comment 3 Joao Farias 2018-08-07 21:05:42 UTC
Probably related to Bug 118744
Comment 4 Bruno MONDIN 2018-08-08 05:56:54 UTC Comment hidden (obsolete)
Comment 5 Tom Williams 2018-08-08 13:39:35 UTC
I recently installed LibreOffice 6.0.6 on a new Windows 10 system and haven't seen this misbehavior.  I wonder if this has been fixed in that version.  I'll update one of the other systems, on which I experience the issue, and will report back my findings here.
Comment 6 Tom Williams 2018-08-08 14:48:48 UTC
I just tried LibreOffice 6.0.6.2, on Windows 7, and get the same crash.  I upgraded from LibreOffice 6.0.5 to LibreOffice 6.0.6.
Comment 7 Bruno MONDIN 2018-08-09 11:35:24 UTC
I confirm.
On Windows 7 Pro, I upgraded from LibreOffice 6.0.5 to LibreOffice 6.0.6.
I have the same Popup error with soffice.bin when i close my Windows session.
Comment 8 Buovjaga 2018-08-11 07:29:31 UTC
*** Bug 118744 has been marked as a duplicate of this bug. ***
Comment 9 Oliver Brinzing 2018-10-26 05:47:22 UTC
we have same problem with LO 6.1.3.1 (Windows Server 2008)
Comment 10 Oliver Brinzing 2018-10-30 08:18:15 UTC
Created attachment 146160 [details]
two different error message during logoff soffice.bin / dde server

adding two different error messages we get during logoff
with LO 6.1.3.1 x64 (Windows Server 2008)
Comment 11 Timur 2018-10-30 10:08:23 UTC
*** Bug 119550 has been marked as a duplicate of this bug. ***
Comment 12 Timur 2018-10-30 10:10:53 UTC
So far, we have reports this is only with Win7-x64 starting from LO 6.
Comment 13 Roger 2018-10-30 14:53:23 UTC
Bug 119550 was rolled into this one. 
However, Bug 119550 was marked as: IMPORTANCE HIGH MAJOR !!!

Additionally, I will add again here my notes on reproducibility:

----------

Description:
During Win7 system shutdown attempts I get a popup about 90% of the time:

soffice.bin - Application Error
The exception unknown software exception (0x40000015)
occurred in the application at location 0xe689eacf.
Click on OK to terminate the program

This popup prevents the system from shutting down. :(
It has been like this for perhpas almost a year through several version upgrades.

LibreOffice 6.1.0.3 on Windows 7 Professional 64-bit.
Running QuickStart.exe on startup.

Steps to Reproduce:
1. Enable QuickStart.exe
2. Reboot system.
3. Shutdown System.

Actual Results:
soffice.bin - Application Error
Get blocking dialog popup:

The exception unknown software exception (0x40000015)
occurred in the application at location 0xe689eacf.
Click on OK to terminate the program

This popup prevents the system from shutting down. :(

Expected Results:
It should have shut down and allowed system to shutdown.

Reproducible: Sometimes

User Profile Reset: No

OpenGL enabled: Yes

Additional Info:
Version: 6.1.0.3 (x64)
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Locale: en-US (en_US); Calc: group threaded

----------

AND OTHERS:

----------

Reproduced in 2 places (Windows 7 x64)

Version: 6.0.6.2 (x64)
Build ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77

----------

Reproduced with 6.0.4

Version: 6.0.4.2 (x64)
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf

----------

Reproduced with 6.0.0.0.alpha1

Version: 6.0.0.0.alpha1 (x64)
Build ID: c1d1f859b268f650143d48f294999cda0fa57350
CPU threads: 2; ОС:Windows 6.1; UI render: default;
Comment 14 Roger 2018-10-30 14:54:28 UTC
On Bug 119550 StefanU noted on Windows 10 also:

In companies with Windows workstations this is a show-stopper. The quick starter is mandatory there, so that one has a similar fast start behavior of LO as with MSO. Otherwise the acceptance is not given. If then also still every time an error message pops up during the shutdown, which prevents shutdown and then there also still stands that LO causes that... .

I can reproduce this on different Win7 and Win10 PCs, currently with LO 6.1.2.1 (x864).
Of course, I also come to this result if a document is open during shutdown. Sure, then soffice.bin is also started.

Therefore I cannot switch about 200 workstation PCs to 6.x. We still use 5.3.7 there.
Comment 15 Timur 2018-10-30 16:38:40 UTC
There's a fix in Bug 120928 for LO 6.0.7 and 6.1.4. Please test when they are finally out.
Comment 16 Roger 2018-11-02 15:06:23 UTC
This is reported not fixed by #120928

Given the significance of this crash bug, as reported here and on #119550 (marked as High/Major), can we please get this priority raised?
Comment 17 Oliver Brinzing 2018-11-04 16:26:37 UTC
Created attachment 146297 [details]
crashdump / windbg 1
Comment 18 Oliver Brinzing 2018-11-04 16:27:06 UTC
Created attachment 146298 [details]
crashdump / windbg 2
Comment 19 Oliver Brinzing 2018-11-04 16:28:40 UTC
added two crashdumps created with "procdump soffice.bin" at the time the error message was displayed during shutdown.
Comment 20 Oliver Brinzing 2018-11-04 16:32:08 UTC
and this is a debug output from vs2017 remote connected to a win7 vm during shutdown:

Der Thread 0x5e8 hat mit Code 0 (0x0) geendet.
Ausnahme ausgelöst bei 0x000007FEFCFCBDED in soffice.bin: Microsoft C++-Ausnahme: com::sun::star::lang::IllegalArgumentException bei Speicherort 0x00000000009FD428.
Der Thread 0x9c0 hat mit Code 0 (0x0) geendet.
Der Thread 0x5ac hat mit Code 3 (0x3) geendet.
Der Thread 0x564 hat mit Code 3 (0x3) geendet.
Der Thread 0x20c hat mit Code 3 (0x3) geendet.
Der Thread 0x2ac hat mit Code 3 (0x3) geendet.
Der Thread 0x4a4 hat mit Code 3 (0x3) geendet.
Der Thread 0xb78 hat mit Code 3 (0x3) geendet.
Der Thread 0x3d4 hat mit Code 3 (0x3) geendet.
warn:unotools.config:348:384:unotools/source/config/configmgr.cxx:175: ConfigManager not emptyDas Programm "[348] soffice.bin" wurde mit Code -1 (0xffffffff) beendet.
Comment 21 Oliver Brinzing 2018-11-04 18:58:54 UTC
seem to be possible to simulate a shutdown using

rmlogotest.exe (C:\Program Files (x86)\Windows Kits\10\App Certification Kit)

https://superuser.com/questions/959364/on-windows-how-can-i-gracefully-ask-a-running-program-to-terminate#1154058

- start "quickstart.exe"
- get "soffice.bin" PID form taskmanager 
- rmlogotest.exe <pid>
- crash
Comment 22 Mike Kaganski 2018-11-05 07:49:24 UTC
The call stack at the crash (reproduced following the hint from comment 21):

> ucrtbased.dll!issue_debug_notification(const wchar_t * const message) Line 28
> 	at minkernel\crts\ucrt\src\appcrt\internal\report_runtime_error.cpp(28)
> ucrtbased.dll!__acrt_report_runtime_error(const wchar_t * message) Line 154
> 	at minkernel\crts\ucrt\src\appcrt\internal\report_runtime_error.cpp(154)
> ucrtbased.dll!abort() Line 61
> 	at minkernel\crts\ucrt\src\appcrt\startup\abort.cpp(61)
> comphelper.dll!comphelper::SolarMutex::doRelease(bool bUnlockAll) Line 65
> 	at c:\lo\src\core\comphelper\source\misc\solarmutex.cxx(65)
> vclplug_winlo.dll!SalYieldMutex::doRelease(bool bUnlockAll) Line 168
> 	at c:\lo\src\core\vcl\win\app\salinst.cxx(168)
> comphelper.dll!comphelper::SolarMutex::release(bool bUnlockAll) Line 89
> 	at c:\lo\src\core\include\comphelper\solarmutex.hxx(89)
> vcllo.dll!SalInstance::ReleaseYieldMutexAll() Line 100
> 	at c:\lo\src\core\vcl\source\app\salvtables.cxx(100)
> vcllo.dll!Application::ReleaseSolarMutex() Line 530
> 	at c:\lo\src\core\vcl\source\app\svapp.cxx(530)
> vclplug_winlo.dll!SolarMutexReleaser::SolarMutexReleaser() Line 1470
> 	at c:\lo\src\core\include\vcl\svapp.hxx(1470)
> vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 498
> 	at c:\lo\src\core\vcl\win\app\salinst.cxx(498)
> vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 438
> 	at c:\lo\src\core\vcl\source\app\svapp.cxx(438)
> vcllo.dll!Application::Reschedule(bool i_bAllEvents) Line 452
> 	at c:\lo\src\core\vcl\source\app\svapp.cxx(452)
> vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5689
> 	at c:\lo\src\core\vcl\win\window\salframe.cxx(5689)
> vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5828
> 	at c:\lo\src\core\vcl\win\window\salframe.cxx(5828)
> user32.dll!UserCallWinProcCheckWow()
> user32.dll!CallWindowProcW()
> opengl32.dll!wglWndProc()
> user32.dll!UserCallWinProcCheckWow()
> user32.dll!DispatchClientMessage()
> user32.dll!__fnDWORD()
> ntdll.dll!KiUserCallbackDispatcherContinue()
> win32u.dll!NtUserGetMessage()
> user32.dll!GetMessageW()
> vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 474
> 	at c:\lo\src\core\vcl\win\app\salinst.cxx(474)
> vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 512
> 	at c:\lo\src\core\vcl\win\app\salinst.cxx(512)
> vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 438
> 	at c:\lo\src\core\vcl\source\app\svapp.cxx(438)
> vcllo.dll!Application::Yield() Line 503
> 	at c:\lo\src\core\vcl\source\app\svapp.cxx(503)
> vcllo.dll!Application::Execute() Line 419
> 	at c:\lo\src\core\vcl\source\app\svapp.cxx(419)
> sofficeapp.dll!desktop::Desktop::Main() Line 1636
> 	at c:\lo\src\core\desktop\source\app\app.cxx(1636)
> vcllo.dll!ImplSVMain() Line 199
> 	at c:\lo\src\core\vcl\source\app\svmain.cxx(199)
> vcllo.dll!SVMain() Line 234
> 	at c:\lo\src\core\vcl\source\app\svmain.cxx(234)
> sofficeapp.dll!soffice_main() Line 169
> 	at c:\lo\src\core\desktop\source\app\sofficemain.cxx(169)
> soffice.bin!sal_main() Line 48
> 	at c:\lo\src\core\desktop\source\app\main.c(48)
> soffice.bin!main(int argc, char * * argv) Line 47
> 	at c:\lo\src\core\desktop\source\app\main.c(47)
> soffice.bin!WinMain(void * _hinst, void * _dummy, char * _cmdline, int _nshow) Line 47
> 	at c:\lo\src\core\desktop\source\app\main.c(47)
> soffice.bin!invoke_main() Line 107
> 	at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(107)
> soffice.bin!__scrt_common_main_seh() Line 288
> 	at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(288)
> soffice.bin!__scrt_common_main() Line 331
> 	at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(331)
> soffice.bin!WinMainCRTStartup() Line 17
> 	at f:\dd\vctools\crt\vcstartup\src\startup\exe_winmain.cpp(17)
> kernel32.dll!BaseThreadInitThunk()
> ntdll.dll!RtlUserThreadStart()

This is about releasing unacquired solar mutex in Application::Reschedule called from WM_QUERYENDSESSION handler.

Jan, could you please take a look at this?
Comment 23 Mike Kaganski 2018-11-05 08:06:43 UTC
A candidate patch: https://gerrit.libreoffice.org/62873
Comment 24 Commit Notification 2018-11-05 12:26:43 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/212ea275f21251903e449ba5a6b7c4fc2dc57642%5E%21

tdf#118573: Acquire solar mutex when calling Application::Reschedule

It will be available in 6.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 25 Oliver Brinzing 2018-11-05 17:26:15 UTC
seems to be fixed, no crash with:

Version: 6.2.0.0.alpha1+ (x64)
Build ID: 15aee54bb56982d57c27234a4ae946b45354c310
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
Locale: de-DE (de_DE); Calc: threaded

debug output:

Ausnahme ausgelöst bei 0x000007FEFDA5BDED in soffice.bin: Microsoft C++-Ausnahme: com::sun::star::lang::IllegalArgumentException bei Speicherort 0x0000000000A9DA88.
Der Thread 0x5d0 hat mit Code 0 (0x0) geendet.
Der Thread 0x818 hat mit Code 0 (0x0) geendet.
Ausnahme ausgelöst bei 0x000007FEFDA5BDED in soffice.bin: Microsoft C++-Ausnahme: com::sun::star::lang::IllegalArgumentException bei Speicherort 0x0000000000A9E828.
warn:vcl.schedule.deinit:2452:3060:vcl/source/app/scheduler.cxx:172: DeInit task: Timer a: 1 p: 1 framework::AutoRecovery m_aTimer 600000ms (0000000006B3C8B8)warn:vcl.schedule.deinit:2452:3060:vcl/source/app/scheduler.cxx:193: DeInit active tasks: 1 (ignored: 0)Der Thread 0x6d8 hat mit Code 0 (0x0) geendet.
Der Thread 0x958 hat mit Code 0 (0x0) geendet.
Der Thread 0x8f4 hat mit Code 0 (0x0) geendet.
Der Thread 0x978 hat mit Code 0 (0x0) geendet.
Der Thread 0x6e4 hat mit Code 0 (0x0) geendet.
Der Thread 0x898 hat mit Code 0 (0x0) geendet.
Der Thread 0x4f4 hat mit Code 0 (0x0) geendet.
Das Programm "[2452] soffice.bin" wurde mit Code 0 (0x0) beendet.
Comment 26 Commit Notification 2018-11-06 08:59:45 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/885f99d1d926fa08f58117573717f98eb0de139c%5E%21

tdf#118573: Acquire solar mutex when calling Application::Reschedule

It will be available in 6.1.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.