All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit c4d0c78a authored by Kirk Webb's avatar Kirk Webb

libplab.py.in:

Exit right away when signalled while trying to perform a remote command.

vnode_setup.in:

More info when a timeout occurs, and reduce the execution spacing a little.
parent e39c78e7
...@@ -1297,7 +1297,7 @@ class Node: ...@@ -1297,7 +1297,7 @@ class Node:
if hasattr(e,"killed") and e.killed: if hasattr(e,"killed") and e.killed:
os.kill(cmdobj.pid, signal.SIGTERM) os.kill(cmdobj.pid, signal.SIGTERM)
cmdobj.wait() cmdobj.wait()
sys.exit(1) sys._exit(256)
pass pass
else: else:
signal.signal(signal.SIGINT, sig["INT"]) signal.signal(signal.SIGINT, sig["INT"])
......
...@@ -308,7 +308,7 @@ print "vnode_setup running at parallelization: $numbatch ". ...@@ -308,7 +308,7 @@ print "vnode_setup running at parallelization: $numbatch ".
while (1) { while (1) {
# Space out the invocation of child processes a little. # Space out the invocation of child processes a little.
sleep(3); sleep(1);
# #
# We're done when we've hit the last vnode, and we've outlived all of our # We're done when we've hit the last vnode, and we've outlived all of our
...@@ -399,11 +399,13 @@ while (1) { ...@@ -399,11 +399,13 @@ while (1) {
# #
my $oldest; my $oldest;
my $oldestpid = 0; my $oldestpid = 0;
my $oldestvnode = "";
while (my ($pid, $aref) = each %child_vnodes) { while (my ($pid, $aref) = each %child_vnodes) {
my ($vnode, $pnode, $mode, $jailed, $plab, $birthtime) = @$aref; my ($vnode, $pnode, $mode, $jailed, $plab, $birthtime) = @$aref;
if ((!$oldestpid) || ($birthtime < $oldest)) { if ((!$oldestpid) || ($birthtime < $oldest)) {
$oldest = $birthtime; $oldest = $birthtime;
$oldestpid = $pid; $oldestpid = $pid;
$oldestvnode = $vnode;
} }
} }
...@@ -416,19 +418,21 @@ while (1) { ...@@ -416,19 +418,21 @@ while (1) {
} }
# #
# If the oldest has already expried, just kill it off right now, and go # If the oldest has already expired, just kill it off right now, and go
# back around the loop # back around the loop
# #
my $now = time(); my $now = time();
my $waittime = ($oldest + $childwait) - time(); my $waittime = ($oldest + $childwait) - time();
# #
# Kill of the oldest if he gets too old while we're waiting # Kill of the oldest if it gets too old while we're waiting.
# #
local $SIG{ALRM} = sub { print "*** $0: timeout waiting for vnode:\n"; local $SIG{ALRM} =
kill("TERM", $oldestpid); }; sub { print "*** $0: timeout (alarm clock) waiting for ".
"vnode: $oldestvnode\n";
kill("TERM", $oldestpid); };
if ($waittime <= 0) { if ($waittime <= 0) {
print "*** $0: timeout waiting for vnode:\n"; print "*** $0: timeout waiting for vnode: $oldestvnode\n";
kill("TERM",$oldestpid); kill("TERM",$oldestpid);
} else { } else {
alarm($waittime); alarm($waittime);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment