Hi! I'm getting sc_opencl_test failing reliably on my Win10, with build log like https://pastebin.com/TsiTeYV6. My config: --with-external-tar=c:/lo/src/lo-externalsrc --with-junit=c:/lo/src/junit-4.10.jar --with-ant-home=c:/lo/src/apache-ant-1.9.5 --with-galleries=no --with-visual-studio=2017 --enable-pch --enable-dbgutil --enable-symbols --without-help --with-lang=ru --with-myspell-dicts --enable-64-bit --enable-werror --enable-breakpad The failing test is ScOpenCLTest::testDatabaseFormulaDmax. Main thread call stack: ntdll.dll!NtWaitForAlertByThreadId() ntdll.dll!RtlSleepConditionVariableSRW() KernelBase.dll!SleepConditionVariableSRW() msvcp140d.dll!__crtSleepConditionVariableSRW(_RTL_CONDITION_VARIABLE * pCond, _RTL_SRWLOCK * pLock, unsigned long dwMs, unsigned long flags) Line 659 at f:\dd\vctools\crt\crtw32\misc\winapisupp.cpp(659) msvcp140d.dll!Concurrency::details::stl_condition_variable_win7::wait_for(Concurrency::details::stl_critical_section_interface * lock, unsigned int timeout) Line 216 at f:\dd\vctools\crt\crtw32\stdcpp\thr\primitives.h(216) msvcp140d.dll!do_wait(_Cnd_internal_imp_t * cond, _Mtx_internal_imp_t * mtx, const xtime * target) Line 82 at f:\dd\vctools\crt\crtw32\stdcpp\thr\cond.c(82) msvcp140d.dll!_Cnd_timedwait(_Cnd_internal_imp_t * cond, _Mtx_internal_imp_t * mtx, const xtime * xt) Line 111 at f:\dd\vctools\crt\crtw32\stdcpp\thr\cond.c(111) comphelper.dll!std::_Cnd_timedwaitX(_Cnd_internal_imp_t * _Cnd, _Mtx_internal_imp_t * _Mtx, const xtime * _Xt) Line 103 at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.15.26726\include\thr\xthread(103) comphelper.dll!std::condition_variable::wait_until(std::unique_lock<std::mutex> & _Lck, const xtime * _Abs_time) Line 775 at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.15.26726\include\mutex(775) comphelper.dll!std::condition_variable::wait_for<__int64,std::ratio<1,1> >(std::unique_lock<std::mutex> & _Lck, const std::chrono::duration<__int64,std::ratio<1,1> > & _Rel_time) Line 731 at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.15.26726\include\mutex(731) comphelper.dll!comphelper::ThreadTaskTag::waitUntilDone() Line 311 at c:\lo\src\core\comphelper\source\misc\threadpool.cxx(311) comphelper.dll!comphelper::ThreadPool::waitUntilDone(const std::shared_ptr<comphelper::ThreadTaskTag> & rTag) Line 237 at c:\lo\src\core\comphelper\source\misc\threadpool.cxx(237) sclo.dll!ScFormulaCell::InterpretFormulaGroupThreading(sc::FormulaLogger::GroupScope & aScope, bool & bDependencyComputed, bool & bDependencyCheckFailed) Line 4670 at c:\lo\src\core\sc\source\core\data\formulacell.cxx(4670) sclo.dll!ScFormulaCell::InterpretFormulaGroup() Line 4532 at c:\lo\src\core\sc\source\core\data\formulacell.cxx(4532) sclo.dll!ScFormulaCell::Interpret() Line 1560 at c:\lo\src\core\sc\source\core\data\formulacell.cxx(1560) sclo.dll!`anonymous namespace'::CalcAllHandler::operator()(unsigned __int64 __formal, ScFormulaCell * pCell) Line 2908 at c:\lo\src\core\sc\source\core\data\column.cxx(2908) sclo.dll!sc::EachElem<mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell>,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<ScFormulaCell *> > >,mdds::detail::mtv::iterator_value_node<unsigned __int64,mdds::mtv::base_element_block>,`anonymous namespace'::CalcAllHandler>(mdds::detail::mtv::iterator_value_node<unsigned __int64,mdds::mtv::base_element_block> & rNode, `anonymous-namespace'::CalcAllHandler & rFuncElem) Line 120 at c:\lo\src\core\sc\inc\mtvfunctions.hxx(120) sclo.dll!sc::ProcessElements1<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,svl::SharedString>,mdds::mtv::noncopyable_managed_element_block<53,EditTextObject>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell> >,sc::CellStoreEvent>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell>,`anonymous namespace'::CalcAllHandler,sc::FuncElseNoOp<unsigned __int64,bool> >(mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,svl::SharedString>,mdds::mtv::noncopyable_managed_element_block<53,EditTextObject>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell> >,sc::CellStoreEvent> & rStore, `anonymous-namespace'::CalcAllHandler & rFuncElem, sc::FuncElseNoOp<unsigned __int64,bool> & rFuncElse) Line 311 at c:\lo\src\core\sc\inc\mtvfunctions.hxx(311) sclo.dll!sc::ProcessFormula<`anonymous namespace'::CalcAllHandler>(mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,svl::SharedString>,mdds::mtv::noncopyable_managed_element_block<53,EditTextObject>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell> >,sc::CellStoreEvent> & rStore, `anonymous-namespace'::CalcAllHandler & rFunc) Line 25 at c:\lo\src\core\sc\inc\mtvcellfunc.hxx(25) sclo.dll!ScColumn::CalcAll() Line 3488 at c:\lo\src\core\sc\source\core\data\column.cxx(3488) sclo.dll!ScTable::CalcAll() Line 1880 at c:\lo\src\core\sc\source\core\data\table2.cxx(1880) sclo.dll!ScDocument::CalcAll() Line 3953 at c:\lo\src\core\sc\source\core\data\document.cxx(3953) test_sc_opencl_test.dll!ScOpenCLTest::testDatabaseFormulaDmax() Line 4139 at c:\lo\src\core\sc\qa\unit\opencl-test.cxx(4139) test_sc_opencl_test.dll!std::_Invoker_pmf_pointer::_Call<void (__cdecl ScOpenCLTest::*)(void),ScOpenCLTest * &>(void(ScOpenCLTest::*)() _Pmf, ScOpenCLTest * & _Arg1) test_sc_opencl_test.dll!std::invoke<void (__cdecl ScOpenCLTest::*&)(void),ScOpenCLTest * &>(void(ScOpenCLTest::*)() & _Obj, ScOpenCLTest * & <_Args_0>) test_sc_opencl_test.dll!std::_Invoker_ret<std::_Unforced,0>::_Call<void (__cdecl ScOpenCLTest::*&)(void),ScOpenCLTest * &>(void(ScOpenCLTest::*)() & <_Vals_0>, ScOpenCLTest * & <_Vals_1>) test_sc_opencl_test.dll!std::_Call_binder<std::_Unforced,0,void (__cdecl ScOpenCLTest::*)(void),std::tuple<ScOpenCLTest *>,std::tuple<> >(std::_Invoker_ret<std::_Unforced,0> __formal, std::integer_sequence<unsigned __int64,0> __formal, void(ScOpenCLTest::*)() & _Obj, std::tuple<ScOpenCLTest *> & _Tpl, std::tuple<> && _Ut) Line 1859 at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.15.26726\include\functional(1859) test_sc_opencl_test.dll!std::_Binder<std::_Unforced,void (__cdecl ScOpenCLTest::*&)(void),ScOpenCLTest * &>::operator()<>() Line 1914 at c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.15.26726\include\functional(1914) test_sc_opencl_test.dll!std::_Invoker_functor::_Call<std::_Binder<std::_Unforced,void (__cdecl ScOpenCLTest::*&)(void),ScOpenCLTest * &> &>(std::_Binder<std::_Unforced,void (__cdecl ScOpenCLTest::*&)(void),ScOpenCLTest * &> & _Obj) test_sc_opencl_test.dll!std::invoke<std::_Binder<std::_Unforced,void (__cdecl ScOpenCLTest::*&)(void),ScOpenCLTest * &> &>(std::_Binder<std::_Unforced,void (__cdecl ScOpenCLTest::*&)(void),ScOpenCLTest * &> & _Obj) test_sc_opencl_test.dll!std::_Invoker_ret<void,1>::_Call<std::_Binder<std::_Unforced,void (__cdecl ScOpenCLTest::*&)(void),ScOpenCLTest * &> &>(std::_Binder<std::_Unforced,void (__cdecl ScOpenCLTest::*&)(void),ScOpenCLTest * &> & <_Vals_0>) test_sc_opencl_test.dll!std::_Func_impl_no_alloc<std::_Binder<std::_Unforced,void (__cdecl ScOpenCLTest::*&)(void),ScOpenCLTest * &>,void>::_Do_call() test_sc_opencl_test.dll!std::_Func_class<void>::operator()() test_sc_opencl_test.dll!CppUnit::TestCaller<ScOpenCLTest>::runTest() Line 176 at c:\lo\src\core\workdir\unpackedtarball\cppunit\include\cppunit\testcaller.h(176) cppunitd_dll.dll!CppUnit::TestCaseMethodFunctor::operator()() Line 33 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\testcase.cpp(33) vclbootstrapprotector.dll!`anonymous namespace'::Protector::protect(const CppUnit::Functor & functor, const CppUnit::ProtectorContext & __formal) Line 49 at c:\lo\src\core\test\source\vclbootstrapprotector.cxx(49) cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\protectorchain.cpp(21) unobootstrapprotector.dll!`anonymous namespace'::Prot::protect(const CppUnit::Functor & functor, const CppUnit::ProtectorContext & __formal) Line 89 at c:\lo\src\core\unotest\source\cpp\unobootstrapprotector\unobootstrapprotector.cxx(89) cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\protectorchain.cpp(21) unoexceptionprotector.dll!`anonymous namespace'::Prot::protect(const CppUnit::Functor & functor, const CppUnit::ProtectorContext & context) Line 63 at c:\lo\src\core\unotest\source\cpp\unoexceptionprotector\unoexceptionprotector.cxx(63) cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\protectorchain.cpp(21) cppunitd_dll.dll!CppUnit::DefaultProtector::protect(const CppUnit::Functor & functor, const CppUnit::ProtectorContext & context) Line 15 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\defaultprotector.cpp(15) cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\protectorchain.cpp(21) cppunitd_dll.dll!CppUnit::ProtectorChain::protect(const CppUnit::Functor & functor, const CppUnit::ProtectorContext & context) Line 86 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\protectorchain.cpp(86) cppunitd_dll.dll!CppUnit::TestResult::protect(const CppUnit::Functor & functor, CppUnit::Test * test, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & shortDescription) Line 182 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\testresult.cpp(182) cppunitd_dll.dll!CppUnit::TestCase::run(CppUnit::TestResult * result) Line 91 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\testcase.cpp(91) cppunitd_dll.dll!CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult * controller) Line 65 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\testcomposite.cpp(65) cppunitd_dll.dll!CppUnit::TestComposite::run(CppUnit::TestResult * result) Line 24 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\testcomposite.cpp(24) cppunitd_dll.dll!CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult * controller) Line 65 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\testcomposite.cpp(65) cppunitd_dll.dll!CppUnit::TestComposite::run(CppUnit::TestResult * result) Line 24 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\testcomposite.cpp(24) cppunitd_dll.dll!CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult * result) Line 48 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\testrunner.cpp(48) cppunitd_dll.dll!CppUnit::TestResult::runTest(CppUnit::Test * test) Line 150 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\testresult.cpp(150) cppunitd_dll.dll!CppUnit::TestRunner::run(CppUnit::TestResult & controller, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & testPath) Line 96 at c:\lo\src\core\workdir\unpackedtarball\cppunit\src\cppunit\testrunner.cpp(96) cppunittester.exe!`anonymous namespace'::ProtectedFixtureFunctor::run() Line 316 at c:\lo\src\core\sal\cppunittester\cppunittester.cxx(316) cppunittester.exe!sal_main() Line 466 at c:\lo\src\core\sal\cppunittester\cppunittester.cxx(466) cppunittester.exe!main(int argc, char * * argv) Line 373 at c:\lo\src\core\sal\cppunittester\cppunittester.cxx(373) cppunittester.exe!invoke_main() Line 79 at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(79) cppunittester.exe!__scrt_common_main_seh() Line 288 at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(288) cppunittester.exe!__scrt_common_main() Line 331 at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(331) cppunittester.exe!mainCRTStartup() Line 17 at f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp(17) kernel32.dll!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() The two failing threads (named thread-pool) have this call stack: sclo.dll!ScDocument::GetFormatTable() Line 468 at c:\lo\src\core\sc\source\core\data\documen2.cxx(468) sclo.dll!ScDocument::GetNonThreadedContext() Line 580 at c:\lo\src\core\sc\inc\document.hxx(580) sclo.dll!ScColumn::GetInputString(long nRow, rtl::OUString & rString) Line 2590 at c:\lo\src\core\sc\source\core\data\column3.cxx(2590) sclo.dll!ScTable::GetInputString(short nCol, long nRow, rtl::OUString & rString) Line 1548 at c:\lo\src\core\sc\source\core\data\table2.cxx(1548) sclo.dll!ScDocument::GetInputString(short nCol, long nRow, short nTab, rtl::OUString & rString) Line 3552 at c:\lo\src\core\sc\source\core\data\document.cxx(3552) sclo.dll!ScDBInternalRange::getString(short nCol, long nRow) Line 309 at c:\lo\src\core\sc\source\core\tool\doubleref.cxx(309) sclo.dll!`anonymous namespace'::lcl_createStarQuery(svl::SharedStringPool & rPool, ScQueryParamBase * pParam, const ScDBRangeBase * pDBRef, const ScDBRangeBase * pQueryRef) Line 96 at c:\lo\src\core\sc\source\core\tool\doubleref.cxx(96) sclo.dll!`anonymous namespace'::lcl_fillQueryEntries(svl::SharedStringPool & rPool, ScQueryParamBase * pParam, const ScDBRangeBase * pDBRef, const ScDBRangeBase * pQueryRef) Line 222 at c:\lo\src\core\sc\source\core\tool\doubleref.cxx(222) sclo.dll!ScDBRangeBase::fillQueryEntries(ScQueryParamBase * pParam, const ScDBRangeBase * pDBRef) Line 260 at c:\lo\src\core\sc\source\core\tool\doubleref.cxx(260) sclo.dll!ScDBInternalRange::createQueryParam(const ScDBRangeBase * pQueryRef) Line 375 at c:\lo\src\core\sc\source\core\tool\doubleref.cxx(375) sclo.dll!ScInterpreter::GetDBParams(bool & rMissingField) Line 7668 at c:\lo\src\core\sc\source\core\tool\interpr1.cxx(7668) sclo.dll!ScInterpreter::DBIterator(ScIterFunc eFunc) Line 7708 at c:\lo\src\core\sc\source\core\tool\interpr1.cxx(7708) sclo.dll!ScInterpreter::ScDBMax() Line 7876 at c:\lo\src\core\sc\source\core\tool\interpr1.cxx(7876) sclo.dll!ScInterpreter::Interpret() Line 4203 at c:\lo\src\core\sc\source\core\tool\interpr4.cxx(4203) sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1868 at c:\lo\src\core\sc\source\core\data\formulacell.cxx(1868) sclo.dll!ScColumn::CalculateInThread(ScInterpreterContext & rContext, long nRow, unsigned __int64 nLen, unsigned int nThisThread, unsigned int nThreadsTotal) Line 2969 at c:\lo\src\core\sc\source\core\data\column2.cxx(2969) sclo.dll!ScTable::CalculateInColumnInThread(ScInterpreterContext & rContext, short nCol, long nRow, unsigned __int64 nLen, unsigned int nThisThread, unsigned int nThreadsTotal) Line 2417 at c:\lo\src\core\sc\source\core\data\table1.cxx(2417) sclo.dll!ScDocument::CalculateInColumnInThread(ScInterpreterContext & rContext, const ScAddress & rTopPos, unsigned __int64 nLen, unsigned int nThisThread, unsigned int nThreadsTotal) Line 432 at c:\lo\src\core\sc\source\core\data\documen8.cxx(432) sclo.dll!`ScFormulaCell::InterpretFormulaGroupThreading'::`5'::Executor::doWork() Line 4637 at c:\lo\src\core\sc\source\core\data\formulacell.cxx(4637) comphelper.dll!comphelper::ThreadTask::exec() Line 264 at c:\lo\src\core\comphelper\source\misc\threadpool.cxx(264) comphelper.dll!comphelper::ThreadPool::ThreadWorker::execute() Line 72 at c:\lo\src\core\comphelper\source\misc\threadpool.cxx(72) salhelper3MSC.dll!salhelper::Thread::run() Line 40 at c:\lo\src\core\salhelper\source\thread.cxx(40) salhelper3MSC.dll!threadFunc(void * param) Line 186 at c:\lo\src\core\include\osl\thread.hxx(186) sal3.dll!oslWorkerWrapperFunction(void * pData) Line 58 at c:\lo\src\core\sal\osl\w32\thread.cxx(58) ucrtbased.dll!invoke_thread_procedure(unsigned int(*)(void *) procedure, void * const context) Line 92 at minkernel\crts\ucrt\src\appcrt\startup\thread.cpp(92) ucrtbased.dll!thread_start<unsigned int (__cdecl*)(void * __ptr64)>(void * const parameter) Line 115 at minkernel\crts\ucrt\src\appcrt\startup\thread.cpp(115) kernel32.dll!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() The problem seems to be in main thread's ScFormulaCell::InterpretFormulaGroupThreading, which calls pDocument->SetThreadedGroupCalcInProgress(true); then starts two threads in cycle; then waits for them before pDocument->SetThreadedGroupCalcInProgress(false). Naturally, an assert for !IsThreadedGroupCalcInProgress() must fail in all started threads. I am not familiar with the code, and don't see how to proceed. -- Best regards, Mike Kaganski. _______________________________________________ LibreOffice mailing list LibreOffice@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/libreoffice