Bug 2003533

Summary: RFE: please provide a way to invoke bcc tools directly
Product: [Fedora] Fedora Reporter: Zbigniew Jędrzejewski-Szmek <zbyszek>
Component: bccAssignee: Jerome Marchand <jmarchan>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: acaringi, jmarchan, jolsa, ldoskova, rdossant, skozina
Target Milestone: ---Keywords: FutureFeature, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-09 14:54:03 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:
Bug Depends On: 2003903    
Bug Blocks:    

Description Zbigniew Jędrzejewski-Szmek 2021-09-13 07:27:54 UTC
Description of problem:
bcc-tools are very nice, but invoking them is quite complicated. E.g. something like this:
   sudo LD_LIBRARY_PATH=/usr/lib64/llvm12/lib /usr/share/bcc/tools/execsnoop

This also doesn't match the documentation: man execsnoop just says 'execsnoop' should work.

Please provide wrappers in /usr/bin that set the required paths and allow the commands to be easily invoked.

Version-Release number of selected component (if applicable):
bcc-tools-0.21.0-1.fc35.x86_64

Comment 1 Rafael Fonseca 2021-09-13 13:32:36 UTC
Specifying the library path shouldn't be needed normally (I can run just `sudo /usr/share/bcc/tools/execsnoop` in my f34). So I guess llvm was updated in rawhide but BCC wasn't rebuilt against it? I'll check if that's the case and rebuild the package.

About the `/usr/share/bcc/tools/` location, that's a discussion that needs to be brought upstream. I've reported it a long time ago [1] but it hasn't been acted upon.


[1] https://github.com/iovisor/bcc/issues/1421

Comment 2 Zbigniew Jędrzejewski-Szmek 2021-09-14 05:58:42 UTC
So… I filed this bug after listening to a conference talk about bcc. The tools are absolutely great,
accessible even to not-a-very-advanced user. In the talk, the presenter was using Ubuntu, which has
the tools in /usr/bin, although with a suffix (execsnoop-bcc). So my guess is that upstream doesn't care,
and many users don't care because maintainers in other distros took action without caring about upstream.
But in Fedora it's much less discoverable and harder. So I think Fedora should also fix the issue
downststream if it cares about non-power-users.

> So I guess llvm was updated in rawhide but BCC wasn't rebuilt against it? I'll check if that's the case and rebuild the package.

Yes, F35+ has llvm13.0.0~rc1. I think it's nice that the bcc-tools work with the compat package,
without rebuilding immediately…

Comment 3 Zbigniew Jędrzejewski-Szmek 2021-09-14 06:23:21 UTC
Oh, I see that it's something on the llvm side:
clang12-libs-12.0.1-3.fc35.x86_64 has libraries in /usr/lib64/llvm12/lib/,
as does llvm12-libs-12.0.1-2.fc35.x86_64. But the latter has an /etc/ld.so.conf.d/llvm12-x86_64.conf
which adds /usr/lib64/llvm12/lib/ to the library path. So on one machine I happen to have
both packages installed, and the tools work without setting the path. On the other machine,
I have only clang12-libs, and manual setting of the path is required. I'll file a separate
bug against clang12-libs for this.

OK, so the only thing that remains here is either moving bcc-tools binaries into $PATH.

Comment 4 Ben Cotton 2022-11-29 17:04:32 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Ben Cotton 2022-12-13 15:35:20 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Zbigniew Jędrzejewski-Szmek 2022-12-13 18:10:20 UTC
Still valid with bcc-tools-0.24.0-3.fc37.x86_64.

Comment 7 Lucie Doskova 2023-06-02 13:50:30 UTC
Assigned to Jerome Marchand as a BCC maintainer.

Comment 8 Jerome Marchand 2023-08-09 14:54:03 UTC
Upstream has refused to fix this.

Comment 9 Zbigniew Jędrzejewski-Szmek 2023-08-09 15:42:53 UTC
The location of where the binaries are installed is not really an upstream decision.
There is nothing stopping us from adding 'ln -s --relative /usr/share/bcc/tools/* /bin/'
in the spec file. (And even if upstream had some influence on this, the maintainers
role is to act as a buffer between the upstream which sometimes does strange things
and the user.)