parallaxsw / OpenSTA

GNU General Public License v3.0
52 stars 23 forks source link

Thread safety issue #57

Closed maliberty closed 2 weeks ago

maliberty commented 4 months ago

We are seeing instability in OR that is hard to track down. I ran the clang thread sanitizer and on ng45/gcd I see many warning like:

WARNING: ThreadSanitizer: data race (pid=2227651)
  Write of size 8 at 0x7b5c000013a8 by thread T12 (mutexes: write M0):
    #0 sta::Search::findTagGroup(sta::TagGroupBldr*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:2650:19 (openroad+0x10ceb50) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #1 sta::Search::setVertexArrivals(sta::Vertex*, sta::TagGroupBldr*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:2672:27 (openroad+0x10c5515) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #2 sta::ArrivalVisitor::visit(sta::Vertex*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:1162:14 (openroad+0x10c76ea) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #3 sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0::operator()(int) const /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Bfs.cc:201:34 (openroad+0x1070b42) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #4 void std::__invoke_impl<void, sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0&, int>(std::__invoke_other, sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0&, int&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:61:14 (openroad+0x1070b42)
    #5 std::enable_if<is_invocable_r_v<void, sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0&, int>, void>::type std::__invoke_r<void, sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0&, int>(sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0&, int&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:111:2 (openroad+0x1070b42)
    #6 std::_Function_handler<void (int), sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0>::_M_invoke(std::_Any_data const&, int&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:290:9 (openroad+0x1070b42)
    #7 std::function<void (int)>::operator()(int) const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:591:9 (openroad+0x1138ea1) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #8 sta::DispatchQueue::dispatch_thread_handler(unsigned long) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/util/DispatchQueue.cc:101:7 (openroad+0x1138ea1)
    #9 void std::__invoke_impl<void, void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long>(std::__invoke_memfun_deref, void (sta::DispatchQueue::*&&)(unsigned long), sta::DispatchQueue*&&, unsigned long&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 (openroad+0x113a321) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #10 std::__invoke_result<void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long>::type std::__invoke<void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long>(void (sta::DispatchQueue::*&&)(unsigned long), sta::DispatchQueue*&&, unsigned long&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 (openroad+0x113a321)
    #11 void std::thread::_Invoker<std::tuple<void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long> >::_M_invoke<0ul, 1ul, 2ul>(std::_Index_tuple<0ul, 1ul, 2ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:279:13 (openroad+0x113a321)
    #12 std::thread::_Invoker<std::tuple<void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:286:11 (openroad+0x113a321)
    #13 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long> > >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:231:13 (openroad+0x113a321)
    #14 <null> <null> (libstdc++.so.6+0xdc252) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2)

  Previous read of size 8 at 0x7b5c000013a8 by thread T18:
    #0 sta::Search::tagGroup(sta::Vertex const*) const /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:2779:12 (openroad+0x10be823) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #1 sta::PathVertex::init(sta::Vertex*, sta::Tag*, sta::StaState const*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/PathVertex.cc:113:33 (openroad+0x1098c3a) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #2 sta::PathVertex::PathVertex(sta::PathVertexRep const&, sta::StaState const*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/PathVertex.cc:93:5 (openroad+0x1098c3a)
    #3 sta::CheckCrpr::maxCrpr(sta::ClkInfo*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Crpr.cc:87:16 (openroad+0x1269141) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #4 sta::ArrivalVisitor::pruneCrprArrivals() /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:1321:27 (openroad+0x10c78d2) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #5 sta::ArrivalVisitor::visit(sta::Vertex*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:1119:5 (openroad+0x10c7372) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #6 sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0::operator()(int) const /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Bfs.cc:201:34 (openroad+0x1070b42) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #7 void std::__invoke_impl<void, sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0&, int>(std::__invoke_other, sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0&, int&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:61:14 (openroad+0x1070b42)
    #8 std::enable_if<is_invocable_r_v<void, sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0&, int>, void>::type std::__invoke_r<void, sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0&, int>(sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0&, int&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:111:2 (openroad+0x1070b42)
    #9 std::_Function_handler<void (int), sta::BfsIterator::visitParallel(int, sta::VertexVisitor*)::$_0>::_M_invoke(std::_Any_data const&, int&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:290:9 (openroad+0x1070b42)
    #10 std::function<void (int)>::operator()(int) const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_function.h:591:9 (openroad+0x1138ea1) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #11 sta::DispatchQueue::dispatch_thread_handler(unsigned long) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/util/DispatchQueue.cc:101:7 (openroad+0x1138ea1)
    #12 void std::__invoke_impl<void, void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long>(std::__invoke_memfun_deref, void (sta::DispatchQueue::*&&)(unsigned long), sta::DispatchQueue*&&, unsigned long&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:74:14 (openroad+0x113a321) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #13 std::__invoke_result<void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long>::type std::__invoke<void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long>(void (sta::DispatchQueue::*&&)(unsigned long), sta::DispatchQueue*&&, unsigned long&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:96:14 (openroad+0x113a321)
    #14 void std::thread::_Invoker<std::tuple<void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long> >::_M_invoke<0ul, 1ul, 2ul>(std::_Index_tuple<0ul, 1ul, 2ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:279:13 (openroad+0x113a321)
    #15 std::thread::_Invoker<std::tuple<void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:286:11 (openroad+0x113a321)
    #16 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (sta::DispatchQueue::*)(unsigned long), sta::DispatchQueue*, unsigned long> > >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_thread.h:231:13 (openroad+0x113a321)
    #17 <null> <null> (libstdc++.so.6+0xdc252) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2)

  Location is heap block of size 824 at 0x7b5c00001180 allocated by main thread:
    #0 operator new(unsigned long) <null> (openroad+0xbc7d76) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #1 sta::Sta::makeSearch() /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Sta.cc:431:13 (openroad+0x10ddfaa) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #2 sta::Sta::makeComponents() /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Sta.cc:294:3 (openroad+0x10dd3d3) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #3 sta::dbSta::initVars(Tcl_Interp*, odb::dbDatabase*, utl::Logger*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/dbSta/src/dbSta.cc:184:3 (openroad+0x31e6829) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #4 ord::initDbSta(ord::OpenRoad*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/dbSta/src/MakeDbSta.cc:44:8 (openroad+0xe511a3) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #5 ord::OpenRoad::init(Tcl_Interp*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/OpenRoad.cc:217:3 (openroad+0xbcec52) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #6 ord::initOpenRoad(Tcl_Interp*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/OpenRoad.cc:171:25 (openroad+0xbce7fb) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #7 tclAppInit(int&, char**, char const*, Tcl_Interp*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/Main.cc:374:5 (openroad+0xbd5234) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #8 ord::tclAppInit(Tcl_Interp*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/Main.cc:461:10 (openroad+0xbd5234)
    #9 Tcl_MainEx <null> (libtcl8.6.so+0xf0b18) (BuildId: 916dff5dad508fae0ecb6f5ad1f7afe65c294936)
    #10 __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 (libc.so.6+0x29d8f) (BuildId: 490fef8403240c91833978d494d39e537409b92e)

  Mutex M0 (0x7b5c000013d8) created at:
    #0 pthread_mutex_lock <null> (openroad+0xb6594a) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #1 __gthread_mutex_lock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:749:12 (openroad+0x10ce971) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #2 std::mutex::lock() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_mutex.h:100:17 (openroad+0x10ce971)
    #3 std::lock_guard<std::mutex>::lock_guard(std::mutex&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_mutex.h:229:19 (openroad+0x10ce971)
    #4 sta::Search::findTagGroup(sta::TagGroupBldr*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:2626:13 (openroad+0x10ce971)
    #5 sta::Search::setVertexArrivals(sta::Vertex*, sta::TagGroupBldr*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:2672:27 (openroad+0x10c5515) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #6 sta::Search::seedArrival(sta::Vertex*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:1433:5 (openroad+0x10c33f6) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #7 sta::Search::seedArrivals() /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:1397:5 (openroad+0x10c6834) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #8 sta::Search::findArrivalsSeed() /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:1030:5 (openroad+0x10c28b0) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #9 sta::Search::findArrivals1(int) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:1010:3 (openroad+0x10c63eb) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #10 sta::Search::findAllArrivals(bool) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:969:5 (openroad+0x10c1953) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #11 sta::Search::findAllArrivals() /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:958:3 (openroad+0x10c635a) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #12 sta::Sta::findRequired(sta::Vertex*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Sta.cc:3220:12 (openroad+0x10e87a2) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #13 sta::Sta::vertexSlack(sta::Vertex*, sta::MinMax const*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Sta.cc:3033:3 (openroad+0x10e7301) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #14 rsz::RepairSetup::repairSetup(float, double, int, bool, bool, bool, bool, bool) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/rsz/src/RepairSetup.cc:115:35 (openroad+0x2f80ab7) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #15 rsz::Resizer::repairSetup(double, double, int, bool, bool, bool, bool, bool) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/rsz/src/Resizer.cc:2743:18 (openroad+0x2f48b31) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #16 rsz::repair_setup(double, double, int, bool, bool, bool, bool, bool) /home/mliberty_openroad_tools/w2/tools/OpenROAD/tsan/src/rsz/src/CMakeFiles/rsz.dir/ResizerTCL_wrap.cxx:2182:12 (openroad+0xdde22e) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #17 _wrap_repair_setup(void*, Tcl_Interp*, int, Tcl_Obj* const*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/tsan/src/rsz/src/CMakeFiles/rsz.dir/ResizerTCL_wrap.cxx:4051:7 (openroad+0xde52c5) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #18 TclNRRunCallbacks <null> (libtcl8.6.so+0x3cd31) (BuildId: 916dff5dad508fae0ecb6f5ad1f7afe65c294936)
    #19 tclAppInit(int&, char**, char const*, Tcl_Interp*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/Main.cc:433:26 (openroad+0xbd58e9) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #20 ord::tclAppInit(Tcl_Interp*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/Main.cc:461:10 (openroad+0xbd58e9)
    #21 Tcl_MainEx <null> (libtcl8.6.so+0xf0b18) (BuildId: 916dff5dad508fae0ecb6f5ad1f7afe65c294936)
    #22 __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 (libc.so.6+0x29d8f) (BuildId: 490fef8403240c91833978d494d39e537409b92e)

  Thread T12 (tid=2227664, running) created by main thread at:
    #0 pthread_create <null> (openroad+0xb47dbd) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) <null> (libstdc++.so.6+0xdc328) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2)
    #2 sta::Sta::setThreadCount1(int) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Sta.cc:337:27 (openroad+0x10dd8e8) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #3 sta::Sta::setThreadCount(int) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Sta.cc:326:3 (openroad+0x10dd8e8)
    #4 ord::OpenRoad::setThreadCount(int, bool) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/OpenRoad.cc:572:9 (openroad+0xbd12b9) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #5 ord::set_thread_count(int) /home/mliberty_openroad_tools/w2/tools/OpenROAD/tsan/src/CMakeFiles/openroad_swig.dir/OpenRoadTCL_wrap.cxx:2281:8 (openroad+0xc32e40) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #6 _wrap_set_thread_count__SWIG_0(void*, Tcl_Interp*, int, Tcl_Obj* const*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/tsan/src/CMakeFiles/openroad_swig.dir/OpenRoadTCL_wrap.cxx:3689:7 (openroad+0xc32e40)
    #7 _wrap_set_thread_count(void*, Tcl_Interp*, int, Tcl_Obj* const*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/tsan/src/CMakeFiles/openroad_swig.dir/OpenRoadTCL_wrap.cxx:3757:14 (openroad+0xc32e40)
    #8 TclNRRunCallbacks <null> (libtcl8.6.so+0x3cd31) (BuildId: 916dff5dad508fae0ecb6f5ad1f7afe65c294936)
    #9 tclAppInit(int&, char**, char const*, Tcl_Interp*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/Main.cc:433:26 (openroad+0xbd58e9) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #10 ord::tclAppInit(Tcl_Interp*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/Main.cc:461:10 (openroad+0xbd58e9)
    #11 Tcl_MainEx <null> (libtcl8.6.so+0xf0b18) (BuildId: 916dff5dad508fae0ecb6f5ad1f7afe65c294936)
    #12 __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 (libc.so.6+0x29d8f) (BuildId: 490fef8403240c91833978d494d39e537409b92e)

  Thread T18 (tid=2227670, running) created by main thread at:
    #0 pthread_create <null> (openroad+0xb47dbd) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) <null> (libstdc++.so.6+0xdc328) (BuildId: e37fe1a879783838de78cbc8c80621fa685d58a2)
    #2 sta::Sta::setThreadCount1(int) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Sta.cc:337:27 (openroad+0x10dd8e8) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #3 sta::Sta::setThreadCount(int) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Sta.cc:326:3 (openroad+0x10dd8e8)
    #4 ord::OpenRoad::setThreadCount(int, bool) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/OpenRoad.cc:572:9 (openroad+0xbd12b9) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #5 ord::set_thread_count(int) /home/mliberty_openroad_tools/w2/tools/OpenROAD/tsan/src/CMakeFiles/openroad_swig.dir/OpenRoadTCL_wrap.cxx:2281:8 (openroad+0xc32e40) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #6 _wrap_set_thread_count__SWIG_0(void*, Tcl_Interp*, int, Tcl_Obj* const*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/tsan/src/CMakeFiles/openroad_swig.dir/OpenRoadTCL_wrap.cxx:3689:7 (openroad+0xc32e40)
    #7 _wrap_set_thread_count(void*, Tcl_Interp*, int, Tcl_Obj* const*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/tsan/src/CMakeFiles/openroad_swig.dir/OpenRoadTCL_wrap.cxx:3757:14 (openroad+0xc32e40)
    #8 TclNRRunCallbacks <null> (libtcl8.6.so+0x3cd31) (BuildId: 916dff5dad508fae0ecb6f5ad1f7afe65c294936)
    #9 tclAppInit(int&, char**, char const*, Tcl_Interp*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/Main.cc:433:26 (openroad+0xbd58e9) (BuildId: 2aa1101283e3b943062432b90eeea9e690ec72b6)
    #10 ord::tclAppInit(Tcl_Interp*) /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/Main.cc:461:10 (openroad+0xbd58e9)
    #11 Tcl_MainEx <null> (libtcl8.6.so+0xf0b18) (BuildId: 916dff5dad508fae0ecb6f5ad1f7afe65c294936)
    #12 __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 (libc.so.6+0x29d8f) (BuildId: 490fef8403240c91833978d494d39e537409b92e)

SUMMARY: ThreadSanitizer: data race /home/mliberty_openroad_tools/w2/tools/OpenROAD/src/sta/search/Search.cc:2650:19 in sta::Search::findTagGroup(sta::TagGroupBldr*)

You can build OR using cmake with TSAN=1 to reproduce this result. Then just run make in ORFS.

parallaxsw commented 2 weeks ago

Another user supplied a reliable test case and I am pretty certain this commit fixes the problem. e476cd6b threads seg fault