Bug 1351172 - perl.req gets exponentially slow in a certain scenario
Summary: perl.req gets exponentially slow in a certain scenario
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-generators
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jitka Plesnikova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-29 11:53 UTC by Rick Elrod
Modified: 2016-07-12 02:21 UTC (History)
3 users (show)

Fixed In Version: perl-generators-1.09-1.fc25 perl-generators-1.09-1.fc24 perl-generators-1.06-2.fc23 perl-generators-1.06-2.fc22
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-12 02:21:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rick Elrod 2016-06-29 11:53:22 UTC
Description of problem:

The problem is perhaps best described by showing examples (see below) but given certain input, perl.req gets really, really slow. This came up when I went to upgrade the `cloc` package and `rpmbuild` seemingly got stuck and never finished. I dug into it a tiny bit and got a smaller reproducer (again, see below).

When I add letters to the variable name here perl.req gets *really* slow:

$ cat asdf
sub demo {
  ++$foo if  /\s*<<'/;
}


$ time /usr/lib/rpm/perl.req asdf
real	0m0.361s
user	0m0.358s
sys	0m0.003s

--------------------------------------------------------------

$ cat asdf
sub demo {
  ++$foobar if  /\s*<<'/;
}


$ time /usr/lib/rpm/perl.req asdf
real	0m2.891s
user	0m2.884s
sys	0m0.003s

--------------------------------------------------------------

$ cat asdf
sub demo {
  ++$foobarbaz if  /\s*<<'/;
}


$ time /usr/lib/rpm/perl.req asdf
real	0m23.902s
user	0m23.835s
sys	0m0.019s


Version-Release number of selected component (if applicable):
perl-generators-1.06-1.fc22.noarch

How reproducible:
I haven't tested on newer Fedora. I'm planning on upgrading to F23 or F24 this week, will be able to report then.


Steps to Reproduce:
1. Copypaste the above examples into a file
2. Run `/usr/lib/rpm/perl.req the_file`
3. ???
4. Profit

Actual results:
perl.req becomes very slow


Expected results:
perl.req doesn't become very slow. ;)

Additional info:
Happy to provide any other information, just let me know what you need.

Comment 1 Fedora Update System 2016-06-29 13:34:23 UTC
perl-generators-1.06-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c345d41682

Comment 2 Fedora Update System 2016-06-30 22:23:45 UTC
perl-generators-1.06-2.fc22 has been pushed to the Fedora 22 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-2016-c345d41682

Comment 3 Fedora Update System 2016-07-12 02:21:39 UTC
perl-generators-1.06-2.fc22 has been pushed to the Fedora 22 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.