Bug 496696 - memtester exits with invalid return code
memtester exits with invalid return code
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: memtester (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Lucian Langa
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-20 14:53 EDT by Mace Moneta
Modified: 2009-04-20 15:42 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-20 15:42:19 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)

  None (edit)
Description Mace Moneta 2009-04-20 14:53:07 EDT
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 15:33:12 EDT
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 15:42:19 EDT
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.