ROS3 broken in HDF5 1.14 tools, workaround

There appears to some breakage of the ROS3 tools

The original issue says the problem is isolated to Windows. However, I can reproduce the issue on the develop branch on Ubuntu x86_64

$ ./h5dump --filedriver=ros3 --enable-error-stack "https://s3.amazonaws.com/hdfgroup/data/hdf5demo/tall.h5"
h5dump error: unable to create FAPL for file access
HDF5-DIAG: Error detected in HDF5 (1.15.0) thread 0:
  #000: /home/mkitti/src/hdf5/src/H5P.c line 1486 in H5Pclose(): not a property list
    major: Invalid arguments to routine
    minor: Inappropriate type

$ ./h5ls --vfd-name=ros3 --enable-error-stack "https://s3.amazonaws.com/hdfgroup/data/hdf5demo/tall.h5"
h5ls error: failed to setup file access property list (fapl) for file

One workaround on Linux appears to be explicitly specifying --s3-cred="(,,)".

$ ./h5dump --vfd-name=ros3 --enable-error-stack --s3-cred="(,,)" "https://s3.amazonaws.com/hdfgroup/data/hdf5demo/tall.h5"
HDF5 "https://s3.amazonaws.com/hdfgroup/data/hdf5demo/tall.h5" {
GROUP "/" {
   ATTRIBUTE "attr1" {
      DATATYPE  H5T_STD_I8BE
      DATASPACE  SIMPLE { ( 10 ) / ( 10 ) }
      DATA {
      (0): 97, 98, 99, 100, 101, 102, 103, 104, 105, 0
      }
   }

$ ./h5ls --vfd-name=ros3 --enable-error-stack --s3-cred="(,,)" "https://s3.amazonaws.com/hdfgroup/data/hdf5demo/tall.h5"
g1                       Group
g2                       Group
1 Like

On Windows, there was also a segmentation fault involving strstr, StrStrIA, and stdcall. This can be resolved via the following patch that includes explicitly includes shlwapi.h in H5private.h

I have the same issue on macos. Thanks for the workaround; that works.

$ mamba create --name test python=3.10 --yes
$ mamba activate test
$ mamba install hdf5  # installs 1.14.0  nompi_h6b85c65_102  conda-forge/osx-arm64
$ h5ls --version
h5ls: Version 1.14.0
$ h5ls --vfd=ros3 https://dandiarchive.s3.amazonaws.com/blobs/c42/df3/c42df333-1392-4293-a609-c7dabd56788b   
h5ls error: failed to setup file access property list (fapl) for file
$ h5ls --vfd=ros3 --s3-cred="(,,)" https://dandiarchive.s3.amazonaws.com/blobs/c42/df3/c42df333-1392-4293-a609-c7dabd56788b
acquisition              Group
analysis                 Group
file_create_date         Dataset {1}
general                  Group
identifier               Dataset {SCALAR}
intervals                Group
processing               Group
session_description      Dataset {SCALAR}
session_start_time       Dataset {SCALAR}
specifications           Group
stimulus                 Group
timestamps_reference_time Dataset {SCALAR}

I think it is worthwhile to also link this comment by @jhenderson since this describe the source of the issue. https://github.com/HDFGroup/hdf5/issues/2406#issuecomment-1384819334