-
Notifications
You must be signed in to change notification settings - Fork 427
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
strace hangs on ia64 (fresh kernel) #33
Comments
I've added some debug printing to get_regs: Looks like ptrace(PTRACE_GETREGS) always fails with EIO on this new kernel. |
133 == SIGTRAP | 0x80, strace doesn't decode it in -d output, most probably because the main audience of strace -d is familiar with it. |
That's very helpful! Thank you! Looking at kernel side of unwinder (used to read registers). |
The strace breakage looks like that: ./strace: get_regs: get_regs_error: Input/output error It happens because ia64 needs to load unwind tables to read certain registers. Unwind tables fail to load due to GCC quirk on the following code: extern char __end_unwind[]; const struct unw_table_entry *end = (struct unw_table_entry *)table_end; table->end = segment_base + end[-1].end_offset; GCC does not generate correct code for this single memory reference after constant propagation (see https://gcc.gnu.org/PR84184). Two triggers are required for bad code generation: - '__end_unwind' has alignment lower (char), than 'struct unw_table_entry' (8). - symbol offset is negative. This commit workarounds it by fixing alignment of '__end_unwind'. While at it use hidden symbols to generate shorter gp-relative relocations. CC: Tony Luck <tony.luck@intel.com> CC: Fenghua Yu <fenghua.yu@intel.com> CC: linux-ia64@vger.kernel.org CC: linux-kernel@vger.kernel.org Bug: strace/strace#33 Bug: https://gcc.gnu.org/PR84184 Reported-by: Émeric Maschino <emeric.maschino@gmail.com> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Confirmed it was |
The kernel seems to be fixed now, with |
* syscall.c (personality_designators): New array. * defs.h (personality_designators): New declaration. * basic_filters.c (qualify_syscall_separate_personality, qualify_syscall_number_personality): New function. (qualify_syscall_number): Use qualify_syscall_separate_personality for checking for a personality specification, call qualify_syscall_number_personality for setting number set for specific personality. (qualify_syscall_name_personality): New function. (qualify_syscall_name): Use qualify_syscall_separate_personality for checking for a personality specification, call qualify_syscall_name_personality for setting number set for specific personality. * strace.1.in (.SS Filtering): Document it. * NEWS: Mention it. Closes: strace#33
It's a version of downstream bug: https://bugs.gentoo.org/518130
I've recently upgraded kernel on ia64 machine
from 3.14.14-gentoo (GCC: Gentoo 4.9.3 p1.2, pie-0.6.3)
to 4.9.72-gentoo (GCC: Gentoo 6.4.0-r1 p1.3)
and strace started hanging up there. It might be a state decoding problem in
strace
or a bug in kernel.I can reproduce the strace hangun in
ski
(ia64 emulator on current upstream kernel). When added a fewprintk()
statements in kernel I found the place where 133 code comes from: http://elixir.free-electrons.com/linux/latest/source/include/linux/tracehook.h#L66which looks like normal mode of operation. But looks like
strace
does not recognize it and outputs rawsig=133
message. There is a possibility of kernel being miscompiled by new compiler as gdb hangs the same way.x86_64 also does not decode that
sig=133
.The text was updated successfully, but these errors were encountered: