fuzz: fix timeout in `crypto_fschacha20poly1305` #30725

pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2024-08-fix-timeout-cryptochacha changing 1 files +1 −1
  1. brunoerg commented at 2:39 PM on August 27, 2024: contributor

    Fixes #30505

    This PR fixes a timeout in crypto_fschacha20poly1305 by reducing the number of iterations. I left it running for a while and noticed it speeds up the target and do not impact coverage.

  2. fuzz: fix timeout in `crypto_fschacha20poly1305` 8dec4e1294
  3. DrahtBot commented at 2:39 PM on August 27, 2024: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, stratospher

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label Tests on Aug 27, 2024
  5. brunoerg commented at 2:46 PM on August 27, 2024: contributor

    I think it can be tested by replacing the ConsumeBool() to true which causes a timeout quickly.

    --- a/src/test/fuzz/crypto_chacha20poly1305.cpp
    +++ b/src/test/fuzz/crypto_chacha20poly1305.cpp
    @@ -130,7 +130,7 @@ FUZZ_TARGET(crypto_fschacha20poly1305)
         // data).
         InsecureRandomContext rng(provider.ConsumeIntegral<uint64_t>());
     
    -    LIMITED_WHILE(provider.ConsumeBool(), 10000)
    +    LIMITED_WHILE(true, 10000)
         {
             // Mode:
    

    Maybe this is a way to know whether a harness can have a possible timeout issue? cc: @maflcko

  6. maflcko commented at 3:01 PM on August 27, 2024: member

    Please cross-link to the issue (https://github.com/bitcoin/bitcoin/issues/30505)

  7. maflcko requested review from stratospher on Aug 27, 2024
  8. maflcko commented at 3:50 PM on August 27, 2024: member

    lgtm ACK 8dec4e1294a6c6895b4fe23f38cd067dc8f2352f

  9. maflcko commented at 3:52 PM on August 27, 2024: member

    https://cirrus-ci.com/task/6004238088667136?logs=ci#L5367

    crypto_fschacha20poly1305                [#83](/bitcoin-bitcoin/83/)	DONE   cov: 3202 ft: 21189 corp: 80/12762b lim: 1368 exec/s: 2 rss: 119Mb
    

    https://cirrus-ci.com/task/6249653828583424?logs=ci#L5217

    crypto_fschacha20poly1305                [#83](/bitcoin-bitcoin/83/)	DONE   cov: 3202 ft: 21417 corp: 80/12762b lim: 1368 exec/s: 1 rss: 121Mb
    
  10. brunoerg commented at 5:17 PM on August 27, 2024: contributor
  11. stratospher commented at 7:07 PM on August 27, 2024: contributor

    Concept ACK. (running it locally, will ACK after that!) did you check if the timeout happens in crypto_aeadchacha20poly1305 too?

  12. brunoerg commented at 9:14 PM on August 27, 2024: contributor

    did you check if the timeout happens in crypto_aeadchacha20poly1305 too?

    I think we did not have an issue with that yet, but anyway, I'll investigate it and follow-up.

  13. stratospher commented at 4:11 AM on August 28, 2024: contributor

    ACK 8dec4e1. saw similar coverage stats (these are from different machines, saw more similar from same machine).

    1. on branch #3974498 REDUCE cov: 544 ft: 3788 corp: 250/22Kb lim: 4096 exec/s: 124 rss: 538Mb L: 95/573 MS: 5 ChangeByte-ChangeByte-EraseBytes-ChangeBinInt-InsertByte-
    2. on master #3975366 REDUCE cov: 571 ft: 3993 corp: 279/51Kb lim: 4096 exec/s: 148 rss: 829Mb L: 3009/3818 MS: 1 EraseBytes-
  14. fanquake merged this on Aug 28, 2024
  15. fanquake closed this on Aug 28, 2024

  16. bitcoin locked this on Aug 28, 2025

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-24 09:13 UTC

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