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. hebasto commented at 6:58 pm on June 18, 2020: member
    Concept ACK.
  6. DrahtBot commented at 2:37 am on June 19, 2020: member

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

    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.

  7. 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?
  8. 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

    0ci/test/00_setup_env.sh:export MAKEJOBS=${MAKEJOBS:--j4}
    
  9. hebasto commented at 8:37 am on June 19, 2020: member
  10. 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

  11. 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.

  12. 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.
  13. hebasto approved
  14. hebasto commented at 1:22 pm on June 19, 2020: member
    ACK fa2eb3d5d6819e42bfcec8a9f02b99438fe718b9
  15. MarcoFalke merged this on Jun 19, 2020
  16. MarcoFalke closed this on Jun 19, 2020

  17. MarcoFalke deleted the branch on Jun 20, 2020
  18. MarcoFalke referenced this in commit 3276c148c4 on Jul 3, 2020
  19. DrahtBot 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: 2024-12-18 18:12 UTC

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