Crashes when reading from multiple threads

Hi

We have an application that has 2 threads - each reading from a
differnt HDF5 file. There are no writes occuring. We are however
seeing seg faults when running the application with the following stack trace:

(gdb) back
#0 0x00000039bfcabd0d in H5FL_reg_malloc () from /usr/lib64/libhdf5.so.6
#1 0x00000039bfd55b0e in H5SL_create () from /usr/lib64/libhdf5.so.6
#2 0x00000039bfd39b31 in H5P_create_id () from /usr/lib64/libhdf5.so.6
#3 0x00000039bfd26e0b in H5Pcreate () from /usr/lib64/libhdf5.so.6
#4 0x00007ffff5d100bf in H5::PropList::PropList(int) () from /usr/lib64/libhdf5_cpp.so.0
#5 0x00007ffff5d1246a in H5::FileAccPropList::FileAccPropList() ()

Is there a thread safety issue with such multiple reads? Any
suggestions on doing these reads without these crashes would be helpful.

Thanks

Abhi

Have you compiled the HDF5 distribution with the --enable-thread-safe configure flag?

  Quincey

···

On Nov 11, 2009, at 6:58 PM, Abhinandan Jain wrote:

Hi

We have an application that has 2 threads - each reading from a
differnt HDF5 file. There are no writes occuring. We are however
seeing seg faults when running the application with the following stack trace:

(gdb) back
#0 0x00000039bfcabd0d in H5FL_reg_malloc () from /usr/lib64/libhdf5.so.6
#1 0x00000039bfd55b0e in H5SL_create () from /usr/lib64/libhdf5.so.6
#2 0x00000039bfd39b31 in H5P_create_id () from /usr/lib64/libhdf5.so.6
#3 0x00000039bfd26e0b in H5Pcreate () from /usr/lib64/libhdf5.so.6
#4 0x00007ffff5d100bf in H5::PropList::PropList(int) () from /usr/lib64/libhdf5_cpp.so.0
#5 0x00007ffff5d1246a in H5::FileAccPropList::FileAccPropList() ()

Is there a thread safety issue with such multiple reads? Any
suggestions on doing these reads without these crashes would be helpful.

Hi Abhi,

The HDF5 C++ API is not supported with thread-safe at this time. If you
need to use thread-safe, please go with the C library.

Thanks,
Binh-Minh

···

-----Original Message-----
From: hdf-forum-bounces@hdfgroup.org [mailto:hdf-forum-
bounces@hdfgroup.org] On Behalf Of Abhinandan Jain
Sent: Wednesday, November 11, 2009 7:58 PM
To: hdf-forum@hdfgroup.org
Subject: [Hdf-forum] Crashes when reading from multiple threads

Hi

We have an application that has 2 threads - each reading from a
differnt HDF5 file. There are no writes occuring. We are however
seeing seg faults when running the application with the following stack
trace:

(gdb) back
#0 0x00000039bfcabd0d in H5FL_reg_malloc () from /usr/lib64/libhdf5.so.6
#1 0x00000039bfd55b0e in H5SL_create () from /usr/lib64/libhdf5.so.6
#2 0x00000039bfd39b31 in H5P_create_id () from /usr/lib64/libhdf5.so.6
#3 0x00000039bfd26e0b in H5Pcreate () from /usr/lib64/libhdf5.so.6
#4 0x00007ffff5d100bf in H5::PropList::PropList(int) () from
/usr/lib64/libhdf5_cpp.so.0
#5 0x00007ffff5d1246a in H5::FileAccPropList::FileAccPropList() ()

Is there a thread safety issue with such multiple reads? Any
suggestions on doing these reads without these crashes would be helpful.

Thanks

Abhi

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

--
Internal Virus Database is out-of-date.
Checked by AVG.
Version: 7.5.549 / Virus Database: 270.9.0/1778 - Release Date: 11/9/2008
2:14 PM

Hi Binh-Minh

Thanks for the prompt response. I will convert to C and give it a shot.

Would I need to build the source with any additional flags or do some
additional initialization to enable the thread-safety feature?

Abhi

···

Hi Abhi,

The HDF5 C++ API is not supported with thread-safe at this time. If you
need to use thread-safe, please go with the C library.

Thanks,
Binh-Minh

>-----Original Message-----
>From: hdf-forum-bounces@hdfgroup.org [mailto:hdf-forum-
>bounces@hdfgroup.org] On Behalf Of Abhinandan Jain
>Sent: Wednesday, November 11, 2009 7:58 PM
>To: hdf-forum@hdfgroup.org
>Subject: [Hdf-forum] Crashes when reading from multiple threads
>
>Hi
>
>We have an application that has 2 threads - each reading from a
>differnt HDF5 file. There are no writes occuring. We are however
>seeing seg faults when running the application with the following stack
>trace:
>
>(gdb) back
>#0 0x00000039bfcabd0d in H5FL_reg_malloc () from /usr/lib64/libhdf5.so.6
>#1 0x00000039bfd55b0e in H5SL_create () from /usr/lib64/libhdf5.so.6
>#2 0x00000039bfd39b31 in H5P_create_id () from /usr/lib64/libhdf5.so.6
>#3 0x00000039bfd26e0b in H5Pcreate () from /usr/lib64/libhdf5.so.6
>#4 0x00007ffff5d100bf in H5::PropList::PropList(int) () from
>/usr/lib64/libhdf5_cpp.so.0
>#5 0x00007ffff5d1246a in H5::FileAccPropList::FileAccPropList() ()
>
>
>Is there a thread safety issue with such multiple reads? Any
> suggestions on doing these reads without these crashes would be helpful.
>
>Thanks
>
>Abhi
>
>_______________________________________________
>Hdf-forum is for HDF software users discussion.
>Hdf-forum@hdfgroup.org
>http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
>

Hi Abhi,

You're welcome! You probably got the answer from Quincey by now about using
--enable-thread-safe. I've been to the dentist! :slight_smile:

Binh-Minh

···

-----Original Message-----
From: hdf-forum-bounces@hdfgroup.org [mailto:hdf-forum-
bounces@hdfgroup.org] On Behalf Of Abhinandan Jain
Sent: Thursday, November 12, 2009 9:37 AM
To: hdf-forum@hdfgroup.org
Subject: Re: [Hdf-forum] Crashes when reading from multiple threads

Hi Binh-Minh

Thanks for the prompt response. I will convert to C and give it a shot.

Would I need to build the source with any additional flags or do some
additional initialization to enable the thread-safety feature?

Abhi

Hi Abhi,

The HDF5 C++ API is not supported with thread-safe at this time. If you
need to use thread-safe, please go with the C library.

Thanks,
Binh-Minh

>-----Original Message-----
>From: hdf-forum-bounces@hdfgroup.org [mailto:hdf-forum-
>bounces@hdfgroup.org] On Behalf Of Abhinandan Jain
>Sent: Wednesday, November 11, 2009 7:58 PM
>To: hdf-forum@hdfgroup.org
>Subject: [Hdf-forum] Crashes when reading from multiple threads
>
>Hi
>
>We have an application that has 2 threads - each reading from a
>differnt HDF5 file. There are no writes occuring. We are however
>seeing seg faults when running the application with the following stack
>trace:
>
>(gdb) back
>#0 0x00000039bfcabd0d in H5FL_reg_malloc () from

/usr/lib64/libhdf5.so.6

>#1 0x00000039bfd55b0e in H5SL_create () from /usr/lib64/libhdf5.so.6
>#2 0x00000039bfd39b31 in H5P_create_id () from /usr/lib64/libhdf5.so.6
>#3 0x00000039bfd26e0b in H5Pcreate () from /usr/lib64/libhdf5.so.6
>#4 0x00007ffff5d100bf in H5::PropList::PropList(int) () from
>/usr/lib64/libhdf5_cpp.so.0
>#5 0x00007ffff5d1246a in H5::FileAccPropList::FileAccPropList() ()
>
>
>Is there a thread safety issue with such multiple reads? Any
> suggestions on doing these reads without these crashes would be

helpful.

>
>Thanks
>
>Abhi
>
>_______________________________________________
>Hdf-forum is for HDF software users discussion.
>Hdf-forum@hdfgroup.org
>http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
>

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

--
Internal Virus Database is out-of-date.
Checked by AVG.
Version: 7.5.549 / Virus Database: 270.9.0/1778 - Release Date: 11/9/2008
2:14 PM

Hi,

In the past few months, we largely updated the HDF-EOS website(HDF - EOS Tools and Information Center at http://hdfeos.org) to help HDF and HDF-EOS users handle NASA HDF data.

We add a new section called "EXAMPLES". We provide examples on how to access HDF-EOS Grid and Swath files using programming languages such as C, Fortran, IDL and Matlab. Special examples such as retrieving geo-location information from an HDF-EOS Grid file are also provided. We also provide examples on how to use tools to access HDF-EOS and HDF files. Examples on how to use HEG, IDV, GrADS and NCL are provided.

We also evaluated all libraries and tools listed in the old website. These libraries and tools include HDF-EOS libraries, HDFView, HDF4 to HDF5 conversion tools, HEG, HDF-EOS plug-in for HDFView, MTD and SDP Toolkits etc. We also added 11 libraries and tools that are useful to access NASA HDF and HDF-EOS data. The new libraries and tools include IDL, MatLab, GDAL, GDL, NCL, GrADS and IDV. Detailed description is added for each software. Links to tools available through NASA data centers are also provided.

We also provide a web forum for people to share knowledge, questions and answers related to handling NASA HDF and HDF-EOS data.

Please visit the new HDF-EOS website at http://hdfeos.org.

Thanks,

Kent