People have been reporting a lot of "wrong md5 checksum" errors, for example:

This issue comes from a very simple inconsistency:

  • The XML release file (that contains the md5 checksums) is cached by default for 24 hours,
  • The package file is cached by default only for 4 hours (for dev release)

That leaves a potential window of inconsistency of 20 hours during which the package file is tested against the wrong XML release file.

Solution: cache the XML release file and the package file the same amount of time.

Comments

moshe weitzman’s picture

Project: Drush » Project
Version: » 6.x-1.x-dev
Component: PM (dl, en, up ...) » Packages

Moving to project queue, packages component.

moshe weitzman’s picture

Project: Project » Drush
Version: 6.x-1.x-dev »
Component: Packages » Base system (internal API)
Assigned: Unassigned » moshe weitzman

oh wait - you mean drush caching. ok, assigning back. thanks for the research.

moshe weitzman’s picture

Status: Active » Fixed

Just committed a fix and big improvement. We now include the date of the dev snapshot in the cache key so we now safely cache dev snapshots for a year

Thanks again for the research, Damien.

dww’s picture

Thanks for the quick fix. For now, I've just hard-coded --no-cache when the d.o packaging system invokes drush, but we can experiment with ripping that back out once there's an official drush release that includes this fix (presumably 5.5).

Cheers,
-Derek

Damien Tournoud’s picture

That would work, thanks!

I think you should also consider reducing the general cache duration. Caching anything 24h or more seems highly excessive to me.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

moonray’s picture

Version: » 8.x-6.x-dev
Status: Closed (fixed) » Active

It's back.

sudo drush -v dl drush-8.x-6.x-dev --destination='/usr/local/share'

Initialized Drupal 7.21 root directory at /Users/balarama/Sites/memorialcare/docroot                          [notice]
Initialized Drupal site Sites at sites/default                                                                [notice]
Loading version_control engine.                                                                               [notice]
Loading package_handler engine.                                                                               [notice]
Executing: wget --version
Loading release_info engine.                                                                                  [notice]
Downloading release history from http://updates.drupal.org/release-history/drush/8.x                          [notice]
Executing: wget --version
Executing: wget -q --timeout=30 -O /private/tmp/download_fileJJytty http://updates.drupal.org/release-history/drush/8.x
Downloading project drush to /tmp/drush_tmp_1371217256_51bb1d682cf65 ...                                      [notice]
Executing: wget -q --timeout=30 -O /private/tmp/download_fileDnG86I 'http://ftp.drupal.org/files/projects/drush-8.x-6.x-dev.tar.gz?date=1371171266'
Downloading drush-8.x-6.x-dev.tar.gz_date=1371171266 was successful.                                          [notice]
File drush-8.x-6.x-dev.tar.gz_date=1371171266 is corrupt (wrong md5 checksum).                             [error]
Error downloading drush                                                                                       [notice]
Command dispatch complete                                                                                     [notice]
moshe weitzman’s picture

Assigned: moshe weitzman » Unassigned
Status: Active » Postponed (maintainer needs more info)

Just worked for me.

~/tmp$ drush -v dl drush-8.x-6.x-dev
Loading version_control engine.                                         [notice]
Loading package_handler engine.                                         [notice]
Executing: wget --version
Loading release_info engine.                                            [notice]
Downloading release history from                                        [notice]
http://updates.drupal.org/release-history/drush/8.x
Executing: wget --version
Executing: wget -q --timeout=30 -O /Users/moshe.weitzman/tmp/download_fileFSgfcr http://updates.drupal.org/release-history/drush/8.x
Downloading project drush to                                            [notice]
/Users/moshe.weitzman/tmp/drush_tmp_1374423517_51ec09dd33b4d ...
Executing: wget -q --timeout=30 -O /Users/moshe.weitzman/tmp/download_fileA0azgz 'http://ftp.drupal.org/files/projects/drush-8.x-6.x-dev.tar.gz?date=1374411914'
Downloading drush-8.x-6.x-dev.tar.gz_date=1374411914 was successful.    [notice]
Md5 checksum of drush-8.x-6.x-dev.tar.gz_date=1374411914 verified.      [notice]
Mime type for                                                           [notice]
/Users/moshe.weitzman/tmp/drush_tmp_1374423517_51ec09dd33b4d/drush-8.x-6.x-dev.tar.gz_date=1374411914
is application/x-gzip
Executing: tar -C /Users/moshe.weitzman/tmp/drush_tmp_1374423517_51ec09dd33b4d -xzf 'drush-8.x-6.x-dev.tar.gz_date=1374411914'
Executing: tar -tzf 'drush-8.x-6.x-dev.tar.gz_date=1374411914'
Executing: svn info /Users/moshe.weitzman/tmp
Executing: bzr root /Users/moshe.weitzman/tmp
Project drush (8.x-6.x-dev) downloaded to                            [success]
/Users/moshe.weitzman/tmp/drush.
Project drush contains 0 modules: .
Command dispatch complete                                               [notice]
greg.1.anderson’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.