Subject: bug#65437: bloomberg-bde 3.98.0 non-determistic test failure

From: Greg Hogan <[email-masked]>
Date: Tue, 15 Jul 2025 13:01:34 -0400

On Tue, Aug 22, 2023 at 5:54 PM Ludovic Courtès <[email-masked]> wrote:
>
> Hi,
>
> Maxim Cournoyer <[email-masked]> skribis:
>
> > make: *** [Makefile:14690: all.t] Error 2
> > error: in phase 'build-tests': uncaught exception:
> > %exception #<&invoke-error program: "make" arguments: ("all.t" "-j" "16") exit-status: 2 term-signal: #f stop-signal: #f>
> > phase `build-tests' failed after 705.6 seconds
> > command "make" "all.t" "-j" "16" failed with status 2
> > builder for `/gnu/store/sy9glkyrda4na297m9v85i53png5pvbh-bloomberg-bde-3.98.0.0.drv' failed with exit code 1
> > @ build-failed /gnu/store/sy9glkyrda4na297m9v85i53png5pvbh-bloomberg-bde-3.98.0.0.drv - 1 builder for `/gnu/store
> >
> > The build was broken on the qt-updates branch [0] but working on master, so
> > it appears to be non-deterministic.
> >
> > [0]  https://ci.guix.gnu.org/build/991957/log/raw
>
> The actual error seems to hide above in the log:
>
> --8<---------------cut here---------------start------------->8---
> [ 28%] Linking CXX executable bslma_managedptr_pairproxy.t
> /gnu/store/ygab8v4ci9iklaykapq52bfsshpvi8pw-cmake-minimal-3.24.2/bin/cmake -E cmake_link_script CMakeFiles/bslma_managedptr_pairproxy.t.dir/link.txt --verbose=1
> /gnu/store/5lqhcv91ijy82p92ac6g5xw48l0lwwz4-gcc-11.3.0/bin/c++ -O2 -g -DNDEBUG CMakeFiles/bslma_managedptr_pairproxy.t.dir/groups/bsl/bslma/bslma_managedptr_pairproxy.t.cpp.o -o bslma_managedptr_pairproxy.t  -Wl,-rpath,/tmp/guix-build-bloomberg-bde-3.98.0.0.drv-0/build libbslma.a libbslmf.a libbsla.a libbslscm.a libbsls.a -lrt libryu.so
> /tmp/guix-build-bloomberg-bde-3.98.0.0.drv-0/source/groups/bsl/bslma/bslma_managedptr.t.cpp: In function ?int main(int, char**)?:
> /tmp/guix-build-bloomberg-bde-3.98.0.0.drv-0/source/groups/bsl/bslma/bslma_managedptr.t.cpp:11176:22: error: ?move? is not a member of ?std?
> 11176 |             o = std::move(o2);
>       |                      ^~~~
> /tmp/guix-build-bloomberg-bde-3.98.0.0.drv-0/source/groups/bsl/bslma/bslma_managedptr.t.cpp:26:1: note: ?std::move? is defined in header ?<utility>?; did you forget to ?#include <utility>??
>    25 | #include <stdlib.h>     // 'atoi'
>   +++ |+#include <utility>
>    26 | #include <string.h>
> make[3]: Leaving directory '/tmp/guix-build-bloomberg-bde-3.98.0.0.drv-0/build'
> --8<---------------cut here---------------end--------------->8---
>
> I’m guessing that those .t.cpp files are generated and then built, and
> that there’s a race condition when building in parallel.
>
> Greg, does that ring a bell?  Should we perform the ‘build-tests’ phase
> sequentially?
>
> Ludo’.

Without digging too deeply into old code, the files are not generated
[0] and this error looks to have been a missing header which was long
ago added [1]. Unclear why this issue was non-deterministic.

CI has been nearly non-functional but I have not experienced this
build issue in the ~2 years since the error was reported. The proposed
change is trivial but does greatly slow down a lengthy build.

We have had non-deterministic test failures with this package, so I
have updated it on the c++-team branch along with a patch to enable by
default ctest's option to repeat failed tests [2] (which I set to 5
failures by default).

Can we close this issue and follow up as necessary on codeberg?

Greg

[0] https://github.com/bloomberg/bde/blob/3.98.0.0/groups/bsl/bslma/bslma_managedptr.t.cpp
[1] https://github.com/bloomberg/bde/commit/eaeae744c3f99ba9590f9690565173834d2606bc#diff-5e3d1c0e05fe78822b49b9c81cdba7ad62c92741874188686e0063e8c2987ae6
[2] https://cmake.org/cmake/help/latest/manual/ctest.1.html#cmdoption-ctest-repeat