ci: Run asan ci config on cirrus #19321

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2006-ciCirrusAsan changing 2 files +38 −21
  1. MarcoFalke commented at 6:43 PM on June 18, 2020: member

    Currently it is not possible to use travis in forked repositories due to the 50 minute limit on builds. A fresh build (uncached) of the address sanitizer config takes more than 50 minutes.

    One approach to fix this could be to throw away tests until the run time is less than 50 minutes. However, the risk of being blind of failures in the thrown away tests is not worth the gain. Also, to detect them, one has to run the asan configuration nightly and failures could only be detected post-merge.

    Another approach would be to ask travis support to raise the limit for a forked repository. This is a tedious and manual one-by-one process, so I'd rather not.

    Finally, a different ci provider can be used, since the config files are designed to be platform-agnostic. This is what I picked.

    I kept all settings identical to the travis machine for now. Both providers run in the google cloud, so this should be a "move-only".

  2. cirrus: Clear dummy task fa93527738
  3. ci: Run asan ci config on cirrus fa2eb3d5d6
  4. MarcoFalke added the label Tests on Jun 18, 2020
  5. MarcoFalke cross-referenced this on Jun 18, 2020 from issue Activate travis in this repo by MarcoFalke
  6. hebasto commented at 6:58 PM on June 18, 2020: member

    Concept ACK.

  7. DrahtBot commented at 2:37 AM on June 19, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #19267 (ci: Upgrade most ci configs to focal by MarcoFalke)
    • #19183 ([WIP DONOTMERGE] Replace boost with C++17 by MarcoFalke)
    • #19179 ([WIP RFC DONOTMERGE] ci: Run ci configs on cirrus by MarcoFalke)
    • #18288 (build: Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory by practicalswift)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  8. DrahtBot cross-referenced this on Jun 19, 2020 from issue ci: Upgrade most ci configs to focal by MarcoFalke
  9. DrahtBot cross-referenced this on Jun 19, 2020 from issue ci: Run ci configs on cirrus by MarcoFalke
  10. DrahtBot cross-referenced this on Jun 19, 2020 from issue build: Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory by practicalswift
  11. in .cirrus.yml:54 in fa2eb3d5d6
      46 | @@ -14,3 +47,10 @@
      47 |  #  install_script:
      48 |  #    - choco install python --version=3.7.7 -y
      49 |  
      50 | +task:
      51 | +  name: 'x86_64 Linux  [GOAL: install]  [bionic]  [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]'
      52 | +  << : *GLOBAL_TASK_TEMPLATE
      53 | +  container:
      54 | +    image: ubuntu:bionic
    


    hebasto commented at 8:06 AM on June 19, 2020:

    Since this task is one of those that require the greatest amount of time to complete, is it worth to increase the number of the dedicated CPUs, say from 2 to 3 or 4?

  12. in .cirrus.yml:10 in fa2eb3d5d6
       5 | +  # Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
       6 | +  cpu: 2
       7 | +  memory: 6G  # https://cirrus-ci.org/guide/linux/#linux-containers
       8 | +env:
       9 | +  PACKAGE_MANAGER_INSTALL : "apt-get update && apt-get install -y"
      10 | +  MAKEJOBS: "-j4"
    


    hebasto commented at 8:10 AM on June 19, 2020:

    This setting does not corresponds with cpu: 2, no?


    MarcoFalke commented at 1:17 PM on June 19, 2020:

    Everything should be identical to what it is on travis (except the timeout)

    This is the default value, see

    ci/test/00_setup_env.sh:export MAKEJOBS=${MAKEJOBS:--j4}
    
  13. hebasto commented at 8:37 AM on June 19, 2020: member
  14. hebasto commented at 9:34 AM on June 19, 2020: member

    I've observed "Automatic Re-Run" behavior of Cirrus CI. Did not find its description in the docs. It seems undesirable feature for me.

    https://cirrus-ci.com/task/5162471981842432 Screenshot from 2020-06-19 13-41-35

  15. hebasto commented at 9:41 AM on June 19, 2020: member

    Tested on forked repo -- works as expected.

    Also tested on forked repo with disabled UBSan suppressions -- errors are catched by UBSan: https://cirrus-ci.com/task/6376713561047040

    Also the 03_before_install.sh should be untied from Travis in a followup.

  16. MarcoFalke commented at 1:20 PM on June 19, 2020: member

    automatic re-run should only happen if an error occurs outside our ci script. For example, a network failure to fetch the repo from GitHub or when the preemptible google vm that cirrus is using gets killed.

  17. hebasto approved
  18. hebasto commented at 1:22 PM on June 19, 2020: member

    ACK fa2eb3d5d6819e42bfcec8a9f02b99438fe718b9

  19. DrahtBot cross-referenced this on Jun 19, 2020 from issue [WIP DONOTMERGE] Replace boost with C++17 (std::shared_mutex) by MarcoFalke
  20. MarcoFalke merged this on Jun 19, 2020
  21. MarcoFalke closed this on Jun 19, 2020

  22. Sjors cross-referenced this on Jun 19, 2020 from issue PSA: ASan Travis instance always times out, rebase by Sjors
  23. hebasto cross-referenced this on Jun 20, 2020 from issue ci: Cirrus CI logs availabilty by hebasto
  24. hebasto cross-referenced this on Jun 20, 2020 from issue Cirrus CI spurious (?) test failure by Sjors
  25. MarcoFalke deleted the branch on Jun 20, 2020
  26. MarcoFalke cross-referenced this on Jun 24, 2020 from issue test: Tsan times out on travis, move to cirrus by MarcoFalke
  27. MarcoFalke cross-referenced this on Jul 1, 2020 from issue ci: Run tsan ci config on cirrus by MarcoFalke
  28. MarcoFalke referenced this in commit 3276c148c4 on Jul 3, 2020
  29. bitcoin locked this on Feb 15, 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-05-19 06:53 UTC