jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-4742

Multi-threaded artifact resolver corrupts artifacts on download

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.2.1
  • Fix Version/s: Issues to be reviewed for 3.x
  • Component/s: Artifacts and Repositories
  • Labels:
    None
  • Environment:
    Windows XP, JDK 1.6, Maven 2.2.1
  • Complexity:
    Intermediate

Description

It seems that the artifact resolver is not thread-safe, resulting in corruption of artifacts as they are downloaded.

We have a large build and were seeing numerous CHECKSUM failures, even on Maven jars from Central. On closer inspection, the downloaded JARs themselves appeared corrupted, i.e. it wasn't just corrupt checksums. The other funny thing was that, for each build, it happened on random, different JARs. This happened on JARs from any repository (public, or our own Nexus repo), so it had nothing to do with possible corruptions of our own jars on deploy.

We first tried all the suggestions on the Net, including setting the wagon provider to httpclient. Nothing worked. Then we found the answer:

-Dmaven.artifact.threads=1

As soon as you restrict the artifact resolver to a single thread, the problem goes away (apparently the Maven default is to use up to 5 threads). This looks like a thread-safety issue, with threads perhaps overwriting each other's streams.

What I don't understand is that this bug hasn't surfaced earlier, since we have a standard Maven installation. Note that it happens even when not using Nexus, i.e. when going directly to public repositories.

Issue Links

depends upon

Bug - A problem which impairs or prevents the functions of the product. MNG-4301 Invalid checksums on deploy when using webdav without extension

  • Blocker - Blocks development and/or testing work, production could not run
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Chris Tanger added a comment - 06/Jun/11 3:31 PM

MNG-4301 can cause same apparent effects, that is CHECKSUM failures.
In this(MNG-4742) issue however actual artifact corruption is taking place.

Show
Chris Tanger added a comment - 06/Jun/11 3:31 PM MNG-4301 can cause same apparent effects, that is CHECKSUM failures. In this(MNG-4742) issue however actual artifact corruption is taking place.
Hide
Permalink
Chris Tanger added a comment - 06/Jun/11 3:32 PM

Oops, I meant to link as "related to" not depends upon but can't fix it.

Show
Chris Tanger added a comment - 06/Jun/11 3:32 PM Oops, I meant to link as "related to" not depends upon but can't fix it.

People

  • Assignee:
    Unassigned
    Reporter:
    Cornel Masson
Vote (2)
Watch (8)

Dates

  • Created:
    27/Jul/10 11:23 AM
    Updated:
    06/Jun/11 3:32 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.