public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
@ 2021-03-24 18:03 alfonso.peterssen at oracle dot com
  2021-03-31 10:00 ` [Bug dynamic-link/27646] " gilles.m.duboscq at gmail dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: alfonso.peterssen at oracle dot com @ 2021-03-24 18:03 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

            Bug ID: 27646
           Summary: Linker error for non-existing NSS symbols (e.g.
                    _nss_files_getcanonname_r) from within a dlmopen
                    namespace.
           Product: glibc
           Version: 2.33
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: alfonso.peterssen at oracle dot com
  Target Milestone: ---

Consider the following library (libfoo.so) + test program:

cat <<EOF > foo.c
#include <netdb.h>
#include <stdio.h>
void bar() {
  gethostbyname("localhost");
  puts("foo bar!");
}
EOF

cat <<EOF > test.c
#define _GNU_SOURCE
#include <dlfcn.h>
int main() {
  // dlopen works fine, dlmopen crashes
  // dlopen("./libfoo.so", RTLD_LAZY);
  void* foo = dlmopen(LM_ID_NEWLM, "./libfoo.so", RTLD_LAZY); 
  void (*bar)() = dlsym(foo, "bar");
  bar();
  return 0;
}
EOF

gcc -shared foo.c -o libfoo.so
gcc test.c -ldl -o test
./test


Description:

libnss_files.so symbol lookup explodes from within a dlmopen namespace with the
following error:
./test: symbol lookup error: /usr/lib/libnss_files.so.2: undefined symbol:
_nss_files_getcanonname_r

The regression appeared in 2.33 related to changes in NSS (not seen in 2.32)
but it is rather a symbol resolution issue.
The program works as expected with dlopen.

As a workaround, it runs fine with (I cannot explain why):
LD_DEBUG=unused ./test

We rely on dlmopen to provide native isolation for Java on Truffle (Espresso),
a component of the GraalVM project; this regression forces users to prepend
LD_DEBUG=unused to run Java on Truffle (Espresso).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
@ 2021-03-31 10:00 ` gilles.m.duboscq at gmail dot com
  2021-05-16  3:39 ` evangelos at foutrelis dot com
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: gilles.m.duboscq at gmail dot com @ 2021-03-31 10:00 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

Gilles Duboscq <gilles.m.duboscq at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gilles.m.duboscq at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
  2021-03-31 10:00 ` [Bug dynamic-link/27646] " gilles.m.duboscq at gmail dot com
@ 2021-05-16  3:39 ` evangelos at foutrelis dot com
  2021-06-09 11:57 ` mbhangui at gmail dot com
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: evangelos at foutrelis dot com @ 2021-05-16  3:39 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

Evangelos Foutras <evangelos at foutrelis dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |evangelos at foutrelis dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
  2021-03-31 10:00 ` [Bug dynamic-link/27646] " gilles.m.duboscq at gmail dot com
  2021-05-16  3:39 ` evangelos at foutrelis dot com
@ 2021-06-09 11:57 ` mbhangui at gmail dot com
  2021-06-09 13:51 ` fweimer at redhat dot com
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mbhangui at gmail dot com @ 2021-06-09 11:57 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

cprogrammer <mbhangui at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mbhangui at gmail dot com

--- Comment #1 from cprogrammer <mbhangui at gmail dot com> ---
I can confirm the error reported by Alfonso Peterssen. I too have this problem
in an application of mine which uses dlmopen(). The call to dlmopen() doesn't
return and exits 127. Setting environment variable LD_DEBUG=unused suppresses
this error.

1. It is happening when you call dlmopen(). dlopen calls exits somewhere
2. The error depends on the nsswitch.conf.
   a) for NIS profile the error is - symbol lookup error:
/lib64/libnss_files.so.2: undefined symbol: _nss_files_getcanonname_r
   b) for SSSD profile the error is - symbol lookup error:
/lib64/libnss_sss.so.2: undefined symbol: _nss_sss_endaliasent

129134 writev(2, [{iov_base="/usr/bin/tcpserver", iov_len=18}, {iov_base=": ",
iov_len=2}, {iov_base="symbol lookup error", iov_len=19}, {iov_base=": ", iov
_len=2}, {iov_base="/lib64/libnss_files.so.2", iov_len=24}, {iov_base=": ",
iov_len=2}, {iov_base="undefined symbol: _nss_files_getcanonname_r",
iov_len=43}
, {iov_base="", iov_len=0}, {iov_base="", iov_len=0}, {iov_base="\n",
iov_len=1}], 10) = 111
129134 exit_group(127)       

OS: Fedora 34
glibc version: glibc-2.33-14.fc34.x86_64

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (2 preceding siblings ...)
  2021-06-09 11:57 ` mbhangui at gmail dot com
@ 2021-06-09 13:51 ` fweimer at redhat dot com
  2021-06-09 13:57 ` fweimer at redhat dot com
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fweimer at redhat dot com @ 2021-06-09 13:51 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (3 preceding siblings ...)
  2021-06-09 13:51 ` fweimer at redhat dot com
@ 2021-06-09 13:57 ` fweimer at redhat dot com
  2021-06-09 16:45 ` fweimer at redhat dot com
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fweimer at redhat dot com @ 2021-06-09 13:57 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
This is should already be fixed for glibc 2.34 via bug 15271.

I'll see if I can backport this fix to glibc 2.33.

*** This bug has been marked as a duplicate of bug 15271 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (4 preceding siblings ...)
  2021-06-09 13:57 ` fweimer at redhat dot com
@ 2021-06-09 16:45 ` fweimer at redhat dot com
  2021-06-14  7:45 ` gilles.m.duboscq at gmail dot com
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fweimer at redhat dot com @ 2021-06-09 16:45 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
Sorry this fell through the cracks earlier.

(In reply to cprogrammer from comment #1)
> OS: Fedora 34
> glibc version: glibc-2.33-14.fc34.x86_64

I have submitted a Fedora 34 update. glibc-2.33-15.fc34 should enter
updates-testing soon:

https://bodhi.fedoraproject.org/updates/FEDORA-2021-630993cb61

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (5 preceding siblings ...)
  2021-06-09 16:45 ` fweimer at redhat dot com
@ 2021-06-14  7:45 ` gilles.m.duboscq at gmail dot com
  2021-06-14  8:54 ` fweimer at redhat dot com
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: gilles.m.duboscq at gmail dot com @ 2021-06-14  7:45 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

--- Comment #4 from Gilles Duboscq <gilles.m.duboscq at gmail dot com> ---
Thanks Florian for looking into this.

I have tried glibc-2.33-15.fc34.x86_64 and glibc-2.33-16.fc34.x86_64 and
unfortunately I still get the same error with Alfonso's test program above.

I had to add -fPIC to the gcc invocation to compile libfoo.so but the result is
still the same:

./test: symbol lookup error: /lib64/libnss_files.so.2: undefined symbol:
_nss_files_getcanonname_r

I have another program that uses dlmopen which has similar issues. It seems
that the fix included in 2.33-15 just moved the error: in that program I used
to see symbol lookup error for fstatat64 now the error is

symbol lookup error: /lib64/libnss_sss.so.2: undefined symbol:
_nss_sss_endaliasent

The LD_DEBUG=unused workaround still works both for Alfonso's test and the
other program.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (6 preceding siblings ...)
  2021-06-14  7:45 ` gilles.m.duboscq at gmail dot com
@ 2021-06-14  8:54 ` fweimer at redhat dot com
  2021-06-14  8:55 ` fweimer at redhat dot com
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fweimer at redhat dot com @ 2021-06-14  8:54 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-06-14
             Status|RESOLVED                    |REOPENED
     Ever confirmed|0                           |1
         Resolution|DUPLICATE                   |---

--- Comment #5 from Florian Weimer <fweimer at redhat dot com> ---
Sorry, I should have tried the actual reproducer. We have a test that is pretty
much the same, but it turns out that we have a separate copy of the
error-handling code for libc-internal use.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (7 preceding siblings ...)
  2021-06-14  8:54 ` fweimer at redhat dot com
@ 2021-06-14  8:55 ` fweimer at redhat dot com
  2021-06-14  9:48 ` fweimer at redhat dot com
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fweimer at redhat dot com @ 2021-06-14  8:55 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |fweimer at redhat dot com
             Status|REOPENED                    |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (8 preceding siblings ...)
  2021-06-14  8:55 ` fweimer at redhat dot com
@ 2021-06-14  9:48 ` fweimer at redhat dot com
  2021-06-17 13:09 ` fweimer at redhat dot com
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fweimer at redhat dot com @ 2021-06-14  9:48 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
Patch posted: https://sourceware.org/pipermail/libc-alpha/2021-June/127568.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (9 preceding siblings ...)
  2021-06-14  9:48 ` fweimer at redhat dot com
@ 2021-06-17 13:09 ` fweimer at redhat dot com
  2021-07-02 16:26 ` mbhangui at gmail dot com
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fweimer at redhat dot com @ 2021-06-17 13:09 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.34
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for glibc 2.34 by:

commit c2059edce20c124d1a99f1a94cc52e83b77a917a
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Jun 17 15:06:43 2021 +0200

    elf: Use _dl_catch_error from base namespace in dl-libc.c [BZ #27646]

    dlerrror_run in elf/dl-libc.c needs to call GLRO (dl_catch_error)
    from the base namespace, just like the exported dlerror
    implementation.

    Fixes commit b2964eb1d9a6b8ab1250e8a881cf406182da5875 ("dlfcn:
    Failures after dlmopen should not terminate process [BZ #24772]").

    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (10 preceding siblings ...)
  2021-06-17 13:09 ` fweimer at redhat dot com
@ 2021-07-02 16:26 ` mbhangui at gmail dot com
  2021-07-06 11:14 ` fweimer at redhat dot com
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mbhangui at gmail dot com @ 2021-07-02 16:26 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

--- Comment #8 from cprogrammer <mbhangui at gmail dot com> ---
This is still an issue. Though it solves functions like gethostbyname crashing,
getpwent and family still crash with SIGSEGV. Details below on how to simulate
it. Setting LD_DEBUG to unused prevents the crash. Also modifying
/etc/nsswitch.conf to have passwd obtained only from files prevents the crash
(removing sss).

cat <<EOF>foo.c
#include <stdio.h>
#include <pwd.h>
void bar1()
{
  struct passwd *pw;
  pw = getpwent();
  if (pw)
    printf("%s\n", pw->pw_name);
}
EOF
cat <<EOF>test.c
#define _GNU_SOURCE
#include <dlfcn.h>
#include <stdio.h>
int
main(int argc, char **argv)
{
  void *handle;
  int (*func) ();

  if (!(handle = dlmopen(LM_ID_NEWLM, "./libfoo.so", RTLD_NOW))) {
                perror("dlmopen");
                return 1;
  }
  func = dlsym(handle, "bar1");
  (*func)();
  return 0;
}
EOF

$ gcc -fPIC -shared foo.c -o libfoo.so
$ gcc test.c -o test -ldl
$ ./test
Segmentation fault (core dumped)

$ env LD_DEBUG=unused ./test
root

$ rpm -qf /etc/nsswitch.conf
glibc-2.33-18.fc34.x86_64

$ cat /etc/fedora-release
Fedora release 34 (Thirty Four)

$ egrep -v "^#|^$" /etc/nsswitch.conf
passwd:     sss files systemd
group:      sss files systemd
netgroup:   sss files
automount:  sss files
services:   sss files
shadow:     files sss
hosts:      files myhostname mdns4_minimal [NOTFOUND=return] resolve
[!UNAVAIL=return] dns
bootparams: files
ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
publickey:  files
aliases:    files

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (11 preceding siblings ...)
  2021-07-02 16:26 ` mbhangui at gmail dot com
@ 2021-07-06 11:14 ` fweimer at redhat dot com
  2021-07-06 11:33 ` mbhangui at gmail dot com
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fweimer at redhat dot com @ 2021-07-06 11:14 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #9 from Florian Weimer <fweimer at redhat dot com> ---
Okay, I think I see the remaining bug now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (12 preceding siblings ...)
  2021-07-06 11:14 ` fweimer at redhat dot com
@ 2021-07-06 11:33 ` mbhangui at gmail dot com
  2021-07-06 11:47 ` fweimer at redhat dot com
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mbhangui at gmail dot com @ 2021-07-06 11:33 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

--- Comment #10 from cprogrammer <mbhangui at gmail dot com> ---
On Tue 6 Jul, 2021, 16:44 fweimer at redhat dot com, <
sourceware-bugzilla@sourceware.org> wrote:

>  Okay, I think I see the remaining bug now.
>

I did some more tests. It also happens when you call getgrent() and
getservent() in a dlmopened library.

>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (13 preceding siblings ...)
  2021-07-06 11:33 ` mbhangui at gmail dot com
@ 2021-07-06 11:47 ` fweimer at redhat dot com
  2021-07-06 16:19 ` gilles.m.duboscq at gmail dot com
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: fweimer at redhat dot com @ 2021-07-06 11:47 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

--- Comment #11 from Florian Weimer <fweimer at redhat dot com> ---
And another patch posted:
https://sourceware.org/pipermail/libc-alpha/2021-July/128548.html

Sorry this is taking so long to fix properly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (14 preceding siblings ...)
  2021-07-06 11:47 ` fweimer at redhat dot com
@ 2021-07-06 16:19 ` gilles.m.duboscq at gmail dot com
  2021-07-06 16:23 ` fweimer at redhat dot com
  2021-12-03 11:03 ` lewurm at gmail dot com
  17 siblings, 0 replies; 19+ messages in thread
From: gilles.m.duboscq at gmail dot com @ 2021-07-06 16:19 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

--- Comment #12 from Gilles Duboscq <gilles.m.duboscq at gmail dot com> ---
Thank you for the fixes Florian, anything that improves usage of dlmopen is
very much appreciated!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (15 preceding siblings ...)
  2021-07-06 16:19 ` gilles.m.duboscq at gmail dot com
@ 2021-07-06 16:23 ` fweimer at redhat dot com
  2021-12-03 11:03 ` lewurm at gmail dot com
  17 siblings, 0 replies; 19+ messages in thread
From: fweimer at redhat dot com @ 2021-07-06 16:23 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #13 from Florian Weimer <fweimer at redhat dot com> ---
Further fix for glibc 2.34:

commit 832f50be6c9c010e46180d14126bbb81f35e808c
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Jul 6 13:22:01 2021 +0200

    elf: Call free from base namespace on error in dl-libc.c [BZ #27646]

    In dlerror_run, free corresponds to the local malloc in the
    namespace, but GLRO (dl_catch_error) uses the malloc from the base
    namespace.  elf/tst-dlmopen-gethostbyname triggers this mismatch,
    but it does not crash, presumably because of a fastbin deallocation.

    Fixes commit c2059edce20c124d1a99f1a94cc52e83b77a917a ("elf: Use
    _dl_catch_error from base namespace in dl-libc.c [BZ #27646]") and
    commit b2964eb1d9a6b8ab1250e8a881cf406182da5875 ("dlfcn: Failures
    after dlmopen should not terminate process [BZ #24772]").

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug dynamic-link/27646] Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace.
  2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
                   ` (16 preceding siblings ...)
  2021-07-06 16:23 ` fweimer at redhat dot com
@ 2021-12-03 11:03 ` lewurm at gmail dot com
  17 siblings, 0 replies; 19+ messages in thread
From: lewurm at gmail dot com @ 2021-12-03 11:03 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27646

Bernhard Urban-Forster <lewurm at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lewurm at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-12-03 11:03 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 18:03 [Bug dynamic-link/27646] New: Linker error for non-existing NSS symbols (e.g. _nss_files_getcanonname_r) from within a dlmopen namespace alfonso.peterssen at oracle dot com
2021-03-31 10:00 ` [Bug dynamic-link/27646] " gilles.m.duboscq at gmail dot com
2021-05-16  3:39 ` evangelos at foutrelis dot com
2021-06-09 11:57 ` mbhangui at gmail dot com
2021-06-09 13:51 ` fweimer at redhat dot com
2021-06-09 13:57 ` fweimer at redhat dot com
2021-06-09 16:45 ` fweimer at redhat dot com
2021-06-14  7:45 ` gilles.m.duboscq at gmail dot com
2021-06-14  8:54 ` fweimer at redhat dot com
2021-06-14  8:55 ` fweimer at redhat dot com
2021-06-14  9:48 ` fweimer at redhat dot com
2021-06-17 13:09 ` fweimer at redhat dot com
2021-07-02 16:26 ` mbhangui at gmail dot com
2021-07-06 11:14 ` fweimer at redhat dot com
2021-07-06 11:33 ` mbhangui at gmail dot com
2021-07-06 11:47 ` fweimer at redhat dot com
2021-07-06 16:19 ` gilles.m.duboscq at gmail dot com
2021-07-06 16:23 ` fweimer at redhat dot com
2021-12-03 11:03 ` lewurm at gmail dot com

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).