Bug 1800685 - pmrep fails to open an archive from rhel7 on fedora30 with python3-3.7.6-1.fc30
Summary: pmrep fails to open an archive from rhel7 on fedora30 with python3-3.7.6-1.fc30
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pcp
Version: 30
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nathan Scott
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-07 17:13 UTC by Alexandros Panagiotou
Modified: 2020-03-16 20:29 UTC (History)
5 users (show)

Fixed In Version: pcp-5.0.3 pcp-5.0.3-2.fc31 pcp-5.0.3-1.fc32
Clone Of:
Environment:
Last Closed: 2020-03-11 22:46:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
a short archive recorded on rhel7 that reproduces the failure (236.13 KB, application/gzip)
2020-02-07 17:13 UTC, Alexandros Panagiotou
no flags Details

Description Alexandros Panagiotou 2020-02-07 17:13:29 UTC
Created attachment 1661747 [details]
a short archive recorded on rhel7 that reproduces the failure

Description of problem:
When trying to extract metrics from the attached archive with pmrep, pmrep fails with the backtrace:

  File "/usr/bin/pmrep", line 38, in <module>
    from pcp import pmapi, pmi, pmconfig
  File "/usr/lib64/python3.7/site-packages/pcp/pmi.py", line 102, in <module>
    c_char_p, pmID, c_int, pmInDom, c_int, pmUnits]
TypeError: item 6 in _argtypes_ passes a struct/union with a bitfield by value, which is unsupported.

This happens after upgrading python3 to python3-3.7.6-1.fc30.x86_64.

With python3-3.7.3-1.fc30.x86_64 it works fine.

A very very quick search reveals https://bugs.python.org/issue39295 , so pcp may turn out to be a victim of an underlying problem.


Version-Release number of selected component (if applicable):
pcp-system-tools-5.0.2-1.fc30.x86_64
python3-3.7.6-1.fc30.x86_64
(latest versions available for fedora 30)

How reproducible:
Always

Steps to Reproduce:
1. Install the versions of pcp and python mentioned above
2. Download the archive attached to the BZ
3. Run pmrep -t10s -a 20200207.17.32.0 :vmstat

Actual results:
pmrep -t10s -a 20200207.17.32.0 :vmstat
Traceback (most recent call last):
  File "/usr/bin/pmrep", line 38, in <module>
    from pcp import pmapi, pmi, pmconfig
  File "/usr/lib64/python3.7/site-packages/pcp/pmi.py", line 102, in <module>
    c_char_p, pmID, c_int, pmInDom, c_int, pmUnits]
TypeError: item 6 in _argtypes_ passes a struct/union with a bitfield by value, which is unsupported.

Expected results:
pmrep provides the data from the archive.

Additional info:
I cannot reproduce the failure in fedora31.

Comment 1 Nathan Scott 2020-02-10 23:29:26 UTC
Thanks for reporting.  This has been fixed in upstream PCP via the commit below.
Next scheduled PCP update in Fedora 30 (with this fix) is in approx 3 weeks - until then, the upstream PCP github and/or bintray repos could be used.

commit 2e581f33a5710b5ef3f8da22cc75d13fde3f0713
Author: Nathan Scott <nathans>
Date:   Mon Jan 20 14:29:09 2020 +1100

    python api: allow pmUnits to be converted to an int
    
    Provide an __int__ conversion routine for the pmUnits class
    which contains bitfields, recently confusing latest version
    of python3 when passed on the stack.
    
    This resolves QA failure in pmrep tests on Fedora31 with the
    latest python updates applied.

Comment 2 Fedora Update System 2020-02-27 11:26:07 UTC
FEDORA-2020-1948419b2e has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-1948419b2e

Comment 3 Fedora Update System 2020-02-27 18:38:11 UTC
pcp-5.0.3-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-1948419b2e

Comment 4 Fedora Update System 2020-02-28 01:27:25 UTC
pcp-5.0.3-1.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-7ac95d60db

Comment 5 Fedora Update System 2020-03-02 05:27:57 UTC
FEDORA-2020-a4236a5dcf has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-a4236a5dcf

Comment 6 Fedora Update System 2020-03-02 19:56:56 UTC
pcp-5.0.3-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-a4236a5dcf

Comment 7 Fedora Update System 2020-03-11 22:46:00 UTC
pcp-5.0.3-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2020-03-16 20:16:50 UTC
pcp-5.0.3-1.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2020-03-16 20:29:35 UTC
pcp-5.0.3-1.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.


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