[klibc] sample sleep command killed

Phil Howard kunnskaperen at gmail.com
Wed Jul 14 04:34:46 PDT 2010


I re-wrote the compile script to build klibc (cleaning up how I do it,
and how to find the source tarballs).  It seems to be compiling fine.
I tried several of the commands in usr/utils/static and most one.
However, the sleep command fails in a strange way (EINVAL on execve):

================================================================
faraday/phil /home/phil/klibc-project-0 581> strace -ftt -s 96
klibc-1.5.18/usr/utils/static/true
07:33:08.185542 execve("klibc-1.5.18/usr/utils/static/true",
["klibc-1.5.18/usr/utils/static/true"], [/* 38 vars */]) = 0
07:33:08.185880 _exit(0)                = ?
Process 29017 detached
faraday/phil /home/phil/klibc-project-0 582> strace -ftt -s 96
klibc-1.5.18/usr/utils/static/sleep 6
07:33:10.636524 execve("klibc-1.5.18/usr/utils/static/sleep",
["klibc-1.5.18/usr/utils/static/sleep", "6"], [/* 38 vars */]) = -1
EINVAL (Invalid argument)
07:33:10.636930 +++ killed by SIGKILL +++
Process 29020 detached
faraday/phil /home/phil/klibc-project-0 583> ldd
klibc-1.5.18/usr/utils/static/true klibc-1.5.18/usr/utils/static/sleep
klibc-1.5.18/usr/utils/static/true:
        not a dynamic executable
klibc-1.5.18/usr/utils/static/sleep:
        not a dynamic executable
faraday/phil /home/phil/klibc-project-0 584> file
klibc-1.5.18/usr/utils/static/true klibc-1.5.18/usr/utils/static/sleep
klibc-1.5.18/usr/utils/static/true:  ELF 32-bit LSB executable, Intel
80386, version 1 (SYSV), statically linked, stripped
klibc-1.5.18/usr/utils/static/sleep: ELF 32-bit LSB executable, Intel
80386, version 1 (SYSV), statically linked, stripped
faraday/phil /home/phil/klibc-project-0 585> ls -dl
klibc-1.5.18/usr/utils/static/true klibc-1.5.18/usr/utils/static/sleep
-rwxr-xr-x 1 phil phil 4168 2010-07-14 07:17 klibc-1.5.18/usr/utils/static/sleep
-rwxr-xr-x 1 phil phil  548 2010-07-14 07:17 klibc-1.5.18/usr/utils/static/true
faraday/phil /home/phil/klibc-project-0 586>
================================================================

I'm guessing execve thinks this can't be executed for some reason.
Even so, SIGKILL seems strange (shouldn't the shell forked child just
report the execve failure, instead?).  Any ideas where I should look,
next?



More information about the klibc mailing list