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

Debugging libc6 - how

I have just upgraded to libc6.0.2-3.

I think it has broken something, because the postgresql installation has
stopped working.  It is a weird happening:

In the postinst script, I call PostgreSQL's initdb script to create the
database framework if it doesn't already exist.

        su - postgres -c "PATH=\$PATH:$PGBASE/bin ${PGBASE}/bin/initdb -l
${PGLIB} -r ${PGDATA} -u postgres"

(This has to be run by the postgres user, because root is not allowed to
access the PostgreSQL database.)

Since the upgrade to libc6, this now breaks with incorrect data being
given to a PostgreSQL function (which triggers an assertion error)

On the other hand,  if I start an interactive shell as postgres
(`su - postgres') and do exactly the same command, it works correctly.
The trouble is, that I don't know how to use the debugger in such a
situation.  There are two problems:

a) How to use the libc debugging library - I think I have to link in
/usr/lib/libc_g.a - is there a debuggable shared library? Do I have
to load the libc6 source package to make any proper use of the debuggable

b) How can I debug a program that is somehow being upset by its environment
when run from `su'?  If I do `gdb su', I'll be debugging the wrong program,
and if I do `su - postgres' first, the environment will be right and the
program won't fail anyway?

Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver

PGP key from public servers; key ID 32B8FAA1

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: