Bug 93119 - rtl::Static can deadlock on startup
Summary: rtl::Static can deadlock on startup
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other Windows (All)
: low minor
Assignee: Stephan Bergmann
URL:
Whiteboard: target:6.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-04 12:42 UTC by Michael Stahl (allotropia)
Modified: 2017-06-19 08:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace of deadlock during startup on Windows (18.71 KB, text/plain)
2015-08-04 12:42 UTC, Michael Stahl (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stahl (allotropia) 2015-08-04 12:42:46 UTC
Created attachment 117641 [details]
backtrace of deadlock during startup on Windows

if the compiler does not support C++11 thread safe statics,
then it's possible to deadlock during global variable initialization.

the !HAVE_THREADSAFE_STATICS fall-back implementation
of rtl::Static uses one mutex for all global variables
so if one global's initialization creates a different
global too it can deadlock.

affected (on current master) compilers are MSVC 2013
and clang configured to build for Mac OS X 10.8.
Comment 1 QA Administrators 2016-09-20 10:21:53 UTC Comment hidden (obsolete)
Comment 2 Michael Stahl (allotropia) 2016-09-20 11:21:50 UTC
still a problem with MSVC 2013, we need to switch to MSVC 2015 to fix it
Comment 3 Julien Nabet 2017-04-06 20:05:41 UTC
So with MSVC 2015 used now, it should be ok for Windows.
Only have to wait for baseline for MacOS to be 10.9 instead of 10.8.
Comment 4 How can I remove my account? 2017-04-06 20:15:50 UTC
If I understand correctly, the Macs that can't run 10.9 are from before 2008. Should we really be kept hostage by people with ten year old machines who demand to be able to run current software?
Comment 5 JoNi 2017-06-18 20:07:06 UTC
is this issue solved now with HAVE_THREADSAFE_STATICS always true for all toolchains or does it need additional work?
Comment 6 Michael Stahl (allotropia) 2017-06-19 08:57:38 UTC
yeah should be fixed on master now