Bug 101499 - strace for mlock shows length wrong
strace for mlock shows length wrong
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: strace (Show other bugs)
3.0
s390 Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-01 17:08 EDT by Pete Zaitcev
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-21 06:08:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test case (489 bytes, text/plain)
2003-08-01 17:11 EDT, Pete Zaitcev
no flags Details

  None (edit)
Description Pete Zaitcev 2003-08-01 17:08:39 EDT
Running strace on the sample program produces:

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40016000
write(1, "Testing 00401978[1024]\n", 23) = 23
mlock(0x401978, 1073831936)             = 0
write(1, "Return 0, errno 0\n", 18)     = 18
munmap(0x40016000, 4096)                = 0

The length is 1024 (passed to kernel correctly, verified).
The number garbage number 1073831936 is 0x40016000, which was returned
by mmap above.

[zaitcev@devel6 ltp]$ cat /proc/version
Linux version 2.4.21-1.1931.2.338.z31 (zaitcev@devel6.z900.redhat.com) (gcc
version 3.2.3 20030422 (Red Hat Linux 3.2.3-4)) #6 SMP Tue Jul 29 20:17:24 EDT 2003
[zaitcev@devel6 ltp]$ rpm -q glibc
glibc-2.3.2-8
[zaitcev@devel6 ltp]$ rpm -q strace
strace-4.4.93-2
[zaitcev@devel6 ltp]$

The run above was done at Taroon.
Comment 1 Pete Zaitcev 2003-08-01 17:10:40 EDT
The test is called "munlock" because it degenerated from an LTP test
for munlock(2) which Brock runs for QA regression testing.
Comment 2 Pete Zaitcev 2003-08-01 17:11:19 EDT
Created attachment 93343 [details]
Test case
Comment 3 Roland McGrath 2003-08-21 06:08:30 EDT
The argument count for the mlock syscall was wrong in the table.
I fixed it upstream, and a new rpm will roll through before long.
Comment 4 Jay Turner 2004-01-16 12:04:35 EST
An errata 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.

http://rhn.redhat.com/errata/RHBA-2003-361.html

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