Bug 2210900

Summary: [abrt] rpmlint: _parse(): _parser.py:865:_parse:re.error: missing ), unterminated subpattern at position 55
Product: [Fedora] Fedora Reporter: Brian J. Murrell <brian.murrell>
Component: rpmlintAssignee: Tom "spot" Callaway <spotrh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: brian.murrell, j, spotrh, tmz, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/7ff6833b228a004a23241f37cccd5f40e256ae5
Whiteboard: abrt_hash:76823e756fe52a3f32c04775d9b1657d6bf66b58;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-30 16:24:05 UTC Type: ---
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
File: os_info
none
File: environ
none
File: mountinfo
none
File: open_fds
none
File: backtrace
none
File: cpuinfo
none
File: namespaces none

Description Brian J. Murrell 2023-05-30 01:19:09 UTC
Description of problem:
Not sure why this happened.

Version-Release number of selected component:
rpmlint-2.4.0-4.fc38

Additional info:
reporter:       libreport-2.17.10
uid:            1001
interpreter:    python3-3.11.3-2.fc38.x86_64
package:        rpmlint-2.4.0-4.fc38
exception_type: re.error
crash_function: _parse
comment:        Not sure why this happened.
cmdline:        /usr/bin/python3 -sP /usr/bin/rpmlint --ignore-unused-rpmlintrc -r ior.rpmlintrc /var/lib/mock/rocky+epel-9-x86_64/result/ior-3.3.0-20.gd3574d5.el9.x86_64.rpm
kernel:         6.2.14-300.fc38.x86_64
cgroup:         0::/user.slice/user-1001.slice/user/app.slice/app-gnome-code-1999134.scope
reason:         _parser.py:865:_parse:re.error: missing ), unterminated subpattern at position 55
executable:     /usr/bin/rpmlint
type:           Python3
runlevel:       N 5

Truncated backtrace:
#1 [/usr/lib64/python3.11/re/_parser.py:865] _parse
#2 [/usr/lib64/python3.11/re/_parser.py:455] _parse_sub
#3 [/usr/lib64/python3.11/re/_parser.py:980] parse
#4 [/usr/lib64/python3.11/re/_compiler.py:743] compile
#5 [/usr/lib64/python3.11/re/__init__.py:294] _compile
#6 [/usr/lib64/python3.11/re/__init__.py:227] compile
#7 [/usr/lib/python3.11/site-packages/rpmlint/filter.py:34] <listcomp>
#8 [/usr/lib/python3.11/site-packages/rpmlint/filter.py:34] __init__
#9 [/usr/lib/python3.11/site-packages/rpmlint/lint.py:52] __init__
#10 [/usr/lib/python3.11/site-packages/rpmlint/cli.py:176] lint
#11 [/usr/bin/rpmlint:8] <module>

Comment 1 Brian J. Murrell 2023-05-30 01:19:12 UTC
Created attachment 1967779 [details]
File: os_info

Comment 2 Brian J. Murrell 2023-05-30 01:19:15 UTC
Created attachment 1967780 [details]
File: environ

Comment 3 Brian J. Murrell 2023-05-30 01:19:17 UTC
Created attachment 1967781 [details]
File: mountinfo

Comment 4 Brian J. Murrell 2023-05-30 01:19:19 UTC
Created attachment 1967782 [details]
File: open_fds

Comment 5 Brian J. Murrell 2023-05-30 01:19:20 UTC
Created attachment 1967783 [details]
File: backtrace

Comment 6 Brian J. Murrell 2023-05-30 01:19:22 UTC
Created attachment 1967784 [details]
File: cpuinfo

Comment 7 Brian J. Murrell 2023-05-30 01:19:24 UTC
Created attachment 1967785 [details]
File: namespaces

Comment 8 Todd Zullinger 2023-05-30 01:41:09 UTC
What are the contents of ior.rpmlintrc?  My first suspicion is that the missing closing ')' is in that config file.  Let's rule that out first.

Comment 9 Brian J. Murrell 2023-05-30 13:09:20 UTC
Hrm.  I updated the "Reason" during the data review, but that didn't seem to actually change the reason logged here.  In any case …

The problem is (was) that '(' was being interpreted specially rather than literally.  The particular line in the rpmlintrc file was:

addFilter('ior.x86_64: E: binary-or-shlib-defines-rpath /usr/lib64/mpich/bin/ior (RUNPATH: check/lib64:/usr/lib64:/usr/lib64/mpich/lib)')

But I thought the argument to addFilter() was a regular string unless prefixed with an r (i.e. r'some string') but I suppose that was just a misunderstanding on my part.

Eventually I fixed the problem with:

addFilter('ior.x86_64: E: binary-or-shlib-defines-rpath /usr/lib64/mpich/bin/ior \(RUNPATH: check/lib64:/usr/lib64:/usr/lib64/mpich/lib\)')

Comment 10 Todd Zullinger 2023-05-30 16:24:05 UTC
It would definitely be nice if the parsing errors were handled/reported better.  I don't know how feasible that is offhand.

Sorry you got caught by this unfriendly failure.  It may be worth filing upstream, in case someone there finds it to be easy or enjoys the challenge.

It was only recently that addFilter() was mildly documented in the README file, in upstream 49c97e50 (Document rpmlintrc keywords., 2021-03-23).  But they have been regular expressions for as long as I can recall, for what little that's worth.