Fix issues with large external data files#4843
Merged
fortnern merged 1 commit intoHDFGroup:developfrom Sep 17, 2024
Merged
Conversation
mattjala
approved these changes
Sep 17, 2024
jhendersonHDF
approved these changes
Sep 17, 2024
qkoziol
approved these changes
Sep 17, 2024
fortnern
added a commit
to fortnern/hdf5
that referenced
this pull request
Sep 17, 2024
fortnern
added a commit
that referenced
this pull request
Sep 18, 2024
fortnern
added a commit
to fortnern/hdf5
that referenced
this pull request
Sep 19, 2024
fortnern
added a commit
that referenced
this pull request
Sep 19, 2024
fortnern
added a commit
that referenced
this pull request
Sep 19, 2024
lrknox
added a commit
that referenced
this pull request
Sep 19, 2024
lrknox
added a commit
that referenced
this pull request
Sep 28, 2024
* Fix issues with large external data files (#4843) (#4847) * Fixed a memory leak from H5FL_blk_malloc (#4882) In H5F__accum_reset(), when H5F__accum_flush() failed, the freeing of f_sh->accum.buf was never reached, causing resource leak. @fortnern added the third argument to H5F__accum_reset() so we can free f_sh->accum.buf when we close the file, that is, when H5F__accum_reset() is called from the H5F__dest() route, and can leave the accumulator in place otherwise. * Added an entry for the GH-4585 fix (#4889) * Fix an incorrect returned value by H5LTfind_dataset() (#4869) H5LTfind_dataset() returns true for non-existing datasets because it only compares up to the length of the searched string, such as "Day" vs "DayNight" (issue GH-4780). This PR applied the user's patch and added tests. * Fix minor spelling in documentation (#4870) --------- Co-authored-by: Neil Fortner <fortnern@gmail.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
lrknox
added a commit
that referenced
this pull request
Sep 28, 2024
* Fix issues with large external data files (#4843) (#4847) * Fixed a memory leak from H5FL_blk_malloc (#4882) In H5F__accum_reset(), when H5F__accum_flush() failed, the freeing of f_sh->accum.buf was never reached, causing resource leak. @fortnern added the third argument to H5F__accum_reset() so we can free f_sh->accum.buf when we close the file, that is, when H5F__accum_reset() is called from the H5F__dest() route, and can leave the accumulator in place otherwise. * Added an entry for the GH-4585 fix (#4889) * Fix an incorrect returned value by H5LTfind_dataset() (#4869) H5LTfind_dataset() returns true for non-existing datasets because it only compares up to the length of the searched string, such as "Day" vs "DayNight" (issue GH-4780). This PR applied the user's patch and added tests. * Fix minor spelling in documentation (#4870) * Updated Platforms tested in RELEASE.txt Incremented version subrelease to -3.
lrknox
added a commit
that referenced
this pull request
Sep 30, 2024
* Fix issues with large external data files (#4843) (#4847) * Fixed a memory leak from H5FL_blk_malloc (#4882) In H5F__accum_reset(), when H5F__accum_flush() failed, the freeing of f_sh->accum.buf was never reached, causing resource leak. @fortnern added the third argument to H5F__accum_reset() so we can free f_sh->accum.buf when we close the file, that is, when H5F__accum_reset() is called from the H5F__dest() route, and can leave the accumulator in place otherwise. * Added an entry for the GH-4585 fix (#4889) * Fix an incorrect returned value by H5LTfind_dataset() (#4869) H5LTfind_dataset() returns true for non-existing datasets because it only compares up to the length of the searched string, such as "Day" vs "DayNight" (issue GH-4780). This PR applied the user's patch and added tests. * Fix minor spelling in documentation (#4870) * Set release version 1.14.5 and release date to 2024-09-30.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The code for reading and writing external raw data files does not account for the case where a single call to read() or write() does not process all the bytes in the request. This can cause errors when dealing with large external files. Modified this code to call read() or write() in a loop until all bytes are processed. This code is partly taken from H5FDsec2.c. In the future we should consider having the external dataset code run through the H5FD layer to avoid these sorts of issues in the future (and add additional flexibility to the external dataset feature). Fixes #4216 and h5py/h5py#2394