Bug 151245 - LTP madvise02 testcase segfaults
LTP madvise02 testcase segfaults
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Don Howard
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-16 06:28 EST by Jay Turner
Modified: 2015-01-07 19:09 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-18 21:45:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
madvise02.c code (9.07 KB, text/x-csrc)
2005-03-16 06:29 EST, Jay Turner
no flags Details

  None (edit)
Description Jay Turner 2005-03-16 06:28:24 EST
Description of problem:
Running ltp-full-20050307 against the 2.4.21-30.EL results in a sig11 in the
madvise02 testscript.  This testcase runs successfully on RHEL4
(2.6.9-5.0.3.EL.)  Might very well be a testcase issue, but nothing "looks"
obviously wrong at first blush.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Jay Turner 2005-03-16 06:29:23 EST
Created attachment 112047 [details]
madvise02.c code
Comment 2 Don Howard 2005-03-17 15:55:15 EST
Running the testcase by hand I see all tests passing.
Comment 3 Don Howard 2005-03-17 15:58:32 EST
$ sudo ./madvise02
madvise02    1  PASS  :  expected failure - errno = 22 : Invalid argument
madvise02    2  PASS  :  expected failure - errno = 22 : Invalid argument
madvise02    3  PASS  :  expected failure - errno = 22 : Invalid argument
madvise02    4  PASS  :  expected failure - errno = 12 : Cannot allocate memory
madvise02    5  PASS  :  expected failure - errno = 9 : Bad file descriptor


$ cat /etc/redhat-release
Red Hat Enterprise Linux WS release 3 (Taroon Update 4)
$ uname -a
Linux scarletbegonias 2.4.21-30.ELsmp #1 SMP Wed Mar 9 19:39:50 EST 2005 i686
i686 i386 GNU/Linux
Comment 4 Don Howard 2005-03-17 16:03:54 EST
Is this fault happening on an arch other than x86?
Comment 5 Jay Turner 2005-03-18 02:44:09 EST
I'm getting horrible with bug reports these days.  Seeing this on IA64.
Comment 6 Don Howard 2005-03-18 21:45:40 EST
Looks like the crash is due to a typo bug in the testcase:


--- madvise02.c.orig    2005-03-18 21:32:22.000000000 -0500
+++ madvise02.c 2005-03-18 21:32:46.000000000 -0500
@@ -308,7 +308,7 @@ void check_and_print(int expected_errno)
                                TEST_ERRNO, strerror(TEST_ERRNO));
                } else {
                        tst_resm(TFAIL, "got errno = %d : %s",
-                               EINVAL, TEST_ERRNO, strerror(TEST_ERRNO));
+                                TEST_ERRNO, strerror(TEST_ERRNO));
                }
        } else {
                tst_resm(TFAIL, "madvise failed, expected "


With this patch the test now fails (but does not crash) at case 5 - this failure
also looks to be an ia64 specific bug in the test itself - on other arches
memory is allocated for this test, but not for ia64.   I don't follow why that
might be.

I can dig into this some more later if needed, but it's not a kernel bug.
Reopen this if you've got more questions.



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