Bug 101499

Summary: strace for mlock shows length wrong
Product: Red Hat Enterprise Linux 3 Reporter: Pete Zaitcev <zaitcev>
Component: straceAssignee: Roland McGrath <roland>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: s390   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-08-21 10:08:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Test case none

Description Pete Zaitcev 2003-08-01 21:08:39 UTC
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.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 21:10:40 UTC
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 21:11:19 UTC
Created attachment 93343 [details]
Test case

Comment 3 Roland McGrath 2003-08-21 10:08:30 UTC
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 17:04:35 UTC
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