Allen,

Thank you for your report!
On Jan 14, 2010, at 12:37 PM, Allen Sanderson wrote:

> HI,
> 
> This morning I was able to track down a bug with a file with external links 
> where the file was opened twice simultaneously. The first open was read only. 
> The second open was read write.  However, if I create the file with the exact 
> same hierarchy but without links I do not see the bug. I found this odd.
> 
> Here is the sequence
> 
> fp1 = open file read only
> 
> gp1 = open /group using fp1 (note /group is an eternal link)
> 
> fp2 = open file read/write
> 
> dp2 = open /group/dataset using fp2
> 
> the last open fails. I can understand the failure given the gp1 is read only 
> and dp2 which is under it is trying to perhaps do a write which could cause 
> some problems.  So it fails.
> 
> However, if the file has the same hierarchy but without the link it does not 
> fail. I found this behavior strange as I would have expected both to behave 
> the same.
> 
> Obviously, one solution is not to open the file twice which is certainly 
> possible but also having both opens be read/write also works. But I am more 
> concerned with the inconsistency. 
> 
yes, good point. Could you please send us an error stack from the failed 
program? 

In our defense :-) RM entry for H5Fopen states "A file can often be opened with 
a new H5Fopen call without closing an already-open identifier established in a 
previous H5Fopen or H5Fcreate call. Each such H5Fopen call will return a unique 
identifier and the file can be accessed through any of these identifiers as 
long as the identifier remains valid. In such multiply-opened cases, all the 
open calls should use the same flags argument."

Elena

> 
> Cheers,
> 
> Allen
> 
> 
> Allen Sanderson
> SCI Institute
> University of Utah
> www.sci.utah.edu
> 
> 
> 
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected]
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

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

Reply via email to