using strace to trace fork() in 32 bit programs on x86_64

Hans Ecke hecke at
Thu Jul 14 09:31:42 UTC 2005


I'm trying to trace a legacy 32 bit application on a x86-64 machine. Linux 
2.6.7-SMP, glibc 2.3.2, gcc 3.3.1, strace 4.5.12.

That application fork()s children that I also need to trace. Unfortunately 
strace fails and all I see in the terminal is

    Fatal error occurred in preparation phase on 14-Jul-05 at 10:08:56
    Message is:
    Function not implemented
    Failed to fork sub-flow

The strace log shows

    fork()  = -1 ENOSYS (Function not implemented)

If I run strace with "-d" I get something like

    pid 9249 stopped, [SIGTRAP]
    [wait(0x57f) = 9249]
    pid 9249 stopped, [SIGTRAP]
    fork( [wait(0x57f) = 9249]
    pid 9249 stopped, [SIGTRAP]
    )          = -1 ENOSYS (Function not implemented)
    [wait(0x57f) = 9249]
    pid 9249 stopped, [SIGTRAP]
    [wait(0x57f) = 9249]
    pid 9249 stopped, [SIGTRAP]
    [wait(0x57f) = 9249]

which doesn't help too much, either...

The complete strace command line is

    strace -ffFq -e "trace=file,process" -e abbrev=none -v -x <command>

I tried compiling strace as 32 bit, but unfortunately our 32 bit process 
also calls 64 bit programs and fails when trying to trace those.

Do you have any comment on this? I'd be more than happy to help, test, 
code on this (this is a work project) but since I'm not too familiar with 
this area of expertise I'd need to be pointed in the right direction.

Looking through the changelog, support for 32 bit apps on x86_64 seems to 
be a work in progress. Maybe you are already working on this?

Thanks for a very useful tool


Hans Ecke              R&D Geophysicist
hans.ecke at      GX Technology, AXIS Imaging division
(USA) 303-625-2203     Denver, Colorado

More information about the Strace-devel mailing list