Bug 460521 - [5.2] LTP shmem_test_06 random failure
[5.2] LTP shmem_test_06 random failure
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.2.z
i686 Linux
medium Severity medium
: rc
: ---
Assigned To: Red Hat Kernel Manager
Martin Jenner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-28 08:45 EDT by CAI Qian
Modified: 2008-10-08 07:16 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-08 07:16:13 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)
strace for the failed test (12.64 KB, text/plain)
2008-08-28 08:45 EDT, CAI Qian
no flags Details
shmem_test_06 test case (11.74 KB, text/plain)
2008-08-28 08:46 EDT, CAI Qian
no flags Details

  None (edit)
Description CAI Qian 2008-08-28 08:45:07 EDT
Created attachment 315207 [details]
strace for the failed test

Description of problem:
I have seen LTP shmem_test_06 failed for both RHEL 4.7 and 5.2.z Kernels,

# ./shmem_test_06
./shmem_test_06: IPC Shared Memory TestSuite program

	mykey to uniquely identify the shared memory segment 0x331005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process

	Shared memory segment address : 0x0x20000000 

	Index through shared memory segment ...

	mykey to uniquely identify the shared memory segment 0x341005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process

	Shared memory segment address : 0x0x30000000 

	Index through shared memory segment ...

	mykey to uniquely identify the shared memory segment 0x351005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process

	Shared memory segment address : 0x0x48000000 

	Index through shared memory segment ...

	mykey to uniquely identify the shared memory segment 0x361005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process

	Shared memory segment address : 0x0x50000000 

	Index through shared memory segment ...

	mykey to uniquely identify the shared memory segment 0x371005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process

	Shared memory segment address : 0x0x60000000 

	Index through shared memory segment ...

	mykey to uniquely identify the shared memory segment 0x381005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process

	Shared memory segment address : 0x0x70000000 

	Index through shared memory segment ...

	mykey to uniquely identify the shared memory segment 0x391005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process

	Shared memory segment address : 0x0x80000000 

	Index through shared memory segment ...

	mykey to uniquely identify the shared memory segment 0x411005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process

	Shared memory segment address : 0x0x90000000 

	Index through shared memory segment ...

	mykey to uniquely identify the shared memory segment 0x421005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process

	Shared memory segment address : 0x0xa0000000 

	Index through shared memory segment ...

	mykey to uniquely identify the shared memory segment 0x431005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process

	Shared memory segment address : 0x0xb0000000 

	Index through shared memory segment ...

	mykey to uniquely identify the shared memory segment 0x451005ae

	Get shared memory segment (1048576 bytes)

	Attach shared memory segment to process
ERROR [line: 205] shmat failed - return: 0xffffffff: Invalid argument

If virtual address spaces randomization has been disabled, the test could always pass.
echo 0 >/proc/sys/kernel/exec-shield-randomize (RHEL 4.7)
echo 0 >/proc/sys/kernel/randomize_va_space (RHEL 5.2)

Version-Release number of selected component (if applicable):
kernel-2.6.9-78.EL.i686
kernel-2.6.18-92.1.10.el5.i686

How reproducible:
Always. 

Seen it on those machines so far,
i386-5s-1-m1.lab.bos.redhat.com (stable system RHEL5-U2)
ibm-firefly.rhts.bos.redhat.com (RHTS RHEL4-U7)
sun-x4200-01.rhts.bos.redhat.com (RHTS RHEL4-U7)

Steps to Reproduce:
1. wget http://downloads.sourceforge.net/ltp/ltp-base-20080731.tgz; tar zxvf ltp-base-20080731.tgz; cd ltp-base-20080731; make
2. cd ltp-base-20080731/testcases/kernel/ipc/ipc_stress
3. ./shmem_test_06 (sometimes, the test may pass, but if you go on running it within something like 5 times, it will eventually fail.)
  
Actual results:
ERROR [line: 205] shmat failed - return: 0xffffffff: Invalid argument

Expected results:
successful!

Additional info:
Is it expected with virtual address spaces randomization enabled? Is it related to BZ 234285(Problems mapping in the shared memory at the same address in address space of different processes)?
Comment 1 CAI Qian 2008-08-28 08:46:45 EDT
Created attachment 315208 [details]
shmem_test_06 test case
Comment 2 CAI Qian 2008-10-07 05:13:54 EDT
Looks like only i686 is affected.
Comment 3 CAI Qian 2008-10-08 07:16:13 EDT
Looks like this is a bug in LTP code.

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