IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 17 years ago

Closed 17 years ago

#1343 closed defect (fixed)

md5sum for file in data store set to zero

Reported by: bills Owned by: bills
Priority: normal Milestone:
Component: distribution Version: current
Severity: normal Keywords:
Cc:

Description

A user encountered two problems downloading two files from the data store

failure for: receive_file.pl --file_id 256751 --source
http://datastore.ipp.ifa.hawaii.edu --product ps1-md --fileset stack.35255.50330.23
--fileset_id 6771 --file dirinfo.stack.35255.mdc --component dirinfo --bytes 117 --md5 0
--workdir /autofs/diskarray5/ps1/ps1-md/ --dirinfo NULL --dbname ps1_md --verbose

failure for: receive_file.pl --file_id 256754 --source
http://datastore.ipp.ifa.hawaii.edu --product ps1-md --fileset stack.35217.50299.23
--fileset_id 6772 --file dirinfo.stack.35217.mdc --component dirinfo --bytes 117 --md5 0
--workdir /autofs/diskarray5/ps1/ps1-md/ --dirinfo NULL --dbname ps1_md --verbose

The md5sum for the dirinfo files was zero.
dist_make_fileset.pl leaves the md5sum blank in the fileset list file. That causes dsreg to compute it.

Change History (2)

comment:1 by bills, 17 years ago

Owner: changed from bills@… to bills
Status: newassigned

dsreg doesn't check the return value when it calls the function file_md5_hex from the
module Digest::MD5::File to compute the md5sum.

The module documentation says that the program will die if the file doesn't exist
but doesn't say what happens on a read error. (0 is never a valid md5sum)

file_* functions
       Get the digest in variouse formats of $file.  If file does not exist or
       is a directory it croaks (See NOFATALS for more info)

           my $digest = file_md5($file) or warn "$file failed: $!";
           my $digest = file_md5_hex($file) or warn "$file failed: $!";
           my $digest = file_md5_base64($file) or warn "$file failed: $!";


The file does exist it's size is checked a few lines before in dsreg. The size
in the database was correct.
At any rate, I'm changing dsreg to die if !md5sum.

comment:2 by bills, 17 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.