Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-15630

Build using Coverity Plugin fails because /tmp/.covlk file exists (Multiple jobs on executor)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • coverity-plugin
    • None
    • Coverity Plugin 1.1.3
      Coverity Version 5.5.3 (though this happens on the previous version as well)
      Jenkins 1.447.1 (LTS Jenkins Enterprise)
      10.04 Ubuntu LTS 1 64 bit

      I'm encountering a recurring issue when running Jenkins builds that utilize the Coverity Plugin. I have 8 Jobs that use Coverity and 4 executors to run them on. Occasionally 2 Jobs execute on the same executor and I get an error in Coverity:

      [send_data] $ /usr/local/coverity-integrity-center/static-analysis/bin/cov-build --dir /var/lib/jenkins/coverity/temp-8397632612055929334.tmp --config /var/lib/jenkins/coverity/gcc-config.xml /bin/sh -xe /tmp/hudson9177997551113715078.sh
      /tmp/.covlk: File exists
      Error creating or opening lock file for: /var/lib/jenkins/coverity/temp-8397632612055929334.tmp/c/emit
      Cannot protect emit DB creation.

      Coverity seems to create some kind of lock when cov-build is running to prevent multiple instances running at a time. I suppose there could be several good reasons for doing this (licensing, any kind of common generated data, etc.). I'm wondering if maybe the plugin should have it's own lock when cov-build is being executed to prevent multiple Jobs on an executor from running cov-build at the same time.

      It seems like a pretty trivial change, so I'll try it out, but I don't know if it's the right kind of fix. Perhaps this problem is unique to our coverity install. Thought I'd see if anyone else has encountered this as well.

      Thanks!
      Andy

            joshvinson Josh Vinson
            atolber Andrew Tolbert
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: