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

crash of h5dump of H5Olink.c in function H5O__link_reset #581

Closed
NigelX opened this issue Apr 25, 2021 · 2 comments
Closed

crash of h5dump of H5Olink.c in function H5O__link_reset #581

NigelX opened this issue Apr 25, 2021 · 2 comments

Comments

@NigelX
Copy link

NigelX commented Apr 25, 2021

Hi
I found an crash error.

System info:
Ubuntu 20.04 : clang 10.0.0 , gcc 9.3.0

hdf5 version 1.13.0 ,git branch development


Verification steps:
1.Get the source code of hdf5
2.Compile the hdf5

$ cd hdf5
$ mkdir build && cd build
$ cmake ../ -DCMAKE_C_COMPILER=clang  -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address"
$ make -j 32

3.run h5dump

$ cd bin
$ mkdir crashtest_dir
$ ./h5dump -r -d crashtest_dir/data poc

poc.zip

asan info

AddressSanitizer:DEADLYSIGNAL
=================================================================
==1455573==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x00000041d8a4 bp 0x000000000000 sp 0x7fff49ee9d70 T0)
==1455573==The signal is caused by a READ memory access.
==1455573==Hint: this fault was caused by a dereference of a high value address (see register values below).  Dissassemble the provided pc to learn which register was used.
    #0 0x41d8a4 in __asan::Allocator::Deallocate(void*, unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType) (/home/hh/Downloads/hdf5/build/bin/h5dump+0x41d8a4)
    #1 0x494b51 in free (/home/hh/Downloads/hdf5/build/bin/h5dump+0x494b51)
    #2 0x9af31a in H5MM_xfree /home/hh/Downloads/hdf5/src/H5MM.c:557:9
    #3 0xa55013 in H5O__link_reset /home/hh/Downloads/hdf5/src/H5Olink.c:566:29
    #4 0xa5c8bd in H5O__msg_reset_real /home/hh/Downloads/hdf5/src/H5Omessage.c:589:17
    #5 0xa5c8bd in H5O_msg_reset /home/hh/Downloads/hdf5/src/H5Omessage.c:556:9
    #6 0x877b53 in H5G__link_release_table /home/hh/Downloads/hdf5/src/H5Glink.c:517:17
    #7 0x11eed0e in H5G__compact_iterate /home/hh/Downloads/hdf5/src/H5Gcompact.c:412:24
    #8 0x898018 in H5G__obj_iterate /home/hh/Downloads/hdf5/src/H5Gobj.c:661:30
    #9 0x87106f in H5G_visit /home/hh/Downloads/hdf5/src/H5Gint.c:1297:14
    #10 0x103fa3f in H5VL__native_link_specific /home/hh/Downloads/hdf5/src/H5VLnative_link.c:362:38
    #11 0xfe90e3 in H5VL__link_specific /home/hh/Downloads/hdf5/src/H5VLcallback.c:5140:22
    #12 0xfe90e3 in H5VL_link_specific /home/hh/Downloads/hdf5/src/H5VLcallback.c:5176:22
    #13 0x976df8 in H5Lvisit_by_name2 /home/hh/Downloads/hdf5/src/H5L.c:2024:22
    #14 0x558472 in traverse /home/hh/Downloads/hdf5/tools/lib/h5trav.c:288:17
    #15 0x55c606 in h5trav_visit /home/hh/Downloads/hdf5/tools/lib/h5trav.c:1057:9
    #16 0x553c25 in init_objs /home/hh/Downloads/hdf5/tools/lib/h5tools_utils.c:793:22
    #17 0x4c460c in table_list_add /home/hh/Downloads/hdf5/tools/src/h5dump/h5dump.c:476:9
    #18 0x4c75c2 in main /home/hh/Downloads/hdf5/tools/src/h5dump/h5dump.c:1549:13
    #19 0x7fb96965f0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
    #20 0x41c60d in _start (/home/hh/Downloads/hdf5/build/bin/h5dump+0x41c60d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/home/hh/Downloads/hdf5/build/bin/h5dump+0x41d8a4) in __asan::Allocator::Deallocate(void*, unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType)
==1455573==ABORTING

Fedora 33

HDF5 "poc" {h5dump error: unable to get link info from "crashtest_dir/data"

}

Thanks

@byrnHDF
Copy link
Contributor

byrnHDF commented Nov 17, 2022

HDF5-DIAG: Error detected in HDF5 (1.13.4-1) thread 0:
#000: /HDF_Projects/hdf5/dev/src/H5L.c line 1988 in H5Lvisit_by_name2(): link visitation failed
major: Links
minor: Iteration failed
#1: /HDF_Projects/hdf5/dev/src/H5VLcallback.c line 5517 in H5VL_link_specific(): unable to execute link specific callback
major: Virtual Object Layer
minor: Can't operate on object
#2:/HDF_Projects/hdf5/dev/src/H5VLcallback.c line 5483 in H5VL__link_specific(): unable to execute link specific callback
major: Virtual Object Layer
minor: Can't operate on object
#3: /HDF_Projects/hdf5/dev/src/H5VLnative_link.c line 377 in H5VL__native_link_specific(): link visitation failed
major: Links
minor: Iteration failed
#4: /HDF_Projects/hdf5/dev/src/H5Gint.c line 1244 in H5G_visit(): can't visit links
major: Symbol table
minor: Iteration failed
#5: /HDF_Projects/hdf5/dev/src/H5Gobj.c line 662 in H5G__obj_iterate(): can't iterate over compact links
major: Symbol table
minor: Iteration failed
#6: /HDF_Projects/hdf5/dev/src/H5Gcompact.c line 403 in H5G__compact_iterate(): can't create link message table
major: Symbol table
minor: Unable to initialize object
#7: /HDF_Projects/hdf5/dev/src/H5Gcompact.c line 151 in H5G__compact_build_table(): error iterating over link messages
major: Symbol table
minor: Object not found
#8: /HDF_Projects/hdf5/dev/src/H5Omessage.c line 1174 in H5O_msg_iterate(): unable to iterate over object header messages
major: Object header
minor: Iteration failed
#9: /HDF_Projects/hdf5/dev/src/H5Omessage.c line 1236 in H5O__msg_iterate_real(): unable to decode message
major: Object header
minor: Unable to decode value
#10: /HDF_Projects/hdf5/dev/src/H5Olink.c line 198 in H5O__link_decode(): name length causes read past end of buffer
major: Object header
minor: Address overflowed
h5dump error: internal error (file /HDF_Projects/hdf5/dev/tools/src/h5dump/h5dump.c:line 1525)
H5tools-DIAG: Error detected in HDF5:tools (1.13.4) thread 0:
#000: /HDF_Projects/hdf5/dev/tools/lib/h5tools_utils.c line 629 in init_objs(): finding shared objects failed
major: Failure in tools library
minor: error in function
#1: /HDF_Projects/hdf5/dev/tools/lib/h5trav.c line 1052 in h5trav_visit(): traverse failed
major: Failure in tools library
minor: error in function
#2: /HDF_Projects/hdf5/dev/tools/lib/h5trav.c line 284 in traverse(): H5Lvisit_by_name failed
major: Failure in tools library
minor: error in function

@byrnHDF
Copy link
Contributor

byrnHDF commented Nov 21, 2022

No crash as error is handled in current develop

@byrnHDF byrnHDF closed this as completed Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants