Crunchez vos adresses URL
|
Rejoignez notre discord
|
Hébergez vos photos
Affichage des résultats 1 à 3 sur 3
  1. #1
    Hi,

    I have patch for freezes on test #7 in SMP mode. The bug can (and probably will) occur if you have less than 8 CPU threads and more than (something around) 5 G of RAM.

    Bug is directly inside test #7 code (test.c: block_move()). Function calculate_chunk(&start, &end,...) returns address of the first (start) and the last (end) word to be tested by this cpu. The variable end is incremented so it points just after the tested memory. After that, this big block is divided into one or more smaller blocks of size <= 256MB. But this won't happen if integer overflow occurs during the incrementation.

    So this code may leads to different count of blocks for the last cpu (the one with the highest memory address) and all other. Different count of blocks means also different count of calls of function do_tick(me); and therefore different count of calls of s_barrier();. Than the deadlock is inevitable.

    The fix is quite simple:

    Code:
    --- a/test.c
    +++ b/test.c
    @@ -1202,7 +1202,7 @@ void block_move(int iter, int me)
                 } else {
                     pe = end;
                 }
    -            if (pe >= end) {
    +            if ((pe >= end && end != 0) || (pe < p && end == 0)) {
                     pe = end;
                     done++;
                 }
    @@ -1280,7 +1280,7 @@ void block_move(int iter, int me)
                 } else {
                     pe = end;
                 }
    -            if (pe >= end) {
    +            if ((pe >= end && end != 0) || (pe < p && end == 0)) {
                     pe = end;
                     done++;
                 }
    @@ -1359,7 +1359,7 @@ void block_move(int iter, int me)
                 } else {
                     pe = end;
                 }
    -            if (pe >= end) {
    +            if ((pe >= end && end != 0) || (pe < p && end == 0)) {
                     pe = end;
                     done++;
                 }
    Beware: Check that all three chunks change the function block_move(). Same code is also in the other tests, but they do not need to be patched because there is no incrementation of variable end. This is especially important if you have applied other patches and line numbers are not exactly the same.

  2. #2
    Thank you for this hadrava.


    Two machines with 8 Megabytes of ram both freeze at 22% into test #7 when in SMP mode (F2).

    The bug hit an Intel machine and I thought it was a problem with the machine. But today the exact same freeze occurred on an AMD machine...So it is not a hardware problem.

    A new version of Memtest86+-5.01 is built on Slackware 14.2 x86 using the patches from Debian stretch:

    https://sources.debian.org/src/memte...ebian/patches/

    http://deb.debian.org/debian/pool/ma....debian.tar.xz

    The patches needed are listed in the debian/patches/series file:
    doc-serialconsole
    multiboot
    memtest86+-5.01-O0.patch
    memtest86+-5.01-array-size.patch
    gcc-5
    After applying these 5 patches and applying the SMP-test7-freeze patch it compiles with:
    make memtest.bin
    Dernière modification par aaazen ; 25/03/2019 à 13h43. Motif: link to patch source code

  3. #3
    Thank you very much for this patch. I've been looking for a week!

Règles de messages

  • Vous ne pouvez pas créer de nouvelles discussions
  • Vous ne pouvez pas envoyer des réponses
  • Vous ne pouvez pas envoyer des pièces jointes
  • Vous ne pouvez pas modifier vos messages
  •