-
Notifications
You must be signed in to change notification settings - Fork 431
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
signal_receive.gen test fails on sparc #21
Comments
What is a misterious process with pid==250 and uid==0, and why it sends signals instead of the process itself? It must be a problem in the operating system. |
I suspect that either the the kernel fills the struct with wrong information, or strace wrongly interprets the struct layout. Any idea where to look? |
UID=250 is the user ("portage") building strace and running the test suite. So this could be an indicator that some struct information went bad... |
Looks like you build strace for 32-bit sparc. The last time I built strace this way was v4.16, the box where I could test this configuration (bender.sparc.dev.gentoo.org) is no longer accessible. |
Send me patches ;) |
$ cat sigfpe.c static void
} static void
} static void
} int
} $ gcc -m32 -O2 sigfpe.c && ./a.out Could you make these buggy sparc kernels fixed, please? |
|
yes, sparc64 doesn't suffer from this, only sparc does. |
Has this test been working before or is this a new test? |
The test used to pass on bender.sparc.dev.gentoo.org, "uname -a" used to print the following: |
Recent kernel siginfo changes, namely, v4.14-rc1~60^2^2~1 and v4.16-rc1~159^2~10, introduced ABI regressions that render the whole siginfo interface unreliable. Looks like the kernel side is not eager to fix the breakage, so here is a workaround. * tests/signal_receive.c (s_sig, s_code, s_pid, s_uid): New volatile variables. (handler): Add siginfo_t parameter, save siginfo_t fields. (sig_print): Remove. (main): Rewrite. Use variables saved by handler to print expected siginfo output. Print diagnostics in case of siginfo mismatch. Closes: #21
Recent kernel siginfo changes, namely, v4.14-rc1~60^2^2~1 and v4.16-rc1~159^2~10, introduced ABI regressions that render the whole siginfo interface unreliable. Looks like the kernel side is not eager to fix the breakage, so here is a workaround. * tests/signal_receive.c (s_sig, s_code, s_pid, s_uid): New volatile variables. (handler): Add siginfo_t parameter, save siginfo_t fields. (sig_print): Remove. (main): Rewrite. Use variables saved by handler to print expected siginfo output. Print diagnostics in case of siginfo mismatch. * strace.spec.in (%check): Extract the diagnostics. Closes: #21
Starting with commit v4.14-rc1~60^2^2~1, a SIGFPE signal sent via kill results to wrong values in si_pid and si_uid fields of compat siginfo_t. This happens due to FPE_FIXME being defined to 0 for sparc, and at the same time siginfo_layout() introduced by the same commit returns SIL_FAULT for SIGFPE if si_code == SI_USER and FPE_FIXME is defined to 0. Fix this regression by removing FPE_FIXME macro and changing all its users to assign FPE_FLTUNK to si_code instead of FPE_FIXME. Note that FPE_FLTUNK is a new macro introduced by commit 266da65. Tested with commit v4.16-11958-g16e205cf42da. This bug was found by strace test suite. In the discussion about FPE_FLTUNK on sparc David Miller said: > Eric, feel free to do something similar on Sparc. Link: strace/strace#21 Fixes: cc73152 ("signal: Remove kernel interal si_code magic") Fixes: 2.3.41 Cc: David Miller <davem@davemloft.net> Cc: sparclinux@vger.kernel.org Conceptually-Acked-By: David Miller <davem@davemloft.net> Thanks-to: Anatoly Pugachev <matorola@gmail.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Starting with commit v4.14-rc1~60^2^2~1, a SIGFPE signal sent via kill results to wrong values in si_pid and si_uid fields of compat siginfo_t. This happens due to FPE_FIXME being defined to 0 for sparc, and at the same time siginfo_layout() introduced by the same commit returns SIL_FAULT for SIGFPE if si_code == SI_USER and FPE_FIXME is defined to 0. Fix this regression by removing FPE_FIXME macro and changing all its users to assign FPE_FLTUNK to si_code instead of FPE_FIXME. Note that FPE_FLTUNK is a new macro introduced by commit 266da65. Tested with commit v4.16-11958-g16e205cf42da. This bug was found by strace test suite. Link: strace/strace#21 Fixes: cc73152 ("signal: Remove kernel interal si_code magic") Thanks-to: Anatoly Pugachev <matorola@gmail.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
A Gentoo sparc user (@DerDakon) is reporting the following reproducible test failure with strace-4.20:
His system's details:
Build.log: https://bugs.gentoo.org/attachment.cgi?id=512660
Bug: https://bugs.gentoo.org/643060
The text was updated successfully, but these errors were encountered: