Skip to content

Core dump when running multi-threaded on certain fa inputs #145

@jchorl

Description

@jchorl

Hi,

Thanks for the hard work on this tool.

I managed to hit a core dump when amrfinder runs blastn when running in multi-threaded mode.

Here are the logs:

(amrtest) root@8a9053f3c7ce:/work# amrfinder -n Klebsiella+oxytoca.fna --threads 4 --organism Klebsiella_oxytoca
Running: amrfinder -n Klebsiella+oxytoca.fna --threads 4 --organism Klebsiella_oxytoca
Software directory: '/opt/conda/envs/amrtest/bin/'
Software version: 3.12.8
Database directory: '/opt/conda/envs/amrtest/share/amrfinderplus/data/2024-05-02.2'
Database version: 2024-05-02.2
AMRFinder translated nucleotide and mutation search
Running blastx
Running blastn

*** ERROR ***
'/opt/conda/envs/amrtest/bin/blastn'  -query 'Klebsiella+oxytoca.fna' -db /tmp/amrfinder.SVXjTS/db/AMR_DNA-Klebsiella_oxytoca -evalue 1e-20  -dust no  -max_target_seqs 10000    -num_threads 2  -mt_mode 1 -outfmt '6 qseqid sseqid qstart qend qlen sstart send slen qseq sseq' -out /tmp/amrfinder.SVXjTS/blastn > /tmp/amrfinder.SVXjTS/log 2> /tmp/amrfinder.SVXjTS/blastn-err
status = 34304
terminate called after throwing an instance of 'ncbi::CCoreException'
terminate called recursively
Aborted (core dumped)

HOSTNAME: 8a9053f3c7ce
SHELL: ?
PWD: /work
PATH: /opt/conda/envs/amrtest/bin:/opt/conda/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Progam name:  amrfinder
Command line: amrfinder -n Klebsiella+oxytoca.fna --threads 4 --organism Klebsiella_oxytoca

Interestingly, when running with --threads 1, this doesn't happen:

(amrtest) root@8a9053f3c7ce:/work# amrfinder -n Klebsiella+oxytoca.fna --threads 1 --organism Klebsiella_oxytoca
Running: amrfinder -n Klebsiella+oxytoca.fna --threads 1 --organism Klebsiella_oxytoca
Software directory: '/opt/conda/envs/amrtest/bin/'
Software version: 3.12.8
Database directory: '/opt/conda/envs/amrtest/share/amrfinderplus/data/2024-05-02.2'
Database version: 2024-05-02.2
AMRFinder translated nucleotide and mutation search
Running blastx
Running blastn
Making report
Protein identifier      Contig id       Start   Stop    Strand  Gene symbol     Sequence name   Scope   Element type    Element subtype Class   Subclass        Method  Target length    Reference sequence length       % Coverage of reference sequence        % Identity to reference sequence        Alignment length        Accession of closest sequence    Name of closest sequence        HMM id  HMM description
NA      k141_2730       1604    2473    -       blaOXY-2-6      extended-spectrum class A beta-lactamase OXY-2-6        core    AMR     AMR     BETA-LACTAM     CEPHALOSPORIN    ALLELEX 290     290     100.00  100.00  290     WP_063864552.1  extended-spectrum class A beta-lactamase OXY-2-6        NA      NA
AMRFinder took 215 seconds to complete

I can share the fasta causing this issue via email if helpful. I'm not sure if the issue is with blastn itself, or the way the inputs are structured.

To set up the environment, I installed amrfinder using docker/micromamba:

[josh@i-072f4817696381e6f debugamr]$ docker run -it --rm -u 0 -v $(pwd):/work -w /work mambaorg/micromamba:1.5.8 bash
(base) root@8a9053f3c7ce:/work# micromamba create -y -n amrtest ncbi-amrfinderplus==3.12.8 -c bioconda -c conda-forge -c defaults
(base) root@8a9053f3c7ce:/work# micromamba activate amrtest
(amrtest) root@8a9053f3c7ce:/work# amrfinder -u

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcondaIssue has to do with conda package installation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions