mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
zdtm: use tkill instead of kill in sigaltstack
Each signals should be sent to a proper thread.. Probably it was a reason of a error, which was caught yesterday + cat zdtm/live/static/sigaltstack.out 20:57:10.933: 4380: thread in sas: at 0x6083e0 (size 0x2000 flags 0x1) 20:57:10.934: 4380: Waiting in thread SAS 20:57:11.219: 4380: Thread may leave SAS 20:57:11.219: 4380: Leaving thread SAS 20:57:11.219: 4380: leader in sas: at 0x6083e0 (size 0x2000 flags 0x1) 20:57:11.219: 4380: main old: at 0x6063e0 (size 0x2000 flags 0x1) 20:57:11.220: 4380: main new: at 0x6083e0 (size 0x2000 flags 0x1) 20:57:11.220: 4380: thrd old: at 0x6083e0 (size 0x2000 flags 0x1) 20:57:11.220: 4380: thrd new: at 0x6083e0 (size 0x2000 flags 0x1) 20:57:11.220: 4380: FAIL: sigaltstack.c:163: sas not restored (errno = 11 (Resource temporarily unavailable)) https://bugzilla.openvz.org/show_bug.cgi?id=2668 Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
ae44dd36a1
commit
f38fe4480c
@@ -88,7 +88,7 @@ static void *thread_func(void *arg)
|
||||
exit_group(-1);
|
||||
}
|
||||
|
||||
kill(gettid(), SIGUSR2);
|
||||
syscall(__NR_tkill, gettid(), SIGUSR2);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -145,7 +145,7 @@ int main(int argc, char *argv[])
|
||||
test_msg("Thread may leave SAS\n");
|
||||
task_waiter_complete(&t, 3);
|
||||
|
||||
kill(gettid(), SIGUSR1);
|
||||
syscall(__NR_tkill, gettid(), SIGUSR1);
|
||||
|
||||
if (pthread_join(thread, NULL)) {
|
||||
fail("Error joining thread");
|
||||
|
Reference in New Issue
Block a user