OpenSolaris

Printable Version Enter a New Search
Bug ID 6600192
Synopsis lx_librtld_db doesn't seem to work
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:brandz
Keywords
Responsible Engineer Edward Pilatowicz
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_89
Fixed In snv_89
Release Fixed solaris_nevada(snv_89)
Related Bugs 6409350 , 6599699
Submit Date 3-September-2007
Last Update Date 8-May-2008
Description
Well, the first problem with lx_librtld_db is that in most cases it
is not loaded.  this is because when librtld_db tries to determine if
the current target is branded, it calls ps_pbrandname() which fails
because of:
	6599699 libproc sometimes fails to determine a processes brand

but with this bug fixed, librtld_db does load the lx_librtld_db brand
plugin library.  It then tries calling into the plugin library which then
fails with the following error message:
	lx_ldb_client_init: couldn't read ehdr

If we use pargs -x to lookup the phdr lx brand aux vector and then
use mdb to print it out we usually see something like this:
---8<---
> fef60034::print Elf32_Phdr
{
    p_type = 0x6
    p_offset = 0x34
    p_vaddr = 0x34
    p_paddr = 0x34
    p_filesz = 0xe0
    p_memsz = 0xe0
    p_flags = 0x5
    p_align = 0x4
}
---8<---

This means that lx_librtld_db`lx_ldb_client_init() tries to read
from p_vaddr - p_offset, which is usually 0.  Hence the failure
and error message.

On live processes, libproc will fail back to using /proc and we'll
manage to get a limited number of symbols.  (local symbols are not
accessible via /proc.)  but on core files we're left without any
linux symbols at all.
The problem is that the code above is not translating elf header
offsets into memory addresses correctly.  it needs to take into
account the addresses that objects were loaded at instead of
just the offsets in the headers themselves.
Work Around
N/A
Comments
N/A