Bug 1170296

Summary: Please enable "strace -k" stack unwinding
Product: [Fedora] Fedora Reporter: Josh Stone <jistone>
Component: straceAssignee: Dmitry V. Levin <ldv>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dvlasenk, ldv, mjw, schwab, yamato
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-23 18:39:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Josh Stone 2014-12-03 17:40:19 UTC
strace 4.9 added the experimental -k option to print stack traces, but this is not enabled in the Fedora build.  With my own build from upstream git, it seems to work just fine.

I think the spec just needs "BuildRequires: libunwind-devel".

Comment 1 Dmitry V. Levin 2014-12-03 18:18:17 UTC
Unfortunately, I cannot enable -k option because the output it produces is not yet reliable on all Fedora architectures, even basic strace-k.test is known to fail on x86 and arm:

http://sourceforge.net/p/strace/mailman/message/32457800/
http://sourceforge.net/p/strace/mailman/message/32469263/

Comment 2 Josh Stone 2014-12-03 18:55:22 UTC
Hmm, that's too bad.  I know that ltrace can use elfutils libdwfl for backtracing -- have you investigated that?

(but now I notice ltrace.spec also hasn't enabled unwinding... yet?)

Comment 3 Masatake YAMATO 2014-12-04 03:16:17 UTC
Josh, I have been thinking using elfutils as an alternative unwinder in strace.
Dmitry, it is acceptable to link elfutils to strace?
(elfutils is distributed uner the term of GPL.)

Of course I will prepare an option to enable/disable elfutils to configure.ac.
So enabling it in strace is up to the user.

Comment 4 Dmitry V. Levin 2014-12-04 03:39:55 UTC
(In reply to Masatake YAMATO from comment #3)
> Dmitry, it is acceptable to link elfutils to strace?
> (elfutils is distributed uner the term of GPL.)

From the beginning strace is distributed under the BSD-style 3-clause license, which is not compatible with GPL because of this advertising clause.

However, the license of elfutils, starting with commit elfutils-0.153-22-gde2ed97, is GPLv2 or LGPLv3+ for the libraries, so I suppose it's OK to link strace with libraries from elfutils.

Comment 5 Dmitry V. Levin 2015-01-19 15:41:11 UTC
According to the FSF, the license is actually compatible with the GNU GPL:
https://www.gnu.org/licenses/license-list.html#ModifiedBSD

Sorry for the noise.

Comment 6 Jaroslav Reznik 2015-03-03 16:33:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 7 Dmitry V. Levin 2015-12-23 18:39:13 UTC
* Wed Dec 23 2015 Dmitry V. Levin <ldv> - 4.11-2
- Enabled experimental -k option on x86_64 (#1170296).