Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-25914

Investigate sporadic failures in coverage.py

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: jenkins, sconsUtils
    • Labels:
      None
    • Team:
      Architecture
    • Urgent?:
      No

      Description

      From time to time (used to be less than once a month, but now we've had several failures in the last few weeks), we get errors in coverage.py like:

      INTERNALERROR> coverage.misc.CoverageException: Couldn't use data file '/j/ws/scipipe/lsst_distrib/adacff179f/lsstsw/build/base/.coverage.cb1b93ad0284.83365.194071': no such table: file

      The meta table is also implicated sometimes. Each such failure kills the build.

      The file in question is a SQLite database. When checked after the failure, the file does contain the table, suggesting that this is a race condition.

      Find and fix the problem.

        Attachments

          Activity

          Show
          swinbank John Swinbank added a comment - Seen in #32386 on Mac: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/32386/pipeline
          Hide
          tjenness Tim Jenness added a comment -

          Looks like it's a race condition between xdist and pytest-cov. It mostly works but the coverage people seem to be saying it's not their problem. They suggested one fix of patching every setup.cfg. The other option we have is to disable coverage for multiprocessing testing and only turn on coverage in sconsUtils for single process testing.

          Show
          tjenness Tim Jenness added a comment - Looks like it's a race condition between xdist and pytest-cov. It mostly works but the coverage people seem to be saying it's not their problem. They suggested one fix of patching every setup.cfg. The other option we have is to disable coverage for multiprocessing testing and only turn on coverage in sconsUtils for single process testing.
          Hide
          ktl Kian-Tat Lim added a comment -

          I now believe this is a race between pySingles tests and the auto-discovered pytest-cov tests, since it only appears to happen in packages that have the former.

          Attempting to fix by sequentially executing the pySingles tests before the auto-discovered ones.

          Show
          ktl Kian-Tat Lim added a comment - I now believe this is a race between pySingles tests and the auto-discovered pytest-cov tests, since it only appears to happen in packages that have the former. Attempting to fix by sequentially executing the pySingles tests before the auto-discovered ones.
          Show
          ktl Kian-Tat Lim added a comment - Jenkins https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/33030 passed.

            People

            Assignee:
            ktl Kian-Tat Lim
            Reporter:
            ktl Kian-Tat Lim
            Reviewers:
            Tim Jenness
            Watchers:
            John Swinbank, Kian-Tat Lim, Tim Jenness
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.