bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New dynamic loader (was Re: 2.1.96 & apache mod_setenv)


From: Petr Vandrovec
Subject: Re: New dynamic loader (was Re: 2.1.96 & apache mod_setenv)
Date: Fri, 10 Nov 2000 18:31:41 MET-1

On 10 Nov 00 at 8:39, Ulrich Drepper wrote:
> > Well, and why it works if I load libresolv.so manually, and not by
> > autoloading?
> 
> Loading libpthread has a lot of side effects.  It is not possible.  In
> future it might become possible because there will be new
> functionality in ld.so (no bug fixes, new code) which allows this for
> DSOs created in a special way but it's not possible to use it as you
> do it now.  If it worked before this was sheer luck.

If you'll look into ltrace of apache, you'll see that libpthread
was not involved in apache crash. I'm really surprised that others
using apache on Debian did not run into that too. Probably they do not
use LDAP and kerberos modules together (I have compiled everything
as modules...).

I tried to not to use RTLD_GLOBAL, but it simple does not work at all,

dlopen("/usr/local/lib/php_auth_vsbtuo.so", RTLD_NOW);
dlopen("/usr/lib/libldap.so", RTLD_NOW);

dies too (see ltrace log). BTW, first dlopen fails because of one of .so's 
it depends on is missing. I really can't believe that it is intended 
behavior. And, FYI, with RTLD_GLOBAL it dies too. But following works:

x = dlopen("/usr/lib/libldap.so", RTLD_NOW);
dlopen("/usr/local/lib/php_auth_vsbtuo.so", RTLD_NOW);
dlclose(x);
dlopen("/usr/lib/libldap.so", RTLD_NOW);

Why should matter whether libldap was loaded when php_auth_vsbtuo
were loading? It autoloads it anyway, as first module... Neither module
is linked to pthread, as you can see in SYS_open below...

If you are trying to say (by 'loading of pthread has a lot of side effects')
that new dl loader does not support weak symbols at all, then new glibc
is unusable for my system at all. 
                                                     Thanks,
                                                        Petr Vandrovec
                                                        address@hidden

                                                        

SYS_uname(0xbffff954)                             = 0
SYS_brk(NULL)                                     = 0x0804a0a0
SYS_open("/etc/ld.so.preload", 0, 00)             = -2
SYS_open("/etc/ld.so.cache", 0, 00)               = 3
SYS_fstat(3, 0xbffff0ec, 0, 0xbffff15c, 3)        = 0
SYS_mmap(0xbffff124, 0xbffff0ec, 0x40015e34, 0x400017eb, 3) = 0x40017000
SYS_close(3)                                      = 0
SYS_open("/lib/libdl.so.2", 0, 010000305640)      = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff0ac, 3, 0xbffff1b4, 3)        = 0
SYS_mmap(0xbffff064, 0xbffff084, 0x40015e34, 0xbffff090, 24) = 0x40022000
SYS_mprotect(0x40024000, 3532, 0, 0xbffff090, 3532) = 0
SYS_mmap(0xbffff064, 4096, 0x40015e34, 0xbffff090, 3532) = 0x40024000
SYS_close(3)                                      = 0
SYS_open("/lib/libc.so.6", 0, 010000305640)       = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff09c, 3, 0xbffff1a4, 3)        = 0
SYS_mmap(0xbffff054, 0xbffff074, 0x40015e34, 0xbffff080, 24) = 0x40025000
SYS_mprotect(0x40125000, 40388, 0, 0xbffff080, 40388) = 0
SYS_mmap(0xbffff054, 24576, 0x40015e34, 0xbffff080, 40388) = 0x40125000
SYS_mmap(0xbffff054, 0xbffff08c, 0x40015e34, 0x4012aec0, 0x4012b000) = 
0x4012b000
SYS_close(3)                                      = 0
SYS_open("/lib/libc.so.6", 0, 010000305640)       = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff02c, 3, 0xbffff134, 3)        = 0
SYS_close(3)                                      = 0
SYS_munmap(0x40017000, 44370)                     = 0
SYS_getpid()                                      = 9740
__libc_start_main(0x080485f4, 2, 0xbffffd8c, 0x08048350, 0x080486ac <unfinished 
...>
__register_frame_info(0x08049784, 0x08049880, 0xbffffd30, 0x400534b8, 
0x4012a26c) = 0x40024d98
dlopen("/usr/local/lib/php_auth_vsbtuo.so", 2 <unfinished ...>
SYS_brk(NULL)                                     = 0x0804a0a0
SYS_brk(0x0804a0d8)                               = 0x0804a0d8
SYS_brk(0x0804b000)                               = 0x0804b000
SYS_open("/usr/local/lib/php_auth_vsbtuo.so", 0, 02106) = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff3a4, 3, 0xbffff4ac, 3)        = 0
SYS_mmap(0xbffff38c, 0xbffff3ac, 0x40015e34, 0xbffff3b8, 24) = 0x40017000
SYS_mprotect(0x40019000, 4240, 0, 0xbffff3b8, 4240) = 0
SYS_mmap(0xbffff38c, 8192, 0x40015e34, 0, 0)      = 0x40019000
SYS_close(3)                                      = 0
SYS_open("/etc/ld.so.cache", 0, 07)               = 3
SYS_fstat(3, 0xbffff304, 7, 0xbffff374, 3)        = 0
SYS_mmap(0xbffff33c, 0xbffff304, 0x40015e34, 0, 3) = 0x4012f000
SYS_close(3)                                      = 0
SYS_open("/usr/lib/libldap.so.2", 0, 010004605640) = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff2c4, 3, 0xbffff3cc, 3)        = 0
SYS_mmap(0xbffff2ac, 0xbffff2cc, 0x40015e34, 0xbffff2d8, 24) = 0x4013a000
SYS_mprotect(0x4015e000, 4968, 0, 0xbffff2d8, 4968) = 0
SYS_mmap(0xbffff2ac, 8192, 0x40015e34, 0, 0)      = 0x4015e000
SYS_close(3)                                      = 0
SYS_open("/usr/lib/liblber.so.2", 0, 010004605640) = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff2b4, 3, 0xbffff3bc, 3)        = 0
SYS_mmap(0xbffff29c, 0xbffff2bc, 0x40015e34, 0xbffff2c8, 24) = 0x40160000
SYS_mprotect(0x40169000, 2920, 0, 0xbffff2c8, 2920) = 0
SYS_mmap(0xbffff29c, 4096, 0x40015e34, 0, 0)      = 0x40169000
SYS_close(3)                                      = 0
SYS_open("/lib/i686/mmx/libphp4.so", 0, 040)      = -2
SYS_stat("/lib/i686/mmx", 0xbffff2a4)             = -2
SYS_open("/lib/i686/libphp4.so", 0, 040)          = -2
SYS_stat("/lib/i686", 0xbffff2a4)                 = -2
SYS_open("/lib/mmx/libphp4.so", 0, 040)           = -2
SYS_stat("/lib/mmx", 0xbffff2a4)                  = -2
SYS_open("/lib/libphp4.so", 0, 040)               = -2
SYS_stat("/lib", 0xbffff2a4)                      = 0
SYS_open("/usr/lib/i686/mmx/libphp4.so", 0, 00)   = -2
SYS_stat("/usr/lib/i686/mmx", 0xbffff2a4)         = -2
SYS_open("/usr/lib/i686/libphp4.so", 0, 00)       = -2
SYS_stat("/usr/lib/i686", 0xbffff2a4)             = -2
SYS_open("/usr/lib/mmx/libphp4.so", 0, 00)        = -2
SYS_stat("/usr/lib/mmx", 0xbffff2a4)              = -2
SYS_open("/usr/lib/libphp4.so", 0, 00)            = -2
SYS_stat("/usr/lib", 0xbffff2a4)                  = 0
SYS_munmap(0x4012f000, 44370)                     = 0
<... dlopen resumed> )                            = NULL
dlerror()                                         = "shared object not open"
printf("Cannot load %s: %s\n", "/usr/local/lib/php_auth_vsbtuo.so", "shared 
object not open" <unfinished ...>
SYS_fstat(1, 0xbffff4d4, 0x40127ce0, 0xbffff574, 1) = 0
SYS_mmap(0xbffff53c, 0xbffff4d4, 0x4012a26c, 0x40127fc0, 1) = 0x4001b000
SYS_ioctl(1, 21505, 0xbffff4c0, 0xbffff508, 1)    = 0
SYS_write(1, "Cannot load /usr/local/lib/php_auth_vsbtuo.so: shared object not 
open\n", 70) = 70
<... printf resumed> )                            = 70
dlopen("/usr/lib/libldap.so", 2 <unfinished ...>
SYS_open("/usr/lib/libldap.so", 0, 027777772444)  = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff3a4, 3, 0xbffff4ac, 3)        = 0
SYS_close(3)                                      = 0
SYS_open("/etc/ld.so.cache", 0, 010004502150)     = 3
SYS_fstat(3, 0xbffff304, 0x40128468, 0xbffff374, 3) = 0
SYS_mmap(0xbffff33c, 0xbffff304, 0x40015e34, 0, 3) = 0x4012f000
SYS_close(3)                                      = 0
SYS_open("/usr/lib/liblber.so.2", 0, 010004605640) = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff2c4, 3, 0xbffff3cc, 3)        = 0
SYS_close(3)                                      = 0
SYS_open("/lib/libnsl.so.1", 0, 010004605640)     = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff2b4, 3, 0xbffff3bc, 3)        = 0
SYS_mmap(0xbffff26c, 0xbffff28c, 0x40015e34, 0xbffff298, 24) = 0x4016a000
SYS_mprotect(0x4017b000, 12864, 0, 0xbffff298, 12864) = 0
SYS_mmap(0xbffff26c, 8192, 0x40015e34, 0xbffff298, 12864) = 0x4017b000
SYS_mmap(0xbffff26c, 0xbffff2a4, 0x40015e34, 0x4017c0cc, 0x4017d000) = 
0x4017d000
SYS_close(3)                                      = 0
SYS_open("/lib/libresolv.so.2", 0, 010004605640)  = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff2a4, 3, 0xbffff3ac, 3)        = 0
SYS_mmap(0xbffff25c, 0xbffff27c, 0x40015e34, 0xbffff288, 24) = 0x4017f000
SYS_mprotect(0x4018c000, 13892, 0, 0xbffff288, 13892) = 0
SYS_mmap(0xbffff25c, 4096, 0x40015e34, 0xbffff288, 13892) = 0x4018c000
SYS_mmap(0xbffff25c, 0xbffff294, 0x40015e34, 0x4018cf54, 0x4018d000) = 
0x4018d000
SYS_close(3)                                      = 0
SYS_open("/usr/lib/libdb2.so.2", 0, 010004605640) = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff294, 3, 0xbffff39c, 3)        = 0
SYS_mmap(0xbffff27c, 0xbffff29c, 0x40015e34, 0xbffff2a8, 24) = 0x40190000
SYS_mprotect(0x401d2000, 4876, 0, 0xbffff2a8, 4876) = 0
SYS_mmap(0xbffff27c, 8192, 0x40015e34, 0, 0)      = 0x401d2000
SYS_close(3)                                      = 0
SYS_open("/usr/lib/libsasl.so.7", 0, 010004605640) = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff284, 3, 0xbffff38c, 3)        = 0
SYS_mmap(0xbffff26c, 0xbffff28c, 0x40015e34, 0xbffff298, 24) = 0x401d4000
SYS_mprotect(0x401dd000, 4564, 0, 0xbffff298, 4564) = 0
SYS_mmap(0xbffff26c, 8192, 0x40015e34, 0, 0)      = 0x401dd000
SYS_close(3)                                      = 0
SYS_open("/usr/lib/libdb2.so.2", 0, 010004605640) = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff0c4, 3, 0xbffff1cc, 3)        = 0
SYS_close(3)                                      = 0
SYS_open("/lib/libcrypt.so.1", 0, 010004605640)   = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff0a4, 3, 0xbffff1ac, 3)        = 0
SYS_brk(0x0804c000)                               = 0x0804c000
SYS_mmap(0xbffff05c, 0xbffff07c, 0x40015e34, 0xbffff088, 24) = 0x401df000
SYS_mprotect(0x401e4000, 163100, 0, 0xbffff088, 163100) = 0
SYS_mmap(0xbffff05c, 4096, 0x40015e34, 0xbffff088, 163100) = 0x401e4000
SYS_mmap(0xbffff05c, 0xbffff094, 0x40015e34, 0x401e4c38, 0x401e5000) = 
0x401e5000
SYS_close(3)                                      = 0
SYS_open("/lib/libpam.so.0", 0, 010004605640)     = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbffff094, 3, 0xbffff19c, 3)        = 0
SYS_mmap(0xbffff07c, 0xbffff09c, 0x40015e34, 0xbffff0a8, 24) = 0x4020c000
SYS_mprotect(0x40213000, 1740, 0, 0xbffff0a8, 1740) = 0
SYS_mmap(0xbffff07c, 4096, 0x40015e34, 0, 0)      = 0x40213000
SYS_close(3)                                      = 0
SYS_open("/lib/libcrypt.so.1", 0, 010004605640)   = 3
SYS_read(3, "\177ELF\001\001\001", 1024)          = 1024
SYS_fstat(3, 0xbfffef74, 3, 0xbffff07c, 3)        = 0
SYS_close(3)                                      = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++



reply via email to

[Prev in Thread] Current Thread [Next in Thread]