The routine globus_l_gass_copy_cksm_file in globus_gass_copy_glob.c
has a file read loop
while((n = read(fd,buf,count)) > 0)
If an IO error occurs in the read call it will return -1 and the loop will terminate early generating an incorrect digest for the file but no error report until the subsequent file transfer fails its checksum test.
On a related note if you check for errors properly you discover that a recursive globus-url-copy attempts to calculate checksums on directory-urls using this routine (which always generates a error in the read call)
The routine globus_l_gass_copy_cksm_file in globus_gass_copy_glob.c has a file read loop
while((n = read(fd,buf,count)) > 0)
If an IO error occurs in the read call it will return -1 and the loop will terminate early generating an incorrect digest for the file but no error report until the subsequent file transfer fails its checksum test.On a related note if you check for errors properly you discover that a recursive globus-url-copy attempts to calculate checksums on directory-urls using this routine (which always generates a error in the read call)
My POC fix is `static globus_result_t globus_l_gass_copy_cksm_file( globus_gass_copy_handle_t handle, char url, char cksm, globus_off_t offset, globus_off_t length, const char algorithm, globus_gass_copy_callback_t callback, void callback_arg) { char myname = "globus_l_gass_copy_cksm_file";
error_seek: close(fd); error_fd: globus_url_destroy(&parsed_url);
error_url:
} ` But it probably needs a bit of tidying up.