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:
This line also triggers the "hang" a="${a//+([[:space:]])/$'\n'}"
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.
Created attachment 132023 [details, diff] 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.
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
Created attachment 132034 [details, diff] revdep-rebuild-awkCleanVars-r448.patch Same deal as my comment #3, only not broken (I typoed the regex the first time through.)
(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.
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.
*** Bug 209958 has been marked as a duplicate of this bug. ***
*** Bug 210101 has been marked as a duplicate of this bug. ***
Released in gentoolkit-0.2.4_rc2