test: minisketch decode returns empty optional #24664

issue omkar-mohanty opened this issue on March 25, 2022
  1. omkar-mohanty commented at 6:12 AM on March 25, 2022: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! Any report, issue or feature request related to the GUI should be reported at https://github.com/bitcoin-core/gui/issues/ -->

    <!-- Describe the issue -->

    Running src/test/minisketch_test.cpp gives fatal error.

    <!--- What behavior did you expect? -->

    What behavior did you expect? All tests pass

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    What was the actual behavior (provide screenshots if the issue is GUI-related)?

    ./test_bitcoin --run_test=minisketch_tests
    Running 1 test case...
    unknown location(0): fatal error: in "minisketch_tests/minisketch_test": C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\optional(370) : Assertion failed: Cannot access value of empty optional
    

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    How reliably can you reproduce the issue, what are the steps to do so?

    1. Build test_bitcoin project using visual studio 2022.
    2. run ./test_bitcoin --run_test=minisketch_tests

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? compiled src/tests/minisketch_tests.cpp from master branch using msvc compiler from Visual Studio 2022.

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    What type of machine are you observing the error on (OS/CPU and disk type)? OS: Windows 10 Home Disk: 500GB SSD RAM: 16GB

    <!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

  2. MarcoFalke added the label Windows on Mar 25, 2022
  3. MarcoFalke added the label Tests on Mar 25, 2022
  4. MarcoFalke commented at 6:26 AM on March 25, 2022: member

    What commit are you on? Can you try to get a traceback or at least the line number where this happens?

  5. omkar-mohanty commented at 6:34 AM on March 25, 2022: none

    Hello @MarcoFalke I suspect this happens in BOOST_CHECK(dec.has_value()); in src/test/minisketch_tests.cpp
    In commit: 98e9d8e8e2e3e65e6f1e14be26457a9f9090c092

  6. MarcoFalke commented at 6:40 AM on March 25, 2022: member

    No, it looks like the assertion happens inside the msvc optional header. has_value shouldn't assert nor throw, so this should be a value() call (or the */-> operator).

  7. omkar-mohanty commented at 7:05 AM on March 25, 2022: none

    Yeah error happens in the msvc header more specifically this fatal error: in "minisketch_tests/minisketch_test": C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\optional(370) : Assertion failed: Cannot access value of empty optional occurs so I guess this a compiler problem ?

  8. bitcoin deleted a comment on Mar 25, 2022
  9. MarcoFalke commented at 11:52 AM on August 3, 2022: member

    We recently bumped our docs to Windows 2022 and CI is passing on those. So is this still an issue with a recent version of Bitcoin Core?

  10. fanquake commented at 7:46 AM on August 9, 2022: member

    @sipsorcery can you confirm that this is fixed / can be closed?

  11. sipsorcery commented at 8:35 PM on August 9, 2022: member

    Seems fixed:

    build_msvc\x64\Release>test_bitcoin --run_test=minisketch_tests
    Running 1 test case...
    *** No errors detected  
    

    Test fails on a debug build but as far as I recall the tests have always failed on Windows debug builds and anyway that would be a different issue to the one posted here.

  12. fanquake closed this on Aug 9, 2022

  13. bitcoin locked this on Aug 9, 2023

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