PapenfussLab / gridss

GRIDSS: the Genomic Rearrangement IDentification Software Suite
Other
252 stars 73 forks source link

Aborted runs don't give non-zero exit code #501

Open keiranmraine opened 3 years ago

keiranmraine commented 3 years ago

Version: Gridss 2.11.2

Problem:

Code indicates errors occurred but doesn't give a non-zero exit code:

Tue Jun  8 05:34:05 BST 2021: Running   AnnotateInsertedSequence        /somepath/Gridss/sample.gridss.vcf.gz
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0x00007f80892bed53, pid=27560, tid=27706
#
# JRE version: OpenJDK Runtime Environment (11.0.10+9) (build 11.0.10+9-Ubuntu-0ubuntu1.20.04)
# Java VM: OpenJDK 64-Bit Server VM (11.0.10+9-Ubuntu-0ubuntu1.20.04, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libbwa.9119406094008069462.jnilib+0x2ed53]  bns_get_seq+0x93
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /somepath/Gridss/hs_err_pid27560.log
# [ timer expired, abort... ]
Tue Jun  8 13:25:36 BST 2021: Complete calling  /somepath/Gridss/sample.gridss.vcf.gz
Tue Jun  8 13:25:36 BST 2021: Run complete with 18 warnings and 2 errors.

Expected solution:

Always give non-zero exit code when the run indicates any errors.

jbedo commented 3 years ago

Also encountered this error, a zero exit code was returned after a process terminated due to OOM:

INFO    2021-07-16 07:42:47     CollectGridssMetrics

********** NOTE: Picard's command line syntax is changing.
**********
********** For more information, please see:
********** https://github.com/broadinstitute/picard/wiki/Command-Line-Syntax-Transition-For-Users-(Pre-Transition)
**********
********** The command line looks like this in the new syntax:
**********
**********    CollectGridssMetrics -VERBOSITY WARNING -I /nix/store/0rbs614s2h7pjqhfp4dp5nz8rqm4vsv7-bionix-samtools-sort -O /nix/store/wr0ggpdv3a08j25hbd41nl7rqi0mj4l4-bionix-gridss-collectMetrics/input -AS true -THRESHOLD_COVERAGE 10000
**********

07:42:49.716 INFO  NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/nix/store/4g79is07ypgczsn2fkfy905xcbrh6jwa-gridss-2.12.0-gridss-jar-with-dependencies.jar!/com/intel/gkl/native/libgkl_compression.so
[Fri Jul 16 07:42:49 UTC 2021] CollectGridssMetrics THRESHOLD_COVERAGE=10000 INPUT=/nix/store/0rbs614s2h7pjqhfp4dp5nz8rqm4vsv7-bionix-samtools-sort ASSUME_SORTED=true OUTPUT=/nix/store/wr0ggpdv3a08j25hbd41nl7rqi0mj4l4-bionix-gridss-collectMetrics/input VERBOSITY=WARNING    GRIDSS_PROGRAM=[CollectCigarMetrics, CollectMapqMetrics, CollectTagMetrics, CollectIdsvMetrics, ReportThresholdCoverage] STOP_AFTER=0 METRIC_ACCUMULATION_LEVEL=[ALL_READS] PROGRAM=[CollectInsertSizeMetrics] INCLUDE_U
[Fri Jul 16 07:42:49 UTC 2021] Executing as ?@milton-sml-016.hpc.wehi.edu.au on Linux 3.10.0-957.5.1.el7.x86_64 amd64; OpenJDK 64-Bit Server VM 1.8.0_242-b08; Deflater: Intel; Inflater: Intel; Provider GCS is not available; Picard version: 2.12.0-gridss
Exception in thread "picard.analysis.CollectInsertSizeMetrics@49070868" java.lang.OutOfMemoryError: Java heap space
        at htsjdk.samtools.util.Histogram.increment(Histogram.java:145)
        at htsjdk.samtools.util.Histogram.getMedianAbsoluteDeviation(Histogram.java:397)
        at picard.analysis.directed.InsertSizeMetricsCollector$PerUnitInsertSizeMetricsCollector.addMetricsToFile(InsertSizeMetricsCollector.java:150)
        at picard.metrics.MultiLevelCollector$AllReadsDistributor.addToFile(MultiLevelCollector.java:213)
        at picard.metrics.MultiLevelCollector.addAllLevelsToFile(MultiLevelCollector.java:338)
        at picard.analysis.CollectInsertSizeMetrics.finish(CollectInsertSizeMetrics.java:157)
        at picard.analysis.SinglePassSamProgram$SinglePassSamProgramRunner.run(SinglePassSamProgram.java:324)
        at java.lang.Thread.run(Thread.java:748)
[Sat Jul 17 02:02:09 UTC 2021] gridss.analysis.CollectGridssMetrics done. Elapsed time: 1,099.33 minutes.
Runtime.totalMemory()=1037959168