RFR: 8371093: Assert "section header string table should be loaded" failed on debug VM [v2]
Yasumasa Suenaga
ysuenaga at openjdk.org
Wed Nov 12 08:05:06 UTC 2025
On Tue, 11 Nov 2025 12:03:01 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> Yasumasa Suenaga has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Undo unnecessary change
>> - Check the result of opening file
>
> Hi,
>
> The actual issue here is that the vDSO file doesn't exist, so can't be opened, right? Then, we should instead check in `get_elf_file` whether the creation of the `ElfFile` succeeded instead. This should be done anyway, the `vDSO` issue is just a symptom of another bug.
>
> I think that this new definition should be used instead, in `decoder_elf.cpp:104`.
>
> ```c++
> ElfFile* ElfDecoder::get_elf_file(const char* filepath) {
> ElfFile* file;
>
> file = _opened_elf_files;
> while (file != nullptr) {
> if (file->same_elf_file(filepath)) {
> return file;
> }
> file = file->next();
> }
>
> file = new (std::nothrow) ElfFile(filepath);
> if (file == nullptr) {
> return nullptr;
> } else if (file->get_status() != NullDecoder::no_error) {
> return nullptr;
> }
>
>
> if (_opened_elf_files != nullptr) {
> file->set_next(_opened_elf_files);
> }
> _opened_elf_files = file;
>
> return file;
> }
>
>
> What do you think?
@jdksjolen
> The actual issue here is that the vDSO file doesn't exist, so can't be opened, right? Then, we should instead check in get_elf_file whether the creation of the ElfFile succeeded instead. This should be done anyway, the vDSO issue is just a symptom of another bug.
Yes, you are right.
I added a check whether the library could be opened. It works for vDSO.
I believe libraries which do not exist on file system would not happen except vDSO, but the issue relates to open ELF files could happen by some system breaking (filesystem broken, memory exhausted, and any other unexpected system failure). This change could cover troubles relates to the file.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28102#issuecomment-3520542439
More information about the hotspot-dev
mailing list