[ET Trac] [Einstein Toolkit] #1054: Formaline can enter into an infinite loop if git-lock.pl cannot create its lock directory
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Tue Aug 21 09:44:14 CDT 2012
#1054: Formaline can enter into an infinite loop if git-lock.pl cannot create its
lock directory
-------------------+--------------------------------------------------------
Reporter: rhaas | Type: defect
Status: new | Priority: minor
Milestone: | Component: EinsteinToolkit thorn
Version: | Keywords: Formaline
-------------------+--------------------------------------------------------
if for some reason the source base directory returned by git-get-
localdir.pl is not accessible (eg. since one has uses an invalid or empty
(simfactory) defs.local.ini) then the loop in line 35 of git-lock.pl:
{{{
32 my $waittime = 0.01;
33 my $maxwaittime = 10;
34 print "Attempting to obtain $lockdir cwd = ".getcwd()."
GIT_DIR=$git_dir\n";
35 while (! (mkdir $lockdir)) {
36 # Wait some time
37 my $unit = $waittime==1 ? "second" : "seconds";
38 print "Git repository is busy; waiting $waittime $unit...\n";
39 system "sleep '$waittime'";
40 # Back off exponentially
41 $waittime *= 2;
42 $waittime = 1 if $waittime>1 && $waittime<2;
43 $waittime = $maxwaittime if $waittime > $maxwaittime;
44 }
}}}
never quits and without SILENT=no the make system also does not output the
"Git repository busy" messages it seems.
Possible remedies would seem to either introduce a timeout after which
Formaline gives up and does not push into the source code repository (with
a loud warning at the end) or to ensure that the print statement's output
appears on screen.
It might also be useful to add an option to Formaline to not rely on
simfactory. Right now without simfactory it will fail at some later point
in the build process (since it cannot call simfactory/bin/sim whoami) or
might use the wrong local source path (if simfactory is downloaded but not
properly set up).
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1054>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list