[PATCH glibc 3/3] rseq registration tests (v10)
Mathieu Desnoyers
mathieu.desnoyers@efficios.com
Wed May 27 15:17:42 GMT 2020
----- On May 27, 2020, at 11:12 AM, Florian Weimer fweimer@redhat.com wrote:
> * Mathieu Desnoyers:
>
>>>>>> + retpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0));
>>>>>> + if (retpid != pid)
>>>>>> + {
>>>>>> + FAIL_EXIT1 ("waitpid returned %ld, expected %ld",
>>>>>> + (long int) retpid, (long int) pid);
>>>>>> + }
>>>>>
>>>>> Hmm. Is the TEMP_FAILURE_RETRY really needed? Our xwaitpid does not
>>>>> have this.
>>>>
>>>> Then how does it deal with a signal interrupting the system call performing
>>>> the waitpid (EINTR) ? I do not see WNOHANG being used.
>>>
>>> It obscures spurious signals. In most test cases, if an unexpected
>>> signal is delivered, something is quite wrong indeed. This is why we
>>> don't generally hide EINTR errors.
>>
>> So it means you may have trouble using tools like strace and gdb on those
>> tests ? AFAIU those are heavy users of SIGSTOP and SIGCONT. Similarly for
>> profilers, those usually rely on a timer-driven signal.
>
> I have never seen any problems with strace due to this. ptrace has
> become a bit more transparent to the tracee since the early days, I
> think.
>
> I haven't seen problems under GDB, either, but then tests that fork can
> be rather annoying to debug anyway.
OK so I'll use the xwaitpid wrapper and let this be someone else's problem.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the Libc-alpha
mailing list