Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1188045

Summary: pmda-papi building tricky against rhel6 papi4+papi5
Product: Red Hat Enterprise Linux 6 Reporter: Frank Ch. Eigler <fche>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Miloš Prchlík <mprchlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.7CC: brolley, lberk, mbenitez, mcermak, mprchlik, wcohen
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcp-3.10.3-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 06:24:48 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:
Attachments:
Description Flags
build log none

Description Frank Ch. Eigler 2015-02-01 18:23:50 UTC
A git pcp build against rhel6.6 indicates problems.
A direct build against

% papi-5.1.1-5.el6.x86_64
% papi-debuginfo-5.1.1-5.el6.x86_64
% papi-devel-5.1.1-5.el6.x86_64

succeeds, but turns out to link against the bundled papi-4.1.3 
libraries.  (I don't know what knob exists in the papi-devel
package to let our code select the more modern library to link
to.)

Running with papi 4.1.3 is not all bad, except when the
default papi.control.multiplex=1 is active, we get a crash
in libpapi after just a few events are activated:

Program received signal SIGSEGV, Segmentation fault.
MPX_start (mpx_events=0x17d5ba0) at multiplex.c:810
810			if ( mev->active++ ) {
(gdb) p mev
$1 = (MasterEvent *) 0x0
(gdb) up
#1  0x00007f80921082dd in PAPI_start (EventSet=<value optimized out>) at papi.c:1232
1232			retval = MPX_start( ESI->multiplex.mpx_evset );
(gdb) q


With papi.control.multiplex=0'd, by and large the pmda seems to work,
even with papi 4.1.3.

Ideally, we should:
1) turn off multiplexing-by-default on old papi
2) find a way of linking to new papi in this mixed-version rpm

Comment 1 William Cohen 2015-02-01 18:35:41 UTC
Because of compability issues the papi-5.1.1 still has the papi-4.3 libraries around in the old places and special steps need to be taken to use the papi-5.1.1 libraries.  I think you will need to do something similar to the example configure for oprofile to make it use the newer papi-5.1.1

 ./configure --with-kernel-support --host=powerpc64-redhat-linux-gnu --target=ppc64-redhat-linux-gnu --build=powerpc64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-separate-debug-dir=/usr/lib/debug --enable-abi --with-qt-dir=/usr/lib64/qt-3.3 --with-java=/root/rpmbuild/BUILD/oprofile-0.9.9/java-1.6.0-openjdk-1.6.0.0 --with-extra-include=/usr/lib64/papi-5.1.1/usr/include/perfmon --with-extra-libs=/usr/lib64/papi-5.1.1/usr/lib


Note that once code is build nothing needs to be done to get the shared libraries.  There is a /etc/ld.so.conf.d/papi-{%arch}.conf to include the newer shared library in the search.

Comment 3 Frank Ch. Eigler 2015-02-01 20:19:32 UTC
(In reply to William Cohen from comment #1)
> --with-extra-include=/usr/lib64/papi-5.1.1/usr/include/perfmon
> --with-extra-libs=/usr/lib64/papi-5.1.1/usr/lib

Is there some configury magic with which we can look up that
/usr/lib64/papi-5.1.1 string generally?

Comment 4 William Cohen 2015-02-18 19:03:28 UTC
First step is to make it possible for pcp to specify other locations for include/lib.  Right now there is nothing in the pcp config to allow getting papi (and libpfm for perf_event) in any place other than the default directories.

Comment 5 William Cohen 2015-03-03 17:09:26 UTC
The following upstream pcp commit in conjunction with the papi-5.1.1-10.el6 build should address this bug:

commit 67bec4f21ddcc26a3604f57f927863b316fa33ba
Author: Frank Ch. Eigler <fche>
Date:   Fri Feb 27 16:02:21 2015 -0500

    pcp configury: let --with-papi=NNNN accept a pkgconfig module too
    
    With this change, it is possible to pick cflags/ldadd bits for
    any version of papi that has .pc pkgconfig files, e.g.:
    
       .../configure --with-papi=papi-5
    
    Kindly tested by wcohen on in-progress rhel-6.7 work.

Comment 7 Miloš Prchlík 2015-03-12 11:39:26 UTC
Created attachment 1000931 [details]
build log

Comment 10 Frank Ch. Eigler 2015-03-12 13:37:01 UTC
... or   --with-papi=papi-5   relying on the pkgconfig logic.

Comment 11 Nathan Scott 2015-03-12 22:24:05 UTC
> ... or   --with-papi=papi-5   relying on the pkgconfig logic.

We're tracking several pending 6.7 pcp fixes now, will do an update early next week with this change too.

Comment 19 errata-xmlrpc 2015-07-22 06:24:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1300.html