Bug 608194 - [abrt] crash in cnucnu-0-0.3.20100110.fc12: re.py:245:_compile:error: multiple repeat
Summary: [abrt] crash in cnucnu-0-0.3.20100110.fc12: re.py:245:_compile:error: multipl...
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: cnucnu (Show other bugs)
(Show other bugs)
Version: 12
Hardware: x86_64 Linux
low
medium
Target Milestone: ---
Assignee: Till Maas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:3e91d031
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-26 00:26 UTC by David Timms
Modified: 2010-12-03 13:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-03 13:41:27 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.08 KB, text/plain)
2010-06-26 00:26 UTC, David Timms
no flags Details
File: reproduce (2.01 KB, text/plain)
2010-06-26 00:26 UTC, David Timms
no flags Details

Description David Timms 2010-06-26 00:26:08 UTC
abrt 1.0.9 detected a crash.

architecture: x86_64
cmdline: /usr/bin/python /usr/bin/cnucnu --shell
component: cnucnu
executable: /usr/bin/cnucnu
kernel: 2.6.32.14-127.fc12.x86_64
package: cnucnu-0-0.3.20100110.fc12
reason: re.py:245:_compile:error: multiple repeat
release: Fedora release 12 (Constantine)
Attached file: reproduce

backtrace
-----
re.py:245:_compile:error: multiple repeat

Traceback (most recent call last):
  File "/usr/bin/cnucnu", line 70, in <module>
    if not shell.cmdloop():
  File "/usr/lib64/python2.6/cmd.py", line 143, in cmdloop
    stop = self.postcmd(stop, line)
  File "/usr/lib/python2.6/site-packages/cnucnu/checkshell.py", line 123, in postcmd
    print "Upstream Versions:", self.package.upstream_versions
  File "/usr/lib/python2.6/site-packages/cnucnu/package_list.py", line 149, in upstream_versions
    upstream_versions = re.findall(self.regex, html)
  File "/usr/lib64/python2.6/re.py", line 177, in findall
    return _compile(pattern, flags).findall(string)
  File "/usr/lib64/python2.6/re.py", line 245, in _compile
    raise error, v # invalid expression
error: multiple repeat

Local variables in innermost frame:
cachekey: (<type 'str'>, 'rakarrack-([0-9]*\\.){3}*.tar\\.(?:gz|bz2|tar|t[bglx]z|tbz2|zip)', 0)
pattern: 'rakarrack-([0-9]*\\.){3}*.tar\\.(?:gz|bz2|tar|t[bglx]z|tbz2|zip)'
p: None
flags: 0
key: ('rakarrack-([0-9]*\\.){3}*.tar\\.(?:gz|bz2|tar|t[bglx]z|tbz2|zip)', 0)
v: error('multiple repeat',)

comment
-----
I appear to have created a broken regex (not knowing that language very well). The issue as I see it is that the user is dumped out of the shell. The user then has to re-run the application, re-enter the url, and re-enter the regex.

Enhancement:
- don't crash out; print the regex error, and continue.

Why:
provides for easier usage of the app, while trying out different regexs.

Comment 1 David Timms 2010-06-26 00:26:11 UTC
Created attachment 427015 [details]
File: backtrace

Comment 2 David Timms 2010-06-26 00:26:14 UTC
Created attachment 427016 [details]
File: reproduce

Comment 3 David Timms 2010-06-26 00:56:31 UTC
Package: cnucnu-0-0.3.20100110.fc12
Architecture: x86_64
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1. cnucnu --shell
 None None  URL:> 

2. http://sourceforge.net/projects/rakarrack/files/
 None http://sourceforge.net/projects/rakarrack/files/  Regex:> 

3. rakarrack-(.*?).tar.gz
Upstream Versions: ['0.3.0/rakarrack-0.3.0', '0.3.0/rakarrack-0.3.0', '0.3.0/rakarrack-0.3.0', '0.3.0', '0.2.0/rakarrack-0.2.0', '0.2.0/rakarrack-0.2.0', '0.2.0/rakarrack-0.2.0', '0.2.0', '0.1.2/rakarrack-0.1.2', '0.1.2/rakarrack-0.1.2', '0.1.2/rakarrack-0.1.2', '0.1.2']
Latest: 0.3.0/rakarrack-0.3.0
 rakarrack-(.*?).tar.gz http://sourceforge.net/projects/rakarrack/files/  Regex:> rakarrack-(.*?).tar.(?bz2|gz)
Upstream Versions:
Traceback (most recent call last):
  File "/usr/bin/cnucnu", line 70, in <module>
    if not shell.cmdloop():
  File "/usr/lib64/python2.6/cmd.py", line 143, in cmdloop
    stop = self.postcmd(stop, line)
  File "/usr/lib/python2.6/site-packages/cnucnu/checkshell.py", line 123, in postcmd
    print "Upstream Versions:", self.package.upstream_versions
  File "/usr/lib/python2.6/site-packages/cnucnu/package_list.py", line 149, in upstream_versions
    upstream_versions = re.findall(self.regex, html)
  File "/usr/lib64/python2.6/re.py", line 177, in findall
    return _compile(pattern, flags).findall(string)
  File "/usr/lib64/python2.6/re.py", line 245, in _compile
    raise error, v # invalid expression
sre_constants.error: unexpected end of pattern

Comment
-----
Another "user supplied invalid regex", this time missing : between (? and bz2

Enhancement: don't bomb out.
- Perhaps all regex errors have an exception parent that cnucnu can detect, and print the resulting error message and continue.
- Is it possible to test the regex first, before applying it to the html received from the URL ?

Comment 4 Susi Lehtola 2010-06-26 09:48:41 UTC
I can confirm this with the newest git snapshot.

Till: could you have a look at this?

Comment 5 Till Maas 2010-06-26 11:41:15 UTC
(In reply to comment #4)
> I can confirm this with the newest git snapshot.
> 
> Till: could you have a look at this?    

Sure, but I cannot currently say when. I will try to do it soon, but it might also take a month or so. In general cnucnu needs more love. :-/

Comment 6 Bug Zapper 2010-11-03 12:50:49 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  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 WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2010-12-03 13:41:27 UTC
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 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 please feel free to reopen this bug against that version.

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


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