Describe the bug
In TaskTracer::SignalTrace, we use sigqueue to send SIGURG to worker_tid. This may not be correct.
In fact, although the type of worker_tid is pid_t, It is actually the id of the LWP(Light Weight Process). If we use sigqueue, SIGURG will send to current process. Then os will select one of the threads to handle this signal. This is not what we want. We hope that only the worker thread corresponding to the TaskGroup receives this signal.
We can use the rt_tgsigqueueinfo, this syscall can achieve our goal.
Here is the relevant documentation:https://linux.die.net/man/2/rt_sigqueueinfo
Describe the bug
In
TaskTracer::SignalTrace, we usesigqueueto sendSIGURGtoworker_tid. This may not be correct.In fact, although the type of
worker_tidispid_t, It is actually the id of the LWP(Light Weight Process). If we usesigqueue,SIGURGwill send to current process. Then os will select one of the threads to handle this signal. This is not what we want. We hope that only the worker thread corresponding to theTaskGroupreceives this signal.We can use the
rt_tgsigqueueinfo, this syscall can achieve our goal.Here is the relevant documentation:https://linux.die.net/man/2/rt_sigqueueinfo