Bug 460521

Summary: [5.2] LTP shmem_test_06 random failure
Product: Red Hat Enterprise Linux 5 Reporter: Qian Cai <qcai>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED NOTABUG QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2.zCC: jburke, lwoodman
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-08 11:16:13 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
strace for the failed test
none
shmem_test_06 test case none

Description Qian Cai 2008-08-28 12:45:07 UTC
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 Qian Cai 2008-08-28 12:46:45 UTC
Created attachment 315208 [details]
shmem_test_06 test case

Comment 2 Qian Cai 2008-10-07 09:13:54 UTC
Looks like only i686 is affected.

Comment 3 Qian Cai 2008-10-08 11:16:13 UTC
Looks like this is a bug in LTP code.