I figured out the remaining StMgr C++ unit test. There was a bug in the
logic. Not sure why it didn't fail on Linux systems, but it's failed for a
while on MacOS. We were deleting items from a map while iterating over the
map. The delete invalidated the iterator. C++11 `erase()` now returns an
iterator. But after reviewing the code, the values are `shared_ptr` so I
opted for a simpler `map.clear()`.

https://github.com/apache/incubator-heron/pull/3767

On Mon, Jan 24, 2022 at 3:03 AM Nicholas Nezis <[email protected]>
wrote:

> I still have one test failing, but I think this one has been failing for a
> long time. It passes on Linux, but in MacOS it fails. The StMgr
> `TearCommonResources()` is failing.
>
> exec ${PAGER:-/usr/bin/less} "$0" || exit 1
> Executing tests from //heron/stmgr/tests/cpp/server:stmgr_unittest
>
> -----------------------------------------------------------------------------
> Current working directory (to find stmgr logs)
> /private/var/tmp/_bazel_nnezis/d385143a5e5e8330d21cc686ddd6faec
> /execroot/org_apache_heron/bazel-out/darwin-fastbuild/bin/heron/stmgr/tests/cpp/server/stmgr_unittest.runfiles/org_apache_heron
> Using config file heron/config/src/yaml/conf/test/test_heron_internals.yaml
> [==========] Running 11 tests from 1 test suite.
> [----------] Global test environment set-up.
> [----------] 11 tests from StMgr
> [ RUN ] StMgr.test_pplan_decode
> *** Aborted at 1643011105 (unix time) try "date -d @1643011105" if you
> are using GNU date ***
> PC: @ 0x0 testing::internal::kTestTypeIdInGoogleTest
> *** SIGSEGV (@0x5e) received by PID 77255 (TID 0x10aff7600) stack trace:
> ***
> @ 0x7ff807d8fe2d _sigtramp
> @ 0x102fbf074 TearCommonResources()
> @ 0x102fc042f StMgr_test_pplan_decode_Test::TestBody()
> @ 0x1032a35a8 testing::internal::HandleExceptionsInMethodIfSupported<>()
> @ 0x1032a34ff testing::Test::Run()
> @ 0x1032a4a5f testing::TestInfo::Run()
> @ 0x1032a556b testing::TestSuite::Run()
> @ 0x1032b4fe9 testing::internal::UnitTestImpl::RunAllTests()
> @ 0x1032b4688 testing::internal::HandleExceptionsInMethodIfSupported<>()
> @ 0x1032b460c testing::UnitTest::Run()
> @ 0x102fc83df main
>
> On Mon, Jan 24, 2022 at 2:49 AM Ning Wang <[email protected]> wrote:
>
>> Great~
>>
>> On Sun, Jan 23, 2022 at 10:27 PM Nicholas Nezis <[email protected]
>> >
>> wrote:
>>
>> > I realized that our C++ unit tests were failing on my newer MacOS
>> (12.1).
>> > Took me a while to figure out that it was simple "cout" and "cerr" print
>> > statements that were causing the failures. Finally figured out that the
>> > standard C++ library was not being automatically linked. This seems to
>> be a
>> > Bazel issue. Luckily there is a fix and it is in newer versions of Bazel
>> > (4.2.2 and 5.0).
>> >
>> > I have a PR here ready for review to bump the version of Bazel.
>> > https://github.com/apache/incubator-heron/pull/3764
>> >
>> > Nick
>> >
>>
>

Reply via email to