Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
1ceec998
Commit
1ceec998
authored
Apr 24, 2020
by
Matthieu Muffato
Browse files
Better detection of the process being killed
parent
7f7a75cd
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 @
1ceec998
...
...
@@ -128,15 +128,17 @@ sub write_output {
my
$stderr
=
$self
->
param
('
stderr
');
my
$flat_cmd
=
$self
->
param
('
flat_cmd
');
if
(
$return_value
and
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.
if
(
$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
);
}
elsif
(
$return_value
)
{
# "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