First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 193979
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Portage Utilities Team <tools-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Togge <togge.gentoo@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
revdep-rebuild-awkCleanVars-r448.patch revdep-rebuild-awkCleanVars-r448.patch patch Michael A. Smith 2007-09-27 13:35 0000 1.19 KB Details | Diff
revdep-rebuild-awkCleanVars-r448.patch revdep-rebuild-awkCleanVars-r448.patch patch Michael A. Smith 2007-09-27 17:49 0000 1.22 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 193979 depends on: Show dependency tree
Bug 193979 blocks: 170220 177925
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-09-27 11:12 0000
When running revdep-rebuild from app-portage/gentoolkit-0.2.4-rc1, the progress
is halted when clean_vars() is called in a subshell. CPU usage goes to 100% and
stays there until the subshell is killed, it does not exit when the main
program is interuppted.

The line that triggers this is:
a="${a//+(\/\/)//}"


app-shells/bash-3.2_p17-r1 is used

Reproducible: Always

Steps to Reproduce:

------- Comment #1 From Togge 2007-09-27 11:25:01 0000 -------
This line also triggers the "hang"
a="${a//+([[:space:]])/$'\n'}"

------- Comment #2 From Togge 2007-09-27 13:13:55 0000 -------
After more investigation the part about it hanging was wrong.

The problem is that the line that handle spaces -> "\n" scale very poorly,
something like O(n²) where n is the number of characters in the string.

------- Comment #3 From Michael A. Smith 2007-09-27 13:35:36 0000 -------
Created an attachment (id=132023) [edit]
revdep-rebuild-awkCleanVars-r448.patch

<sigh> I don't seem to be able to avoid using external commands for this
clean_vars(). This patch should fix the problem. Thanks to togge_ on
#gentoo-dev-help for helping me re-benchmark extglob.

------- Comment #4 From Paul Varner 2007-09-27 15:40:56 0000 -------
gentoolkit-0.2.4_rc1 has been package masked due to this and other significant
problems.  Please downgrade back to gentoolkit-0.2.4_pre7

------- Comment #5 From Michael A. Smith 2007-09-27 17:49:02 0000 -------
Created an attachment (id=132034) [edit]
revdep-rebuild-awkCleanVars-r448.patch

Same deal as my comment #3, only not broken (I typoed the regex the first time
through.)

------- Comment #6 From Vlastimil Babka (Caster) 2007-12-17 14:23:53 0000 -------
(In reply to comment #4)
> gentoolkit-0.2.4_rc1 has been package masked due to this and other significant
> problems.  Please downgrade back to gentoolkit-0.2.4_pre7

I've noticed this in 0.2.4_pre7 too, when working on bug 177925. 8-10 control
files setting SEARCH_DIRS_MASK and the "configuring search environment" will
take ages with 100% CPU eaten (and even ctrl+c leaves that process crunching on
background). Also traced it down to clean_var(), didn't check which part of it
exactly... Thus I'm updating bug's name.

------- Comment #7 From Tobias Klausmann 2008-01-13 18:22:32 0000 -------
I've looked into this too. At a certain point, clear_vars is fed a variable
which is about 22000 chars (!) long. Most of the entries are dupes from
/usr/kde/3.5/lib and similar paths (from KDE). While the performance problem is
fixed (in a way) by using sed, I feel that generating said var might be
optimized. I don't really know how revdep-rebuild arrives at that monster of a
path list, so I might be wrong on that part.

------- Comment #8 From Vlastimil Babka (Caster) 2008-02-13 08:35:01 0000 -------
*** Bug 209958 has been marked as a duplicate of this bug. ***

------- Comment #9 From Jakub Moc (RETIRED) 2008-02-14 09:35:11 0000 -------
*** Bug 210101 has been marked as a duplicate of this bug. ***

------- Comment #10 From Paul Varner 2008-02-21 01:52:07 0000 -------
Released in gentoolkit-0.2.4_rc2

First Last Prev Next    No search results available      Search page      Enter new bug