Bug 104126

Summary: comphelper thread pool issue ...
Product: LibreOffice Reporter: Michael Meeks <michael.meeks>
Component: LibreOfficeAssignee: Michael Meeks <michael.meeks>
Status: RESOLVED FIXED    
Severity: normal CC: nemeth, sberg.fun
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard: target:5.4.0
Crash report or crash signature: Regression By:
Attachments: freeze.

Description Michael Meeks 2016-11-23 13:24:21 UTC
We've been doing some testing here - and after 1300 runs of a writer test - we managed to produce the following trace.

It -looks- as if we have a hung app - waiting for an event that never arrives. Almost certainly a consequence of the horror that is osl::Condition - and its various inadequacies.

The solution is probably to phase out osl::Condition in favor of any alternative - eg. the boost Condition. Particularly for this threadpool.
Comment 1 Michael Meeks 2016-11-23 13:26:26 UTC
Created attachment 128957 [details]
freeze.
Comment 2 Jan Holesovsky 2016-11-23 17:57:00 UTC
There's also std::condition_variable in C++11...
Comment 3 Michael Meeks 2016-11-23 19:52:56 UTC
Working on switching it to std:: threading foo ... fun.
Comment 4 Michael Meeks 2016-11-24 11:51:20 UTC
Pushed an initial patch to gerrit; -much- saner using a real condition it turns out =)
Comment 5 Commit Notification 2016-12-01 18:44:55 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=aa68c99d88fd7abe08c4aee5206c859a0cdba38e

tdf#104126 - comphelper thread-pool, use reliable std::condition_variable.

It will be available in 5.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 6 Michael Meeks 2016-12-01 21:15:27 UTC
Presumed fixed, if not replaced with another bug =)