Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6323

Deadlock in multithreaded dependency resolution

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5.2
    • 3.5.3
    • None
    • None

    Description

      Maven 3.5.2 multithreaded builds experience a deadlock not seen with Maven 3.5.0.

      To reproduce the issue, clone GeoServer:

      git clone https://github.com/geoserver/geoserver.git
      cd geoserver
      

      Build GeoServer community modules with:

      mvn -f src/community/pom.xml -B -T4 -U -Prelease -PcommunityRelease -DskipTests clean install
      

      Builds that normally take 2-4 minutes instead experience long hangs. jstack output (attached) suggests a deadlock (two different hangs attached). Some of the locks are in TIME_WAIT and eventually the build completes after 30-45 minutes, but this is enough to cause builds on Travis to be killed for their failure to output for ten minutes. (Travis upgraded to Maven 3.5.2 a week ago.)

      I have only seen the failures with -U. The hang does not occur in single-threaded builds. There are no "*.lock" files in the local repository during the hang so the deadlocks are not mediated by the filesystem. CPU utilisation is zero suggesting a deadlock not a livelock.

      See also discussion on the geoserver-devel mailing list: http://osgeo-org.1560.x6.nabble.com/Travis-failures-started-with-new-trusty-images-td5346836.html

      Attachments

        1. geoserver-community-maven-hang-jstack-2.txt
          28 kB
          Ben Caradoc-Davies
        2. geoserver-community-maven-hang-jstack.txt
          19 kB
          Ben Caradoc-Davies

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              bencaradocdavies Ben Caradoc-Davies
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: