Bug 151245 - LTP madvise02 testcase segfaults
Summary: LTP madvise02 testcase segfaults
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Don Howard
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-16 11:28 UTC by Jay Turner
Modified: 2015-01-08 00:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-03-19 02:45:40 UTC
Target Upstream Version:
Embargoed:


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

Description Jay Turner 2005-03-16 11:28:24 UTC
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 11:29:23 UTC
Created attachment 112047 [details]
madvise02.c code

Comment 2 Don Howard 2005-03-17 20:55:15 UTC
Running the testcase by hand I see all tests passing.

Comment 3 Don Howard 2005-03-17 20:58:32 UTC
$ 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 21:03:54 UTC
Is this fault happening on an arch other than x86?

Comment 5 Jay Turner 2005-03-18 07:44:09 UTC
I'm getting horrible with bug reports these days.  Seeing this on IA64.

Comment 6 Don Howard 2005-03-19 02:45:40 UTC
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.