• Kristian Nielsen's avatar
    Attempt to fix rare race in test for MDEV-8031 · 1cbba45e
    Kristian Nielsen authored
    The error-injection inject_mdev8031 simulates a deadlock kill in a specific
    place, by setting killed_for_retry to RETRY_KILL_KILLED directly. If a real
    deadlock kill triggers at the same time, it is possible for the thread to
    complete its transaction retry and set rgi_slave to NULL before the real
    readlock kill can complete in the background. This will cause a segfault
    due to null-pointer access.
    
    Fix by changing the error injection to do a real background deadlock kill,
    which ensures that the thread will wait for any pending background kills to
    complete.
    Signed-off-by: default avatarKristian Nielsen <knielsen@knielsen-hq.org>
    1cbba45e
rpl_parallel.cc 96.5 KB