help > Segmentation fault when converting asc to swc in a batch
Showing 1-2 of 2 posts
Display:
Results per page:
Oct 18, 2019  11:10 AM | Sophie Laturnus
Segmentation fault when converting asc to swc in a batch
Hey there,

I am trying to convert a batch of ASC files ( > 500) into SWC.
I am using snakemake to call

~/Vaa3D/vaa3d -x libconvert_Neurolucida_ASC_file_to_SWC.so -f asc_to_swc -p "path to ASC" -o "path to SWC"

for every reconstructions (one after the other).

The conversion works for a while but then the system crashes with a segmentation fault. The timing here is very variable. It can happen after 3 or after 50 files. Interestingly, the system always crashes in the end:

done with saving file: XXXXX/SWC_vaa3d/08 20 2018 sample 7.SWC
**** the plugin preprocessing takes [ 300 milliseconds]
Starting Vaa3D version checker...
http://home.penglab.com/proj/vaa3d/curre...
/bin/bash: line 1: 11769 Segmentation fault (core dumped) ~/Vaa3D/vaa3d -x libconvert_Neurolucida_ASC_file_to_SWC.so -f asc_to_swc -p "XXX/08 20 2018 sample 7.ASC" -o "XXX/SWC_vaa3d/08 20 2018 sample 7.SWC"

When I try to convert the file on its own (at which the system failed) it works like a charm.

I also started adding a sleep period for the shell, so that it waits 5 seconds before it starts the new job, just to make sure the memory is enough. The crashes still occur.

Do you know what it could be? Has anyone experienced it as well?

All the best,
Sophie

Edit: I attached a backtrace, maybe that helps. There also often occurs the following error:

*** Error in '/gpfs01/berens/user/slaturnus/Vaa3D/vaa3d': free(): corrupted unsorted chunks: 0x0000000022e25280 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f87040207e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f870402937a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f870402d53c]
/lib/x86_64-linux-gnu/libc.so.6(+0x3a025)[0x7f8703fe3025]
/lib/x86_64-linux-gnu/libc.so.6(+0x3a045)[0x7f8703fe3045]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0x7f8703fc9837]
/gpfs01/berens/user/slaturnus/Vaa3D/vaa3d[0x448358]
Attachment: backtrace.txt
Dec 3, 2019  06:12 PM | Hanchuan Peng
RE: Segmentation fault when converting asc to swc in a batch
Sophie,

Not sure why, but the key conversion engine was not part of the Vaa3D indeed if I am not mistaken, we only provided a wrapper of the function using the vaa3d plugin interface, so the function is more accessible.

That said, if we notice the same problem (so far we do not have)  we will follow up here later.

Best,
-Hanchuan


Originally posted by Sophie Laturnus:
Hey there,

I am trying to convert a batch of ASC files ( > 500) into SWC.
I am using snakemake to call

~/Vaa3D/vaa3d -x libconvert_Neurolucida_ASC_file_to_SWC.so -f asc_to_swc -p "path to ASC" -o "path to SWC"

for every reconstructions (one after the other).

The conversion works for a while but then the system crashes with a segmentation fault. The timing here is very variable. It can happen after 3 or after 50 files. Interestingly, the system always crashes in the end:

done with saving file: XXXXX/SWC_vaa3d/08 20 2018 sample 7.SWC
**** the plugin preprocessing takes [ 300 milliseconds]
Starting Vaa3D version checker...
http://home.penglab.com/proj/vaa3d/curre...
/bin/bash: line 1: 11769 Segmentation fault (core dumped) ~/Vaa3D/vaa3d -x libconvert_Neurolucida_ASC_file_to_SWC.so -f asc_to_swc -p "XXX/08 20 2018 sample 7.ASC" -o "XXX/SWC_vaa3d/08 20 2018 sample 7.SWC"

When I try to convert the file on its own (at which the system failed) it works like a charm.

I also started adding a sleep period for the shell, so that it waits 5 seconds before it starts the new job, just to make sure the memory is enough. The crashes still occur.

Do you know what it could be? Has anyone experienced it as well?

All the best,
Sophie

Edit: I attached a backtrace, maybe that helps. There also often occurs the following error:

*** Error in '/gpfs01/berens/user/slaturnus/Vaa3D/vaa3d': free(): corrupted unsorted chunks: 0x0000000022e25280 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f87040207e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f870402937a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f870402d53c]
/lib/x86_64-linux-gnu/libc.so.6(+0x3a025)[0x7f8703fe3025]
/lib/x86_64-linux-gnu/libc.so.6(+0x3a045)[0x7f8703fe3045]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0x7f8703fc9837]
/gpfs01/berens/user/slaturnus/Vaa3D/vaa3d[0x448358]