Skip to content

sh: line 1: <number> Aborted for paths longer than 260 characters #31

Description

@nikostr

I just experienced a crash using TRF as a part of EarlGrey/RepeatMasker. I first reported the issue here: TobyBaril/EarlGrey#209. A partial log looks as follows

RepeatMasker version 4.1.8
Search Engine: NCBI/RMBLAST [ 2.14.1+ ]
Using Custom Repeat Library: /cfs/klemming/projects/supr/naiss2024-6-183/nikos/earlgrey-2025-04-02/pr_090_003-20241004/run1-long/earlGreyOutputs/pr_090_003-20241004_EarlGrey/pr_090_003-20241
004_strainer/TS_pr_090_003-20241004-families.fa_3833/pr_090_003-20241004-families.fa.strained

Building general libraries in: /cfs/klemming/home/n/nikostr/miniforge3/envs/earlgrey/share/RepeatMasker/Libraries///general

analyzing file /cfs/klemming/projects/supr/naiss2024-6-183/nikos/genomeassembly-2024-09-18/pr_090/no-hic/pr_090_003/1-genomeassembly/output-dir/pr_090_003.hifiasm.20241004/pr_090_003.asm.p_c
tg.fa.prep

Checking for E. coli insertion elements

Checking for E. coli insertion elements
identifying Simple Repeats in batch 2 of 17640
identifying Simple Repeats in batch 1 of 17640
sh: line 1: 3449686 Aborted                 /cfs/klemming/home/n/nikostr/miniforge3/envs/earlgrey/bin/trf /cfs/klemming/projects/supr/naiss2024-6-183/nikos/earlgrey-2025-04-02/pr_090_003-202
41004/run1-long/earlGreyOutputs/pr_090_003-20241004_EarlGrey/pr_090_003-20241004_RepeatMasker_Against_Custom_Library/RM_3449518.MonJun90932012025/pr_090_003.asm.p_ctg.fa.prep_batch-2.masked 
2 7 7 80 10 50 10 2> trfResults-1749454391-3449670.err
sh: line 1: 3449685 Aborted                 (core dumped) /cfs/klemming/home/n/nikostr/miniforge3/envs/earlgrey/bin/trf /cfs/klemming/projects/supr/naiss2024-6-183/nikos/earlgrey-2025-04-02/
pr_090_003-20241004/run1-long/earlGreyOutputs/pr_090_003-20241004_EarlGrey/pr_090_003-20241004_RepeatMasker_Against_Custom_Library/RM_3449518.MonJun90932012025/pr_090_003.asm.p_ctg.fa.prep_b
atch-1.masked 2 7 7 80 10 50 10 2> trfResults-1749454391-3449669.err
identifying matches to pr_090_003-20241004-families.fa.strained sequences in batch 2 of 17640
identifying matches to pr_090_003-20241004-families.fa.strained sequences in batch 1 of 17640
identifying Simple Repeats in batch 2 of 17640
sh: line 1: 3449707 Aborted                 /cfs/klemming/home/n/nikostr/miniforge3/envs/earlgrey/bin/trf /cfs/klemming/projects/supr/naiss2024-6-183/nikos/earlgrey-2025-04-02/pr_090_003-202
41004/run1-long/earlGreyOutputs/pr_090_003-20241004_EarlGrey/pr_090_003-20241004_RepeatMasker_Against_Custom_Library/RM_3449518.MonJun90932012025/pr_090_003.asm.p_ctg.fa.prep_batch-2.masked 
2 3 5 75 20 33 7 2> trfResults-1749454396-3449670.err

Checking for E. coli insertion elements

Investigating a dumped core indicated that a call to strcpy is behind this, and looking closer at the source, I suspect that the 260 character limit set by _MAX_PATH causes an issue in the following line.

TRF/src/trf.c

Line 226 in 355c1f9

strcpy(paramset.inputfilename,av[1]);

Rerunning EarlGrey in a directory where my path ends up shorter than 260 characters resolves the issue.

It would probably be good to handle this in some way. Ideally this limit is removed, but if not, giving a meaningful error message would be an improvement.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions