Skip to content

Commit 98f9b51

Browse files
committed
Split long-running CppunitTest_sc_opencl_test in two
At least the unrelated <https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/132372/> was killed after 20 minutes of no stdout/-err activity, with CppunitTest_sc_opencl_test still running. From its captured state, it looks like it was indeed still making progress rather than being stuck: During ScOpenCLTest::testLogicalFormulaXor, the main thread was waiting at ScFormulaCell::InterpretFormulaGroupThreading -> comphelper::ThreadPool::waitUntilDone, while four comphelper::ThreadPool::ThreadWorker threads were each at > #4 0x00007f70652f9234 in __gnu_debug::_Safe_iterator_base::_M_detach() () at /lib64/libstdc++.so.6 > #5 0x00007f7048d3e8e5 in __gnu_debug::_Safe_iterator_base::~_Safe_iterator_base() (this=0x7f703daa9f20) at /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/debug/safe_base.h:100 > #6 0x00007f7048d5d709 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<mdds::mtv::base_element_block* const*, std::__cxx1998::vector<mdds::mtv::base_element_block*, std::allocator<mdds::mtv::base_element_block*> > >, std::__debug::vector<mdds::mtv::base_element_block*, std::allocator<mdds::mtv::base_element_block*> > >::~_Safe_iterator() (this=0x7f703daa9f18) at /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/debug/safe_iterator.h:86 > #7 0x00007f7048d5d6cd in mdds::mtv::soa::detail::iterator_updater<mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::const_iterator_trait>::grouped_iterator_type::~grouped_iterator_type() (this=0x7f703daa9ec8) at workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/./iterator.hpp:74 > #8 0x00007f7048d5d69d in mdds::mtv::soa::detail::iterator_updater<mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::const_iterator_trait>::~iterator_updater() (this=0x7f703daa9e98) at workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/./iterator.hpp:55 > #9 0x00007f7048d5d665 in mdds::mtv::soa::detail::const_iterator_base<mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::const_iterator_trait, mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::iterator_trait> >::~const_iterator_base() (this=0x7f703daa9e98) at workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/./iterator.hpp:309 > #10 0x00007f704900b9bd in ScValueIterator::GetThis(double&, FormulaError&) (this=0x7f703daaa078, rValue=@0x7f703daaa1f8: -18.819375178914722, rErr=@0x7f703daaa1f6: NONE) at sc/source/core/data/dociter.cxx:141 > #11 0x00007f704900c652 in ScValueIterator::GetNext(double&, FormulaError&) (this=0x7f703daaa078, rValue=@0x7f703daaa1f8: -18.819375178914722, rErr=@0x7f703daaa1f6: NONE) at sc/source/core/data/dociter.cxx:297 > #12 0x00007f70496c3619 in ScInterpreter::ScXor() (this=0x48b93a0) at sc/source/core/tool/interpr1.cxx:1525 with three of them apparently waiting in pthread_mutex_lock but one in pthread_mutex_unlock (and thus presumably making progress). It looks like with a debug-mode libstdc++ these worker threads can easily compete for these listdc++-internal debug-mode mutices. And execution of --enable-dbgutil CppunitTest_sc_opencl_test on my Linux laptop under load easily took 35 minutes, so it looks plausible that that unit test was just too big. While splitting it in two (arbitrarily taking the first and second half of the CPPUNIT_TEST list), use the opportunity to drop the redundant "_test" from the two new target names CppunitTest_sc_opencl-1 and CppunitTest_sc_opencl-2. Change-Id: I9b8f148db667ff9bbf1aacdcaf150e5cb9b8ae87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146252 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]>
1 parent a6b64d0 commit 98f9b51

File tree

6 files changed

+2384
-2196
lines changed

6 files changed

+2384
-2196
lines changed

sc/CppunitTest_sc_opencl_test.mk renamed to sc/CppunitTest_sc_opencl-1.mk

+12-12
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
88
#
99

10-
$(eval $(call gb_CppunitTest_CppunitTest,sc_opencl_test))
10+
$(eval $(call gb_CppunitTest_CppunitTest,sc_opencl-1))
1111

12-
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sc_opencl_test))
12+
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sc_opencl-1))
1313

14-
$(eval $(call gb_CppunitTest_add_exception_objects,sc_opencl_test, \
15-
sc/qa/unit/opencl-test \
14+
$(eval $(call gb_CppunitTest_add_exception_objects,sc_opencl-1, \
15+
sc/qa/unit/opencl-test-1 \
1616
))
1717

18-
$(eval $(call gb_CppunitTest_use_externals,sc_opencl_test, \
18+
$(eval $(call gb_CppunitTest_use_externals,sc_opencl-1, \
1919
boost_headers \
2020
$(call gb_Helper_optional,OPENCL,clew) \
2121
mdds_headers \
2222
libxml2 \
2323
))
2424

25-
$(eval $(call gb_CppunitTest_use_libraries,sc_opencl_test, \
25+
$(eval $(call gb_CppunitTest_use_libraries,sc_opencl-1, \
2626
basegfx \
2727
comphelper \
2828
cppu \
@@ -57,24 +57,24 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_opencl_test, \
5757
xo \
5858
))
5959

60-
$(eval $(call gb_CppunitTest_set_include,sc_opencl_test,\
60+
$(eval $(call gb_CppunitTest_set_include,sc_opencl-1,\
6161
-I$(SRCDIR)/sc/source/ui/inc \
6262
-I$(SRCDIR)/sc/source/core/inc \
6363
-I$(SRCDIR)/sc/inc \
6464
$$(INCLUDE) \
6565
))
6666

67-
$(eval $(call gb_CppunitTest_use_api,sc_opencl_test,\
67+
$(eval $(call gb_CppunitTest_use_api,sc_opencl-1,\
6868
udkapi \
6969
offapi \
7070
oovbaapi \
7171
))
7272

73-
$(eval $(call gb_CppunitTest_use_ure,sc_opencl_test))
74-
$(eval $(call gb_CppunitTest_use_vcl,sc_opencl_test))
73+
$(eval $(call gb_CppunitTest_use_ure,sc_opencl-1))
74+
$(eval $(call gb_CppunitTest_use_vcl,sc_opencl-1))
7575

76-
$(eval $(call gb_CppunitTest_use_rdb,sc_opencl_test,services))
76+
$(eval $(call gb_CppunitTest_use_rdb,sc_opencl-1,services))
7777

78-
$(eval $(call gb_CppunitTest_use_configuration,sc_opencl_test))
78+
$(eval $(call gb_CppunitTest_use_configuration,sc_opencl-1))
7979

8080
# vim: set noet sw=4 ts=4:

sc/CppunitTest_sc_opencl-2.mk

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2+
#
3+
# This file is part of the LibreOffice project.
4+
#
5+
# This Source Code Form is subject to the terms of the Mozilla Public
6+
# License, v. 2.0. If a copy of the MPL was not distributed with this
7+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8+
#
9+
10+
$(eval $(call gb_CppunitTest_CppunitTest,sc_opencl-2))
11+
12+
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sc_opencl-2))
13+
14+
$(eval $(call gb_CppunitTest_add_exception_objects,sc_opencl-2, \
15+
sc/qa/unit/opencl-test-2 \
16+
))
17+
18+
$(eval $(call gb_CppunitTest_use_externals,sc_opencl-2, \
19+
boost_headers \
20+
$(call gb_Helper_optional,OPENCL,clew) \
21+
mdds_headers \
22+
libxml2 \
23+
))
24+
25+
$(eval $(call gb_CppunitTest_use_libraries,sc_opencl-2, \
26+
basegfx \
27+
comphelper \
28+
cppu \
29+
cppuhelper \
30+
drawinglayer \
31+
drawinglayercore \
32+
editeng \
33+
for \
34+
forui \
35+
i18nlangtag \
36+
msfilter \
37+
oox \
38+
sal \
39+
salhelper \
40+
sax \
41+
sc \
42+
scqahelper \
43+
sfx \
44+
sot \
45+
subsequenttest \
46+
svl \
47+
svt \
48+
svx \
49+
svxcore \
50+
test \
51+
tk \
52+
tl \
53+
ucbhelper \
54+
unotest \
55+
utl \
56+
vcl \
57+
xo \
58+
))
59+
60+
$(eval $(call gb_CppunitTest_set_include,sc_opencl-2,\
61+
-I$(SRCDIR)/sc/source/ui/inc \
62+
-I$(SRCDIR)/sc/source/core/inc \
63+
-I$(SRCDIR)/sc/inc \
64+
$$(INCLUDE) \
65+
))
66+
67+
$(eval $(call gb_CppunitTest_use_api,sc_opencl-2,\
68+
udkapi \
69+
offapi \
70+
oovbaapi \
71+
))
72+
73+
$(eval $(call gb_CppunitTest_use_ure,sc_opencl-2))
74+
$(eval $(call gb_CppunitTest_use_vcl,sc_opencl-2))
75+
76+
$(eval $(call gb_CppunitTest_use_rdb,sc_opencl-2,services))
77+
78+
$(eval $(call gb_CppunitTest_use_configuration,sc_opencl-2))
79+
80+
# vim: set noet sw=4 ts=4:

sc/Module_sc.mk

+2-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
202202
CppunitTest_sc_modelobj \
203203
CppunitTest_sc_namedrangeobj \
204204
CppunitTest_sc_namedrangesobj \
205-
CppunitTest_sc_opencl_test \
205+
CppunitTest_sc_opencl-1 \
206+
CppunitTest_sc_opencl-2 \
206207
CppunitTest_sc_outlineobj \
207208
CppunitTest_sc_recentfunctionsobj \
208209
CppunitTest_sc_recordchanges \

0 commit comments

Comments
 (0)