Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
e0bb4f7e
Commit
e0bb4f7e
authored
May 06, 2020
by
Matthieu Muffato
Browse files
Better detection of the process being killed
parent
93237353
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm
+6
-4
No files found.
modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm
View file @
e0bb4f7e
...
...
@@ -114,15 +114,17 @@ sub write_output {
# system() could not start, or wait() failed
die
sprintf
(
"
Could not start '%s': %s
\n
",
$flat_cmd
,
$stderr
);
}
elsif
(
not
(
$return_value
>>
8
))
{
# The job has been killed. The best is to wait a bit that LSF kills
# Lower 8 bits indicate the process has been killed and did not complete.
}
elsif
(
$return_value
&
255
)
{
# It can happen because of a MEMLIMIT / RUNLIMIT, which we
# know are not atomic. The best is to wait a bit that LSF kills
# the worker too
sleep
30
;
# If we reach this point,
perhaps
it was killed
by a user
# If we reach this point, it was killed
for another reason.
die
sprintf
(
"
'%s' was killed with code=%d
\n
stderr is: %s
\n
",
$flat_cmd
,
$return_value
,
$stderr
);
}
else
{
# "Normal" process exit with a non-zero code
# "Normal" process exit with a non-zero code
(in the upper 8 bits)
$return_value
>>=
8
;
# We create a dataflow event depending on the exit code of the process.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment