Red Hat Bugzilla – Bug 192193
statistics broken when switching personalities
Last modified: 2007-11-30 17:07:25 EST
$ cat helloWorld.c
int main ( void )
printf( "Hello World\n" );
$ gcc -g -m32 -o helloWorld helloWorld.c
$ strace -c ./helloWorld
[ Process PID=18962 runs in 32 bit mode. ]
Process 18962 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
3.96 1275605287168.1374389535023 4196074544597155 304 sendto
4.51 1451698946383.1460288880979 4257185943319299 341 342 recv
4.19 1348619729142.1425929142603 4049913378592020 333 334 send
The bt under ElectricFence:
2752 if (counts == NULL || counts[i].calls == 0)
#0 0x0000000000405a41 in call_summary (outf=0x3d8e72e680) at syscall.c:2752
#1 0x0000000000403362 in main (argc=18945, argv=0x0) at strace.c:676
#2 0x0000003d8e51c4bb in __libc_start_main (main=0x402c00 <main>, argc=3,
ubp_av=0x7fbffff6f8, init=0x413500 <__libc_csu_init>, fini=Variable "fini" is
(gdb) p i
$3 = 254
A good explanation of the problem from Bryan Mason:
Not only do x86_64 and i386 personalities have different numbers of syscalls
(i386 has 343 and x86_64 has 254), but the syscalls have different numbers. For
example execve is syscall number 11 in i386 but it's syscall number 59 on x86_64.
The crash occurs when trying to access syscalls > 254.
The work-around is obviously to use the 32-bit strace in the meanwhile.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Created attachment 143584 [details]
Proposed fix, please test.
these bugs are fixed upstream in the coming 4.5.15 release
This bug should be fixed in strace-4.5.15-1.el4 rpms.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.