• Eugene Batalov's avatar
    test: fix race in transition/maps008 that lead to fail of test · 40a7f385
    Eugene Batalov authored
    Running test/zdtm.py run -t zdtm/transition/maps008 --snap --pre 30
    in a loop I got test failure with "Mem differs"
    error each ~20 minutes. The cause of the bug is in lack of
    synchronization between processes that still do datagen stage of
    test and processes that already do datacheck stage of test.
    As a result we can get "Mem differs" error if:
    1. Process P1 being on datacheck stage fetches a byte with
       offset X from ashmem vma VMA1 into CPU register.
    2. Process P2 still being on datagen stage changes byte with offset X
       in the same ashmem vma VMA1.
    3. Process P1 fetches byte with offset X from another ashmem vma VMA2
       mapped to the same physical memory as VMA1.
    4. Process P1 compares two fetched bytes and finds out that they
       have different values.
    5. Process P1 reports "Mem differs" error.
    
    Race is fixed by waiting for all processes to exit datagen stage
    before proceeding to datacheck stage.
    Signed-off-by: 's avatarEugene Batalov <eabatalov89@gmail.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    40a7f385
Name
Last commit
Last update
..
inhfd Loading commit data...
jenkins Loading commit data...
others Loading commit data...
zdtm Loading commit data...
.gitignore Loading commit data...
Makefile Loading commit data...
abrt.sh Loading commit data...
check_actions.py Loading commit data...
crit-recode.py Loading commit data...
groups.desc Loading commit data...
inhfd.desc Loading commit data...
show_action.sh Loading commit data...
zdtm.desc Loading commit data...
zdtm.py Loading commit data...
zdtm_ct.c Loading commit data...
zdtm_mount_cgroups Loading commit data...