Commit Graph

18 Commits

Author SHA1 Message Date
antirez
a1c9c05e17 Hopefully better memory test on crash.
The old test, designed to do a transformation on the bits that was
invertible, in order to avoid touching the original memory content, was
not effective as it was redis-server --test-memory. The former often
reported OK while the latter was able to spot the error.

So the test was substituted with one that may perform better, however
the new one must backup the memory tested, so it tests memory in small
pieces. This limits the effectiveness because of the CPU caches. However
some attempt is made in order to trash the CPU cache between the fill
and the check stages, but not for the addressing test unfortunately.

We'll see if this test will be able to find errors where the old failed.
2015-12-16 17:41:22 +01:00
antirez
ac8f4a6af9 memtest.c now can be called as API in non interactive mode. 2015-12-16 12:31:42 +01:00
antirez
5f5a9f0d14 Include stropts only if __sun is defined. 2014-12-09 12:59:46 +01:00
Jan-Erik Rediger
f3c1aac7e6 Fix implicit declaration of ioctl on Solaris 2014-12-01 23:22:03 +01:00
Xian Li
f510cfb4ef memtest: Add missing free()
Closes #1614
2014-08-08 10:30:14 +02:00
antirez
93f61bb2a4 Fixed a bug in memtest progress bar, that had no actual effects.
This closes issue #859, thanks to @erbenmo.
2013-01-21 12:34:22 +01:00
antirez
b1b602a928 On crash memory test rewrote so that it actaully works.
1) We no longer test location by location, otherwise the CPU write cache
completely makes our business useless.
2) We still need a memory test that operates in steps from the first to
the last location in order to never hit the cache, but that is still
able to retain the memory content.

This was tested using a Linux box containing a bad memory module with a
zingle bit error (always zero).

So the final solution does has an error propagation step that is:

1) Invert bits at every location.
2) Swap adiacent locations.
3) Swap adiacent locations again.
4) Invert bits at every location.
5) Swap adiacent locations.
6) Swap adiacent locations again.

Before and after these steps, and after step 4, a CRC64 checksum is computed.
If the three CRC64 checksums don't match, a memory error was detected.
2012-11-29 10:24:35 +01:00
antirez
5a9e3f5842 Fast memory test on Redis crash. 2012-11-21 13:24:44 +01:00
antirez
4365e5b2d3 BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
antirez
ffe003dcbe memtest.c fixed to actually use v1 and v2 in memtest_fill_value(). 2012-04-27 16:29:44 +02:00
antirez
4c442e9d88 memtest.c: integer overflow fixed. 2012-04-12 11:49:52 +02:00
antirez
d98b03b791 Macros ULONG_ONEZERO / ULONG_ZEROONE were inverted in #ifdef to test 32/64 bit arch. 2012-04-11 11:32:22 +02:00
antirez
d4a515c56d Memory addressing test implemented. 2012-03-19 14:02:34 +01:00
antirez
d033ccb0af More memory tests implemented. Default number of iterations lowered to a more acceptable value of 50. 2012-03-18 18:03:27 +01:00
antirez
a5801142a4 Fixed typo. 2012-03-18 17:27:56 +01:00
antirez
1a197a3c1a Number of iteration of --test-memory is now 300 (several minutes per gigabyte). Memtest86 and Memtester links are also displayed while running the test. 2012-03-18 17:25:00 +01:00
antirez
fb068dc91d Memory test function now less boring thanks to screen-wide progress bar. 2012-03-16 21:19:53 +01:00
antirez
54e0fa1c27 Hem... actual memtest.c file added. 2012-03-16 17:21:49 +01:00