Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGRTMIN does not induce migration #33

Open
acarno opened this issue Jul 25, 2018 · 0 comments
Open

SIGRTMIN does not induce migration #33

acarno opened this issue Jul 25, 2018 · 0 comments
Labels

Comments

@acarno
Copy link
Contributor

acarno commented Jul 25, 2018

TL; DR: Deliver SIGRTMIN+1 instead of SIGRTMIN to induce migration when using signal triggering.

When the migration library is compiled with type=signal_trigger, delivering SIGRTMIN to a migrateable process should cause a migration proposal. However, the process instead terminates -- the default action for SIGRTMIN.

On investigation, this stems from a discrepancy between the specified signal -- SIGRTMIN according to lib/migration/include/config.h -- and the actual signal that we set:

[anthony@fox4 11:28 NPB-make-popcorn-quiet-signal]$ gdb ./EP_B
...
(gdb) break sigaction
Breakpoint 1 at 0x51bf28: file src/signal/sigaction.c, line 55.
(gdb) run
Starting program: /home/anthony/NPB-make-popcorn-quiet-signal/EP_B

Breakpoint 1, __sigaction (sig=35, sa=0xfffffffff038, old=0x0) at src/signal/sigaction.c:55
55      src/signal/sigaction.c: No such file or directory.

On the second-to-last-line, we see sig=35 -- this is (on my machines at least) SIGRTMIN+1. The reason likely stems from how glibc implements POSIX threads. From man 7 signal:

The Linux kernel supports a range of 33 different real-time signals, numbered 32 to 64. However, the glibc POSIX threads implementation internally uses two (for NPTL) or three (for LinuxThreads) real-time signals (see pthreads(7)), and adjusts the value of SIGRTMIN suitably (to 34 or 35).

The simple solution then is to deliver SIGRTMIN+1 instead of SIGRTMIN.

@acarno acarno added the wontfix label Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant