Skip to content
Snippets Groups Projects
  • Nadav Har'El's avatar
    229020d2
    tst-kill: fix crash · 229020d2
    Nadav Har'El authored
    
    tst-kill runs various signal handlers, which we run in separate threads.
    When the test completes, we may be unlucky enough for the last signal
    handler to still be running, at which point when the module's memory
    is unmapped (e.g., in test.py -s each test is unmapped when it ends)
    we can get a page fault and a crash.
    
    This patch sleeps for a second at the end of tst-kill, to make sure that
    the signal handler has completed; This sleep is a bit ugly, but I can't
    think of a cleaner way - Posix provides no way to check if there's a
    running handler, and I wouldn't like to add a new API just for this test.
    
    Fixes #249.
    
    Reviewed-by: default avatarRaphael S. Carvalho <raphaelsc@cloudius-systems.com>
    Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
    Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
    229020d2
    History
    tst-kill: fix crash
    Nadav Har'El authored
    
    tst-kill runs various signal handlers, which we run in separate threads.
    When the test completes, we may be unlucky enough for the last signal
    handler to still be running, at which point when the module's memory
    is unmapped (e.g., in test.py -s each test is unmapped when it ends)
    we can get a page fault and a crash.
    
    This patch sleeps for a second at the end of tst-kill, to make sure that
    the signal handler has completed; This sleep is a bit ugly, but I can't
    think of a cleaner way - Posix provides no way to check if there's a
    running handler, and I wouldn't like to add a new API just for this test.
    
    Fixes #249.
    
    Reviewed-by: default avatarRaphael S. Carvalho <raphaelsc@cloudius-systems.com>
    Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
    Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>