Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to open file in RDWR mode but not in read-only mode #5135

Open
bmribler opened this issue Nov 20, 2024 · 0 comments
Open

Failed to open file in RDWR mode but not in read-only mode #5135

bmribler opened this issue Nov 20, 2024 · 0 comments
Labels
Component - C Library Core C library issues (usually in the src directory) Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug / Bugfix Please report security issues to [email protected] instead of creating an issue on GitHub

Comments

@bmribler
Copy link
Contributor

(excerpt from HELP-2625)
...I found a way to reproduce the error: It happens when trying to open a file in RDWR mode which has this superblock status flag set.

With this mode (SWMR is not enabled):

hid_t file_id = H5Fopen(filename, H5F_ACC_RDWR /|H5F_ACC_SWMR_WRITE/, H5P_DEFAULT);

the following assertion occurs:

Assertion failed: H5F_NULL_FSM_ADDR(f) || final_eoa == f->shared->eoa_fsm_fsalloc, file H5MF.c, line 1818
Assertion failed: H5F_sfile_head_s == NULL, file H5Fsfile.c, line 59

Whereas, when opening the file read-only as

hid_t file_id = H5Fopen(filename, H5F_ACC_RDONLY /|H5F_ACC_SWMR_WRITE/, H5P_DEFAULT);

then it (kind of) correctly reports an sensible error message indicating the problem:

HDF5-DIAG: Error detected in HDF5 (1.14.4-3) thread 28276:
#000: H5F.c line 836 in H5Fopen(): unable to synchronously open file
major: File accessibility
minor: Unable to open file
#1: H5F.c line 796 in H5F__open_api_common(): unable to open file
major: File accessibility
minor: Unable to open file
#2: H5VLcallback.c line 3863 in H5VL_file_open(): open failed
major: Virtual Object Layer
minor: Can't open object
#3: H5VLcallback.c line 3675 in H5VL__file_open(): open failed
major: Virtual Object Layer
minor: Can't open object
#4: H5VLnative_file.c line 128 in H5VL__native_file_open(): unable to open file
major: File accessibility
minor: Unable to open file
#5: H5Fint.c line 2195 in H5F_open(): file is already open for write (may use to clear file consistency flags)
major: File accessibility
minor: Unable to open file

This is with HDF5 1.14.4, like previously mentioned.

@bmribler bmribler added Component - C Library Core C library issues (usually in the src directory) Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug / Bugfix Please report security issues to [email protected] instead of creating an issue on GitHub labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - C Library Core C library issues (usually in the src directory) Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug / Bugfix Please report security issues to [email protected] instead of creating an issue on GitHub
Projects
None yet
Development

No branches or pull requests

1 participant