Fatal Error: test_bitcoin.exe --run_test=system_tests Built in Visual Studio Community 2019 #23775

issue Tru3Nrg opened this issue on December 14, 2021
  1. Tru3Nrg commented at 7:00 PM on December 14, 2021: none

    OS: Microsoft Windows 10 Pro Version: 10.0.19042 Build 19042 Compiler: Microsoft Visual Studio Community 2019 Version 16.11.7 VisualStudio.16.Release/16.11.7+31911.196 Microsoft .NET Framework Version 4.8.04084

    Running into a fatal error while launching test_bitcoin.exe from the “x64 Native Tools Command Prompt for VS 2019”. All unit tests pass except system_tests.cpp Followed the work around found here however it did work for me

    Expected behavior

    *** No errors detected

    Actual behavior

    Unit Test failure: Using test_bitcoin.exe –run_test=system_tests Running 2 test cases... unknown location(0): fatal error: in "system_tests/run_command": struct boost::process::process_error: CreateProcess failed: The system cannot find the file specified. C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(57): last checkpoint

    *** 1 failure is detected in the test module "Bitcoin Core Test Suite"

    To reproduce

    After successfully building bitcoin, using the Visual Studio instructions, and using the recommended qt installation found here. Launch test_bitcoin.exe from the command prompt it said “Running 480 test cases…” It gets to about 70% progress and then raises the following error: unknown location(0): fatal error: in "system_tests/run_command": struct boost::process::process_error: CreateProcess failed: The system cannot find the file specified. C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(57): last checkpoint

    System information

    Bitcoin Core version v22.99.0-unk (release build) Microsoft Windows 10 Pro Version: 10.0.19042 Build 19042 Processor Intel(R) Core(TM) i9-10980HK CPU @ 2.40GHz 3.10 GHz Installed RAM 32.0 GB (31.8 GB usable) System type 64-bit operating system, x64-based processor

    Got the following log using test_bitcoin.exe --log_level=all --run_test=system_tests -- DEBUG_LOG_OUT C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(20): Entering test suite "system_tests" C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(24): Entering test case "dummy" 2021-12-14T18:15:23Z Seed: Setting random seed for current tests to RANDOM_CTX_SEED=6dc868e8ff757d5e7085cea6f6549936c30016d1bb4d5103f4a9996ae8422ba4 2021-12-14T18:15:23.779590Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\init\common.cpp:165] [LogPackageVersion] Bitcoin Core version v22.99.0-unk (release build) 2021-12-14T18:15:23.780011Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\init.cpp:908] [AppInitParameterInteraction] Assuming ancestors of block 00000000000000000008a89e854d57e5667df88f1cdef6fde2fbca1de5b639ad have valid signatures. 2021-12-14T18:15:23.780033Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\init.cpp:921] [AppInitParameterInteraction] Setting nMinimumChainWork=00000000000000000000000000000000000000001fa4663bbbe19f82de910280 2021-12-14T18:15:23.793752Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\script\sigcache.cpp:102] [InitSignatureCache] Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements 2021-12-14T18:15:23.802791Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\validation.cpp:1336] [InitScriptExecutionCache] Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements C:/Users/Luis/Documents/GitHub/bitcoin/src/test/system_tests.cpp(26): info: check true has passed C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(24): Leaving test case "dummy"; testing time: 27542us C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(53): Entering test case "run_command" 2021-12-14T18:15:23.807676Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\test\util\setup_common.cpp:68] [Seed] Seed: Setting random seed for current tests to RANDOM_CTX_SEED=6dc868e8ff757d5e7085cea6f6549936c30016d1bb4d5103f4a9996ae8422ba4 2021-12-14T18:15:23.807847Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\init\common.cpp:165] [LogPackageVersion] Bitcoin Core version v22.99.0-unk (release build) 2021-12-14T18:15:23.808225Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\init.cpp:908] [AppInitParameterInteraction] Assuming ancestors of block 00000000000000000008a89e854d57e5667df88f1cdef6fde2fbca1de5b639ad have valid signatures. 2021-12-14T18:15:23.808246Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\init.cpp:921] [AppInitParameterInteraction] Setting nMinimumChainWork=00000000000000000000000000000000000000001fa4663bbbe19f82de910280 2021-12-14T18:15:23.813864Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\script\sigcache.cpp:102] [InitSignatureCache] Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements 2021-12-14T18:15:23.814885Z [C:\Users\Admin\Documents\GitHub\bitcoin\src\validation.cpp:1336] [InitScriptExecutionCache] Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements C:/Users/Luis/Documents/GitHub/bitcoin/src/test/system_tests.cpp(57): info: check result.isNull() has passed unknown location(0): fatal error: in "system_tests/run_command": struct boost::process::process_error: CreateProcess failed: The system cannot find the file specified. C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(57): last checkpoint C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(53): Leaving test case "run_command"; testing time: 15247us C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(20): Leaving test suite "system_tests"; testing time: 45447us

  2. Tru3Nrg added the label Bug on Dec 14, 2021
  3. fanquake commented at 9:24 AM on December 15, 2021: member
  4. fanquake added the label Windows on Dec 15, 2021
  5. sipsorcery commented at 10:02 AM on December 15, 2021: member

    I recall some unit tests that have always failed on Windows. I hazily recall it being due to paths or the way some of the python scripts spawn/kill processes (some of the tests fire up mutliple instances of bitcoind.exe).

    I'll be able to take a closer look later on this evening.

  6. hebasto commented at 10:38 AM on December 15, 2021: member

    Fix is coming...

  7. hebasto commented at 12:49 PM on December 15, 2021: member

    @Tru3Nrg

    Mind testing #23781?

    Running into a fatal error while launching test_bitcoin.exe from the “x64 Native Tools Command Prompt for VS 2019”.

    Actually, “x64 Native Tools Command Prompt for VS 2019” is required only when building Qt package.


    @sipsorcery

    I recall some unit tests that have always failed on Windows. I hazily recall it being due to paths or the way some of the python scripts spawn/kill processes (some of the tests fire up mutliple instances of bitcoind.exe).

    I'll be able to take a closer look later on this evening.

    TBH, I'm not sure #23781 is the optimal solution. The main reason is that the unit tests pass in CI even for master.

  8. Tru3Nrg commented at 11:10 PM on December 15, 2021: none

    @hebasto

    Did test #23781 and it returned the following: C:\Users\Admin\Documents\GitHub\bitcoin\build_msvc>x64\Release\test_bitcoin.exe --run_test=system_tests/run_command Running 1 test case... unknown location(0): fatal error: in "system_tests/run_command": struct boost::process::process_error: CreateProcess failed: The system cannot find the file specified. C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(57): last checkpoint

  9. hebasto commented at 7:47 AM on December 16, 2021: member

    @hebasto

    Did test #23781 and it returned the following: C:\Users\Admin\Documents\GitHub\bitcoin\build_msvc>x64\Release\test_bitcoin.exe --run_test=system_tests/run_command Running 1 test case... unknown location(0): fatal error: in "system_tests/run_command": struct boost::process::process_error: CreateProcess failed: The system cannot find the file specified. C:\Users\Admin\Documents\GitHub\bitcoin\src\test\system_tests.cpp(57): last checkpoint

    Hmm, cannot reproduce it:

    >git rev-parse HEAD
    edd0313ae7c94420642081c9172e349080bb9335
    
    >git clean -xdff
    >python build_msvc\msvc-autogen.py
    >msbuild -property:Configuration=Release -maxCpuCount -verbosity:minimal build_msvc\bitcoin.sln
    >src\test_bitcoin.exe
    
  10. Tru3Nrg commented at 9:13 PM on December 16, 2021: none

    @hebasto So after replacing the systems_tests.cpp with the file found in edd0313, test_bitcoin.exe --run_test=system_tests passed with no errors did the following:

    >py -3 build_msvc\msvc-autogen.py
    
    >msbuild -property:Configuration=Release -maxCpuCount -verbosity:minimal build_msvc\bitcoin.sln
    
    >x64\Release\test_bitcoin.exe --run_test=system_tests
    Running 2 test cases...
    
    *** No errors detected
    
    >x64\Release\test_bitcoin.exe
    Running 484 test cases...
    
    *** No errors detected
    
    
  11. sipsorcery commented at 9:18 PM on December 16, 2021: member

    @Tru3Nrg feel free to give @hebasto's PR an ACK or t(ested)ACK if it solves the issue and you believe it's good for the codebase.

  12. Tru3Nrg commented at 1:08 AM on December 17, 2021: none

    @sipsorcery

    @Tru3Nrg feel free to give @hebasto's PR an ACK or t(ested)ACK if it solves the issue and you believe it's good for the codebase.

    thanks for the reminder. Added tACK to @hebasto's PR. I believe this issue can be closed.

  13. Tru3Nrg closed this on Dec 17, 2021

  14. laanwj referenced this in commit 1220af5e6d on Dec 18, 2021
  15. sidhujag referenced this in commit 0032e8fec9 on Dec 18, 2021
  16. DrahtBot locked this on Dec 17, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 03:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me