Bug 1269858 - Generating backtrace without saving a coredump fails on ppc64/ppc64le
Generating backtrace without saving a coredump fails on ppc64/ppc64le
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: satyr (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: abrt
BaseOS QE - Apps
:
Depends On:
Blocks: 1473612
  Show dependency treegraph
 
Reported: 2015-10-08 07:13 EDT by Martin Kyral
Modified: 2017-10-03 21:25 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Kyral 2015-10-08 07:13:52 EDT
Description of problem:
This fnctionality introduced in RHEL 7.2 does not work on ppc64 and ppc64le due to error detected by elfutils in the backtrace. If compiled with the following patch: 

diff --git a/satyr.c b/satyr.c
index 44bf869..117c209 100644
--- a/satyr.c
+++ b/satyr.c
@@ -283,6 +283,7 @@ debug_duphash(int argc, char **argv)
 static void
 debug_unwind_from_hook(int argc, char **argv)
 {
+    stderr = fopen("/tmp/satyr-stderr", "w");
     if (argc != 3)
     {
         fprintf(stderr, "Wrong number of arguments.\n");

satyr saves the error message (otherwise if just fails silently):

   # cat /tmp/satyr-stderr
   Unwind failed: dwfl_getthread_frames failed: No DWARF information found

eu-stack shows the same problem:

   # eu-stack --core=core.28115 -e /usr/bin/will_segfault 
   PID 28115 - core
   TID 28115:
   #0  0x0000000010000a04 crash
   #1  0x0000000010000ab8 varargs
   #2  0x0000000010000b00 f
   #3  0x0000000010000b50 callback
   #4  0x00003fffa5be0980 call_me_back
   #5  0x0000000010000bb0 recursive
   #6  0x0000000010000b90 recursive
   #7  0x0000000010000b90 recursive
   #8  0x00000000100007b8 main
   #9  0x00003fffa5a25e6c generic_start_main.isra.0
   eu-stack: dwfl_thread_getframes tid 28115 at 0x3fffa5a25e6b in libc.so.6: No DWARF information found

The issue lies in the extra frame generated on the architectures in question after the main frame. However, satyr shall at least save what's been already unwinded and not fail silently.

Version-Release number of selected component (if applicable):
satyr-0.13-12.el7

How reproducible:
Always

Steps to Reproduce:
1. |/usr/bin/satyr debug unwind-from-hook -vvv %e %p %s' > /proc/sys/kernel/core_pattern
2. sleep 3000 &
3. kill -11 $!

Actual results:
No stacktrace generated


Expected results:
Stacktrace generated

Additional info:

Note You need to log in before you can comment on or make changes to this bug.