Bug 179740 - 32-bit umask() stops tracing the application
Summary: 32-bit umask() stops tracing the application
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: strace
Version: 5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-02 16:27 UTC by Henrik Nordstrom
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version: 4.5.15-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-17 03:06:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
strace-alt-internal_syscall.diff (1.16 KB, patch)
2006-12-14 01:41 UTC, Dmitry V. Levin
no flags Details | Diff

Description Henrik Nordstrom 2006-02-02 16:27:29 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8) Gecko/20060103 Fedora/1.5-4 Firefox/1.5

Description of problem:
strace stops tracing 32-bit applications when reaching the umask() call

Version-Release number of selected component (if applicable):
strace-4.5.14-1 kernel-2.6.15-1.1884_FC5

How reproducible:
Always

Steps to Reproduce:
1. Compile this test program in 32-bit mode

% gcc -m32 test.c

#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>

int main(int argc, char **argv)
{
    umask(0);
    printf("Hello world\n");
}

2. Strace the resulting binary

strace ./a.out


Actual Results:  [....]
munmap(0xf7f16000, 144124)              = 0
umask(0Hello world
 <unfinished ... exit status 0>
Process 6567 detached


Expected Results:  (from a trace of a 64-bit binary of the same source)
[...]
munmap(0x2add55220000, 144124)          = 0
umask(0)                                = 02
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2add55220000
write(1, "Hello world\n", 12Hello world


Additional info:

Comment 1 Rahul Sundaram 2006-02-20 10:45:20 UTC

These bugs are being closed since a large number of updates have been released
after the FC5 test1 and test2 releases. Kindly update your system by running yum
update as root user or try out the third and final test version of FC5 being
released in a short while and verify if the bugs are still present on the system
.Reopen or file new bug reports as appropriate after confirming the presence of
this issue. Thanks

Comment 2 Henrik Nordstrom 2006-02-20 16:38:16 UTC
% uname -a
Linux localhost.localdomain 2.6.15-1.1955_FC5 #1 SMP Wed Feb 15 15:45:28 EST
2006 x86_64 x86_64 x86_64 GNU/Linux
% rpm -q strace
strace-4.5.14-1.2


still same symptoms.


Some more testing indicates this may be a glibc issue rather than kernel.

1. FC4 i386 userspace  :  works
2. FC4 x86_64 userspace:  fails
3. FC5-test/development x86_64     :  fails
4. FC5-test/development x86_64 running the FC4 i386 strace binary: fails

all on the same kernel (switched userspace by chrooting from the running FC5
test install), all straceing the same 32-bit binary compiled per the
instructions above..

glibc is the only difference between 1 and 4 is from what I can tell..



Comment 3 Henrik Nordstrom 2006-10-02 23:52:20 UTC
Still seen with Fedora Core 6 test 3 + updates..

Comment 4 Dmitry V. Levin 2006-12-14 01:41:20 UTC
Created attachment 143588 [details]
strace-alt-internal_syscall.diff

Proposed fix, please test.

Comment 5 Dmitry V. Levin 2006-12-21 11:45:51 UTC
Fixed upstream.

Comment 6 Roland McGrath 2007-01-17 03:06:57 UTC
4.5.15 in rawhide and in updates for fc5 and fc6 fixes this.


Note You need to log in before you can comment on or make changes to this bug.