iTwin / imodel-native

Apache License 2.0
20 stars 12 forks source link

Flaky Test in `ECPresentation` on Linux x64 - `RulesDrivenECPresentationManagerRequestCancelationTests.CancelsFilteredNodesRequestWhenManagerIsTerminated` #47

Closed grigasp closed 1 year ago

grigasp commented 1 year ago

Build Info

Error Detail

[----------] 39 tests from RulesDrivenECPresentationManagerRequestCancelationTests
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenManagerIsTerminated
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenManagerIsTerminated (4 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenConnectionIsClosed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenConnectionIsClosed (5 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenRulesetIsDisposed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesCountRequestWhenRulesetIsDisposed (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenManagerIsTerminated
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenManagerIsTerminated (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenConnectionIsClosed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenConnectionIsClosed (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenRulesetIsDisposed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodesRequestWhenRulesetIsDisposed (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodeRequestWhenManagerIsTerminated
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodeRequestWhenManagerIsTerminated (5 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodeRequestWhenConnectionIsClosed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsNodeRequestWhenConnectionIsClosed (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenManagerIsTerminated
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenManagerIsTerminated (4 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenConnectionIsClosed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenConnectionIsClosed (3 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenRulesetIsDisposed
[       OK ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsParentNodeRequestWhenRulesetIsDisposed (5 ms)
[ RUN      ] RulesDrivenECPresentationManagerRequestCancelationTests.CancelsFilteredNodesRequestWhenManagerIsTerminated
Segmentation fault

Links to failing builds

Notes

Only noticed it once. CNR on local Windows x64 debug build.

grigasp commented 1 year ago

Update:

grigasp commented 1 year ago

Main thread

>   folly::detail::(anonymous namespace)::nativeFutexWaitImpl(void * addr, uint32_t expected, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1, 1000000000> > > * absSystemTime, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1, 1000000000> > > * absSteadyTime, uint32_t waitMask) Line 126 C++
    folly::detail::Futex<std::atomic>::futexWaitImpl(folly::detail::Futex<std::atomic> * this, uint32_t expected, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1, 1000000000> > > * absSystemTime, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1, 1000000000> > > * absSteadyTime, uint32_t waitMask) Line 318 C++
    folly::detail::Futex<std::atomic>::futexWaitUntil<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(folly::detail::Futex<std::atomic> * this, uint32_t expected, const std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1, 1000000000> > > & absTime, uint32_t waitMask) Line 104   C++
    folly::detail::MemoryIdler::futexWait<std::atomic, std::chrono::_V2::steady_clock>(folly::detail::Futex<std::atomic> & fut, uint32_t expected, uint32_t waitMask, std::chrono::_V2::steady_clock::duration idleTimeout, size_t stackToRetain, float timeoutVariationFrac) Line 136  C++
    folly::Baton<std::atomic>::wait(folly::Baton<std::atomic> * this) Line 151  C++
    folly::detail::waitImpl<folly::Unit>(folly::Future<folly::Unit> & f) Line 965   C++
    folly::Future<folly::Unit>::wait() &(folly::Future<folly::Unit> * this) Line 1007   C++
    RulesDrivenECPresentationManagerRequestCancelationTests::VerifyCancelation(RulesDrivenECPresentationManagerRequestCancelationTests * this, bool expectCanceled, bool expectConnectionInterrupted, int expectedHitCount) Line 652    C++
    RulesDrivenECPresentationManagerRequestCancelationTests::TerminateAndVerifyResult(RulesDrivenECPresentationManagerRequestCancelationTests * this, bool expectConnectionInterrupted) Line 671    C++
    RulesDrivenECPresentationManagerRequestCancelationTests_CancelsNodesCountRequestWhenManagerIsTerminated_Test::TestBody()::$_9::operator()(bool) const(const class {...} * this, bool started) Line 716  C++
    std::_Function_handler<void (bool), RulesDrivenECPresentationManagerRequestCancelationTests_CancelsNodesCountRequestWhenManagerIsTerminated_Test::TestBody()::$_9>::_M_invoke(std::_Any_data const&, bool&&)(const std::_Any_data & __functor, bool && __args) Line 316 C++
    std::function<void (bool)>::operator()(bool) const(const std::function<void (bool)> * this, bool __args) Line 706   C++
    RulesDrivenECPresentationManagerRequestCancelationTests::RunTestWithParams(std::function<void (bool)>)(RulesDrivenECPresentationManagerRequestCancelationTests * this, std::function<void (bool)> test) Line 591    C++
    RulesDrivenECPresentationManagerRequestCancelationTests_CancelsNodesCountRequestWhenManagerIsTerminated_Test::TestBody(RulesDrivenECPresentationManagerRequestCancelationTests_CancelsNodesCountRequestWhenManagerIsTerminated_Test * this) Line 696    C++
    testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test * object, void (testing::Test::*)(testing::Test * const) method, const char * location) Line 2714  C++
    testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test * object, void (testing::Test::*)(testing::Test * const) method, const char * location) Line 2750 C++
    testing::Test::Run(testing::Test * this) Line 2789  C++
    testing::TestInfo::Run(testing::TestInfo * this) Line 2968  C++
    testing::TestSuite::Run(testing::TestSuite * this) Line 3127    C++
    testing::internal::UnitTestImpl::RunAllTests(testing::internal::UnitTestImpl * this) Line 5997  C++
    testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl * object, bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const) method, const char * location) Line 2714  C++
    testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl * object, bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const) method, const char * location) Line 2750 C++
    testing::UnitTest::Run(testing::UnitTest * this) Line 5566  C++

Worker thread

>   folly::detail::Core<folly::Unit>::doCallback(folly::detail::Core<folly::Unit> * this) Line 333  C++
    folly::detail::Core<folly::Unit>::maybeCallback()::{lambda()#2}::operator()() const(const class {...} * this) Line 307  C++
    folly::detail::FSM<folly::detail::State>::updateState<folly::detail::Core<folly::Unit>::maybeCallback()::{lambda()#1}, folly::detail::Core<folly::Unit>::maybeCallback()::{lambda()#2}>(folly::detail::State, folly::detail::State, folly::detail::Core<folly::Unit>::maybeCallback()::{lambda()#1} const&, folly::detail::Core<folly::Unit>::maybeCallback()::{lambda()#2} const&)(folly::detail::FSM<folly::detail::State> * this, folly::detail::State A, folly::detail::State B, const class {...} & protectedAction, const class {...} & unprotectedAction) Line 100   C++
    folly::detail::Core<folly::Unit>::maybeCallback(folly::detail::Core<folly::Unit> * this) Line 307   C++
    folly::detail::Core<folly::Unit>::setResult(folly::detail::Core<folly::Unit> * this, folly::Try<folly::Unit> && t) Line 202 C++
    folly::Promise<folly::Unit>::setException(folly::Promise<folly::Unit> * this, folly::exception_wrapper ew) Line 105 C++
    std::enable_if<!folly::detail::callableResult<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long>, {lambda()#1}>::ReturnsFuture::value, std::enable_if::Return>::type folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >::thenImplementation<void RulesDrivenECPresentationManagerRequestCancelationTests::DoRequest<folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > >(folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >, bool)::{lambda()#1}, folly::detail::callableResult<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long>, {lambda()#1}>, false>(void RulesDrivenECPresentationManagerRequestCancelationTests::DoRequest<folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > >(folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >, bool)::{lambda()#1}&&, void RulesDrivenECPresentationManagerRequestCancelationTests::DoRequest<folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > >(folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >, bool)::{lambda()#1}::argResult<false, void RulesDrivenECPresentationManagerRequestCancelationTests::DoRequest<folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > >(folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >, bool)::{lambda()#1}>)::{lambda(folly::Try<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >&&)#1}::operator()(folly::Try)(class {...} * this, folly::Try<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > && t) Line 182  C++
    folly::detail::function::FunctionTraits<void (folly::Try<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >&&)>::callSmall<std::enable_if<!folly::detail::callableResult<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long>, {lambda()#1}>::ReturnsFuture::value, std::enable_if::Return>::type folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >::thenImplementation<void RulesDrivenECPresentationManagerRequestCancelationTests::DoRequest<folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > >(folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >, bool)::{lambda()#1}, folly::detail::callableResult<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long>, {lambda()#1}>, false>(void RulesDrivenECPresentationManagerRequestCancelationTests::DoRequest<folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > >(folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >, bool)::{lambda()#1}&&, folly::detail::argResult<false, void RulesDrivenECPresentationManagerRequestCancelationTests::DoRequest<folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > >(folly::Future<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >, bool)::{lambda()#1}>)::{lambda(folly::Try<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >&&)#1}>(folly::detail::function::Data&, folly::Try<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >&&)(folly::detail::function::Data & p, folly::Try<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > && args) Line 289  C++
    folly::detail::function::FunctionTraits<void (folly::Try<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >&&)>::operator()(folly::Try<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >&&)(folly::detail::function::FunctionTraits<void (folly::Try<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > &&)> * this, folly::Try<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> > && args) Line 305   C++
    folly::detail::Core<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >::doCallback()::{lambda()#1}::operator()()(class {...} * this) Line 338    C++
    folly::detail::function::FunctionTraits<void ()>::callSmall<folly::detail::Core<BentleyM0200::ECPresentation::ECPresentationResponse<unsigned long> >::doCallback()::{lambda()#1}>(folly::detail::function::Data&)(folly::detail::function::Data & p) Line 289  C++
    folly::detail::function::FunctionTraits<void ()>::operator()()(folly::detail::function::FunctionTraits<void ()> * this) Line 305    C++
    BeFolly::ThreadPool::Worker::Work(BeFolly::ThreadPool::Worker * this) Line 48   C++
    BeFolly::ThreadPool::Worker::Main(void * arg) Line 71   C++
    libpthread.so.0!start_thread(void * arg) Line 463   C