Bug 496696 - memtester exits with invalid return code
Summary: memtester exits with invalid return code
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: memtester
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Lucian Langa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-20 18:53 UTC by Mace Moneta
Modified: 2009-04-20 19:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-20 19:42:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mace Moneta 2009-04-20 18:53:07 UTC
Description of problem:

Memtester documentation indicates that the exit return code should be 0-7 (0 or the OR of x01, x02, x04).  It is exiting with return code 130, apparently always:

# memtester 2000
memtester version 4.0.8 (64-bit)
Copyright (C) 2007 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 2000MB (2097152000 bytes)
got  2000MB (2097152000 bytes), trying mlock ...locked.
Loop 1:
  Stuck Address       : testing   2^C
[root@slayer ~]# echo $?
130


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

memtester-4.0.8-3.fc11.x86_64

How reproducible:

Always

Steps to Reproduce:
1.Run memtester
2.ctrl-c to exit
3.Check return code
  
Actual results:

130

Expected results:

0 to 7, depending on whether a failure was detected.
Additional info:

Comment 1 Lucian Langa 2009-04-20 19:33:12 UTC
130 meaning is: script terminated by ctrl-c
(http://tldp.org/LDP/abs/html/exitcodes.html)

Running memtester on a 10 M with one iteration exit code is setup properly:

memtester 10 1
memtester version 4.0.8 (64-bit)
Copyright (C) 2007 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 10MB (10485760 bytes)
got  10MB (10485760 bytes), trying mlock ...locked.
Loop 1/1:
  Stuck Address       : ok         
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok
  Solid Bits          : ok         
  Block Sequential    : ok         
  Checkerboard        : ok         
  Bit Spread          : ok         
  Bit Flip            : ok         
  Walking Ones        : ok         
  Walking Zeroes      : ok         

Done.

# echo $?
0

Comment 2 Mace Moneta 2009-04-20 19:42:19 UTC
I received a similar response from the author:

> That's if you let it exit by itself.  If you kill it, the exit code will be as
> set by your system; 130 is typically the value (encoded as per exit()) for
> SIGINT -- i.e. ctrl-c.
> 
> That's normal.
> 
> Charles

That means that running without a loop count is not useful, as you'll never know if an error occurred during the run (which may last several days).

Since this is by design, I'll close the bug.


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