From de9fd070939c67942cff27689e4f0f56d4863c19 Mon Sep 17 00:00:00 2001 From: John Shahid Date: Tue, 21 Jun 2022 00:05:47 +0000 Subject: [PATCH] Relax the thread count assertion, that is modify EXPECT_EQ -> EXPECT_GE (#79806) Summary: D36484910 added logarithm integration which ended up starting a new thread with the following stacktrace and causing the [caffe2/caffe2:caffe2_test_cpu_asan_no_sig tests](https://fburl.com/test/jk58c0el) to fail: SIGINT(2), PID: 1229124, Thread 1229126: # 0 c10::get_backtrace[abi:cxx11](unsigned long, unsigned long, bool) # 1 c10::FatalSignalHandler::stacktraceSignalHandler(bool) # 2 c10::FatalSignalHandler::stacktraceSignalHandler(int, siginfo_t*, void*) # 3 c10::FatalSignalHandler::stacktraceSignalHandlerStatic(int, siginfo_t*, void*) # 4 0x0000000000000000 # 5 __GI___futex_abstimed_wait_cancelable64 # 6 __GI___pthread_cond_wait # 7 std::condition_variable::wait(std::unique_lock&) # 8 folly::AsyncLogWriter::ioThread() # 9 folly::AsyncLogWriter::restartThread()::$_4::operator()() const # 10 void std::__invoke_impl(std::__invoke_other, folly::AsyncLogWriter::restartThread()::$_4&&) # 11 std::__invoke_result::type std::__invoke(folly::AsyncLogWriter::restartThread()::$_4&&) # 12 void std::thread::_Invoker >::_M_invoke<0ul>(std::_Index_tuple<0ul>) # 13 std::thread::_Invoker >::operator()() # 14 std::thread::_State_impl > >::_M_run() # 15 execute_native_thread_routine # 16 start_thread # 17 __GI___clone Reviewed By: dustinh1999 Differential Revision: D37251436 Pull Request resolved: https://github.com/pytorch/pytorch/pull/79806 Approved by: https://github.com/voznesenskym --- caffe2/utils/fatal_signal_asan_no_sig_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caffe2/utils/fatal_signal_asan_no_sig_test.cc b/caffe2/utils/fatal_signal_asan_no_sig_test.cc index c7b068ccfb9..9c64102981c 100644 --- a/caffe2/utils/fatal_signal_asan_no_sig_test.cc +++ b/caffe2/utils/fatal_signal_asan_no_sig_test.cc @@ -108,7 +108,7 @@ bool forkAndPipe( keyPhraseCount += 1; \ loc += 1; \ } \ - EXPECT_EQ(keyPhraseCount, expected); \ + EXPECT_GE(keyPhraseCount, expected); \ } while (0) #define TEST_FATAL_SIGNAL(signum, name, threadCount) \