public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Jacob Kroon <jacob.kroon@gmail.com>
Cc: cltang@codesourcery.com,  adhemerval.zanella@linaro.org,
	 Jacob Kroon via Gdb <gdb@sourceware.org>
Subject: Re: Debugging ld.so in gdb
Date: Mon, 07 Feb 2022 17:28:25 +0100	[thread overview]
Message-ID: <87y22m7iae.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <87zgn293du.fsf@oldenburg.str.redhat.com> (Florian Weimer's message of "Mon, 07 Feb 2022 15:07:25 +0100")

* Florian Weimer:

> * Jacob Kroon:
>
>> I managed to build glibc master, and yes it also crashes. Reverting the
>> suspicious commit:
>>
>> commit 15a0c5730d1d5aeb95f50c9ec7470640084feae8
>> Author: Chung-Lin Tang <cltang@codesourcery.com>
>> Date:   Thu Oct 21 21:41:22 2021 +0800
>>
>>     elf: Fix slow DSO sorting behavior in dynamic loader (BZ #17645)
>>
>> fixes the crash. Adding a couple of more people.
>
> Sorry, that is completely expected because this is where the faulty code
> was added.
>
> I plan to stare at _dl_map_object_deps a bit, to figure out where the
> discrepancy between l_initfini for the main program and the loaded
> objects comes from.

I can see that we do not add l_fake objects (that failed to load) to the
main search list (and nlist is not incremented).  But we do not remove
them from the individual list of dependencies, leading to this
discrepancy.

This would be consistent with this bug report:

  Dynamic loader DFS algorithm segfaults on missing libraries
  <https://sourceware.org/bugzilla/show_bug.cgi?id=28868>

If you run with GLIBC_TUNABLES=glibc.rtld.dynamic_sort=0, do you see
“not found” lines in the ldd output?

If yes, do these surprising libjvm.so objects have l_fake set in their
link map?

Thanks,
Florian


  reply	other threads:[~2022-02-07 16:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 13:45 Jacob Kroon
2022-02-04 13:58 ` Florian Weimer
2022-02-04 14:09   ` Jacob Kroon
2022-02-04 14:22     ` Florian Weimer
2022-02-04 14:27       ` Jacob Kroon
2022-02-04 16:09         ` Florian Weimer
2022-02-04 16:53           ` Jacob Kroon
2022-02-04 17:04             ` Florian Weimer
2022-02-04 17:11               ` Jacob Kroon
2022-02-04 17:15                 ` Florian Weimer
2022-02-07  8:36                   ` Jacob Kroon
2022-02-07 11:46                     ` Jacob Kroon
2022-02-07 11:55                       ` Florian Weimer
2022-02-07 12:15                         ` Jacob Kroon
2022-02-07 12:27                           ` Florian Weimer
2022-02-07 12:32                             ` Jacob Kroon
2022-02-07 13:39                               ` Jacob Kroon
2022-02-07 13:45                                 ` Jacob Kroon
2022-02-07 13:53                                   ` Adhemerval Zanella
2022-02-07 13:54                                     ` Jacob Kroon
2022-02-07 14:07                                 ` Florian Weimer
2022-02-07 16:28                                   ` Florian Weimer [this message]
2022-02-07 17:04                                     ` Jacob Kroon
2022-02-04 14:45       ` Jacob Kroon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y22m7iae.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=cltang@codesourcery.com \
    --cc=gdb@sourceware.org \
    --cc=jacob.kroon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).