MikePopoloski / slang

SystemVerilog compiler and language services
MIT License
546 stars 114 forks source link

tools/netlist unittest failure for v6.0 package release #967

Closed jrudess closed 3 weeks ago

jrudess commented 3 weeks ago

The packaging process for Arch runs ctest, and while prepping the new 6.0 tag for a package update, the netlist DepthFirstSearchTests has a failure:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
netlist_unittests is a Catch2 v3.5.3 host application.
Run with -? for options

-------------------------------------------------------------------------------
Depth-first search with an edge predicate
-------------------------------------------------------------------------------
/home/jrudess/repos/slang-verilog/src/slang-6.0/tools/netlist/tests/DepthFirstSearchTests.cpp:94
...............................................................................

/home/jrudess/repos/slang-verilog/src/slang-6.0/tools/netlist/tests/DepthFirstSearchTests.cpp:111: FAILED:
  CHECK( *visitor.nodes[1] == n2 )
with expansion:
  {  } == {  }

/home/jrudess/repos/slang-verilog/src/slang-6.0/tools/netlist/tests/DepthFirstSearchTests.cpp:112: FAILED:
  CHECK( *visitor.nodes[2] == n4 )
with expansion:
  {  } == {  }

===============================================================================
test cases:  41 |  40 passed | 1 failed
assertions: 280 | 278 passed | 2 failed
MikePopoloski commented 3 weeks ago

Hmm weird, the CI builds run all the tests via ctest as well. Somehow this is specific to Arch? Or it's non-deterministic behavior in the test that just so happens to work on all the CI runners.

jrudess commented 3 weeks ago

Just noticed that 'unittests' is failing also with a timeout at 60s. I'll debug the failures more this week.

gcc = 13.2.1 cmake = 3.29.2

cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCPACK_PACKAGE_NAME=svlang -DCPACK_PACKAGE_INSTALL_DIRECTORY=svlang -DCMAKE_PROJECT_NAME=svlang ..
yanggeorge commented 3 weeks ago

I have tried gcc-11-release and macos-release presets, and all tests of unittests and netlist_unittests passed.

gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) cmake 3.22.1 clang version 17.0.4 (x86_64-apple-darwin23.4.0) cmake 3.27.4

jrudess commented 3 weeks ago

I can clone, build, run all tests fine when done manually. The problem only starts once the build process is wrapped inside the Arch packaging flow. I will track down (eventually) what is causing a difference between build environments. If I can concretely identify a compile or linker switch that reproduces this behavior, then will reopen.