public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Lv Ying <lvying.system.thoughts@gmail.com>
Cc: libc-alpha@sourceware.org,  lvying6@huawei.com
Subject: Re: [RFC] elf: fine-grained output LD_DEBUG log when symbol lookup error
Date: Wed, 17 Aug 2022 07:56:10 +0200	[thread overview]
Message-ID: <87pmgz5s79.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <87e5a2d3-f7a3-0749-cb70-e86ba27baf48@gmail.com> (Lv Ying's message of "Wed, 17 Aug 2022 11:51:58 +0800")

* Lv Ying:

> Hi, Florian.
> Sorry to reply you too late, and thanks for your reply. I took some time to reproduce this problem.
> And I resend this email again to cc libc-alpha@sourceware.org.
>
>> Do you have a reproducer that shows what you want to fix?
> Yes, here is the reproduce processing:
> I want to get shrared object library search paths in openEuler 22.03(https://ftp.belnet.be/mirror/openeuler/openEuler-22.03-LTS/):
>
>
> # export LD_DEBUG=libs
> # whoami
>      40503:    find library=libc.so.6 [0]; searching
>      40503:     search cache=/etc/ld.so.cache
>      40503:      trying file=/usr/lib64/libc.so.6
>      40503:   
>      40503:   
>      40503:    calling init: /lib64/ld-linux-x86-64.so.2
>      40503:   
>      40503:   
>      40503:    calling init: /usr/lib64/libc.so.6
>      40503:   
>      40503:   
>      40503:    initialize program: whoami
>      40503:   
>      40503:   
>      40503:    transferring control: whoami
>      40503:   
>      40503:    find library=libnss_sss.so.2 [0]; searching
>      40503:     search cache=/etc/ld.so.cache
>      40503:      trying file=/usr/lib64/libnss_sss.so.2
>      40503:   
>      40503:   
>      40503:    calling init: /usr/lib64/libnss_sss.so.2
>      40503:   
>      40503:    /usr/lib64/libnss_sss.so.2: error: symbol lookup error: undefined symbol: _nss_sss_endaliasent (fatal)
>      40503:    /usr/lib64/libnss_sss.so.2: error: symbol lookup error: undefined symbol: _nss_sss_endetherent (fatal)

I see.  If we want to make the change, we would have to tweak
_dl_signal_cexception, not remove the call to it.  But I'm not sure if
this kind of change would be appropriate for "libs".  Maybe we can add a
new LD_DEBUG variant that prints more useful information.

In my experience, ld.so trace output isn't that helpful today for
discovering root causes of real issues, so I'd welcome concrete
proposals for improvements.

Thanks,
Florian

  reply	other threads:[~2022-08-17  5:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-07 12:00 Lv Ying
2022-08-08 13:19 ` Florian Weimer
2022-08-17  3:51   ` Lv Ying
2022-08-17  5:56     ` Florian Weimer [this message]
2022-08-19 16:23       ` Lv Ying

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=87pmgz5s79.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=lvying.system.thoughts@gmail.com \
    --cc=lvying6@huawei.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).