[uClibc] 0.9.27 powerpc dumps core sometimes without ld.so.cache

Andrew May acmay at acmay.homeip.net
Wed Jun 1 02:32:01 UTC 2005


So I have been running on the ppc with uclibc 0.9.27, binutils 2.14.90.0.8, and gcc 3.3.4
ok for awhile now.

But I have seen some strange crashes/core dumps on some 3 command pipes
in some shell scripts.

I have narrowed it down to this test script, that will fail ever now and then.
But I then noticed if I run ldconfig first it seems to run through OK all the
time.

===============================
#!/bin/sh
i=0
ulimit -c 1000
USER=admin
while true; do
        if [ -n "$(cat /etc/group | grep www-priv | grep $USER[,]*$)" ]; then
                PRIV=1
        else
   #Assume not non-priv for all bad usernames
                PRIV=0
        fi
        if [ "$PRIV" != "1" ]; then
                echo PRIV is wrong $PRIV
        fi
        i=$(( $i + 1 ))
done
===========================================

>From the core file it leaves behind it always seems to be the 2nd grep that fails.
And from what I can tell it is from the check_suid call to getuid.

(gdb) backtrace full
#0  0x00000000 in ?? ()
No symbol table info available.
#1  0x100043c8 in main ()
No symbol table info available.
(gdb) x 0x100043c4
0x100043c4 <main+1148>: 0x4808070d

Doing a rebuild with symbols and matching up the objdump output
I matched up 0x100043c4 to 0x100043ec. I did not run it with the "gcc -c"
version to make sure it really crashes at the same spot.

100043d8 <check_suid>:
100043d8:       94 21 ff e0     stwu    r1,-32(r1)
100043dc:       7c 08 02 a6     mflr    r0
100043e0:       bf a1 00 14     stmw    r29,20(r1)
100043e4:       90 01 00 24     stw     r0,36(r1)
100043e8:       7c 7d 1b 78     mr      r29,r3
100043ec:       48 08 0f 85     bl      10085370 <grf+0x25c>
100043f0:       7c 7f 1b 78     mr      r31,r3
100043f4:       48 08 0d d5     bl      100851c8 <grf+0xb4>

I am not really into all the shared lib details, but I the above made
me think the symbol fixup was going wrong somehow.

So when I ran "ldd" on busybox I saw the print on the ld.so.cache being
missing so I ran "ldconfig" to create the file.

After that the problem seemed to go away.

Has anyone else been running without the ld.so.cache file? Does it cause
problems.

Any chance this is something already fixed in the later snapshots?

Am I completely off base on this?

Thanks.


More information about the uClibc mailing list