3dClusterize -> Fatal Signal 11 (SIGSEGV) received -> mri_maskify ; AFNI_18.2.15

I have been following the general code/structure from this guide.
The error appears to arise from the following line of code:

3dClusterize -inset $HomePath/stats_mni.$sid.$currtask+tlrc. -ithr 3 -mask $HomePath/mayka_mni_motorcortex_mask_$sid+tlrc. -${csim_sided} -$voxstat_thr $voxstat_thr -NN ${csim_neigh} -clust_nvox ${clust_thrvol} -pref_map -savemask $HomePath/$sid.$currtask.clust_mask > ${csim_pref}_report.txt

With the error output:
[i]++ Reading in user’s mask

Fatal Signal 11 (SIGSEGV) received
mri_maskify
Bottom of Debug Stack
** AFNI version = AFNI_18.2.15 Compile date = Aug 28 2018
** [[Precompiled binary linux_openmp_64: Aug 28 2018]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /home/kxd344/.afni.crashlog[/i]

More specifically, here is what is appended to the crashlog:
------ CRASH LOG ------------------------------**
Fatal Signal 11 (SIGSEGV) received
… recent internal history …
++++THD_patch_brickim [4]: {ENTRY (file=thd_loaddblk.c line=1274) from THD_open_dataset
----THD_patch_brickim [4]: EXIT} (file=thd_loaddblk.c line=1313) to THD_open_dataset
—THD_open_dataset [3]: EXIT} (file=thd_mastery.c line=171) to 3dClusterize
+++THD_load_datablock [3]: {ENTRY (file=thd_loaddblk.c line=133) from 3dClusterize
++++AFNI_process_environ [4]: {ENTRY (file=afni_environ.c line=112) from THD_load_datablock
+++++AFNI_suck_file [5]: {ENTRY (file=afni_environ.c line=25) from AFNI_process_environ
-----AFNI_suck_file [5]: EXIT} (file=afni_environ.c line=30) to AFNI_process_environ
----AFNI_process_environ [4]: EXIT} (file=afni_environ.c line=132) to THD_load_datablock
++++AFNI_process_environ [4]: {ENTRY (file=afni_environ.c line=112) from THD_load_datablock
+++++AFNI_suck_file [5]: {ENTRY (file=afni_environ.c line=25) from AFNI_process_environ
-----AFNI_suck_file [5]: EXIT} (file=afni_environ.c line=30) to AFNI_process_environ
----AFNI_process_environ [4]: EXIT} (file=afni_environ.c line=132) to THD_load_datablock
THD_load_datablock – mmap succeeded
—THD_load_datablock [3]: EXIT} (file=thd_loaddblk.c line=468) to 3dClusterize
+++AFNI_process_environ [3]: {ENTRY (file=afni_environ.c line=112) from 3dClusterize
++++AFNI_suck_file [4]: {ENTRY (file=afni_environ.c line=25) from AFNI_process_environ
----AFNI_suck_file [4]: EXIT} (file=afni_environ.c line=30) to AFNI_process_environ
—AFNI_process_environ [3]: EXIT} (file=afni_environ.c line=132) to 3dClusterize
+++THD_load_datablock [3]: {ENTRY (file=thd_loaddblk.c line=133) from 3dClusterize
++++AFNI_process_environ [4]: {ENTRY (file=afni_environ.c line=112) from THD_load_datablock
+++++AFNI_suck_file [5]: {ENTRY (file=afni_environ.c line=25) from AFNI_process_environ
-----AFNI_suck_file [5]: EXIT} (file=afni_environ.c line=30) to AFNI_process_environ
----AFNI_process_environ [4]: EXIT} (file=afni_environ.c line=132) to THD_load_datablock
++++AFNI_process_environ [4]: {ENTRY (file=afni_environ.c line=112) from THD_load_datablock
+++++AFNI_suck_file [5]: {ENTRY (file=afni_environ.c line=25) from AFNI_process_environ
-----AFNI_suck_file [5]: EXIT} (file=afni_environ.c line=30) to AFNI_process_environ
----AFNI_process_environ [4]: EXIT} (file=afni_environ.c line=132) to THD_load_datablock
THD_load_datablock – mmap succeeded
—THD_load_datablock [3]: EXIT} (file=thd_loaddblk.c line=468) to 3dClusterize
–3dClusterize [2]: EXIT} (file=basic_boring.c line=71) to Bottom of Debug Stack
++mri_maskify [2]: {ENTRY (file=mri_thresh.c line=196) from Bottom of Debug Stack

mri_maskify
** AFNI compile date = Aug 28 2018
** [[Precompiled binary linux_openmp_64: Aug 28 2018]]
** Program Crash **

Thank you for your help.

Hmm, I think there should be a data set entered after the “-pref_map …” option, for one thing.

Also, there is no option called “-savemask”. I think that should be deleted?

Do either/both of those fix the crash?

–pt

Thanks for the catch. Unfortunately I have the same error still. I deleted “-savemask” but kept everything else the same as it appeared to me that -pref_map is the same idea as -savemask used to be?

Command:
3dClusterize -inset $HomePath/stats_mni.$sid.$currtask+tlrc. -ithr 3 -mask $HomePath/mayka_mni_motorcortex_mask_$sid+tlrc. -${csim_sided} -$voxstat_thr $voxstat_thr -NN ${csim_neigh} -clust_nvox ${clust_thrvol} -pref_map $HomePath/$sid.$currtask.clust_mask > ${csim_pref}_report.txt

Error output:
++ Reading in user’s mask

Fatal Signal 11 (SIGSEGV) received
mri_maskify
Bottom of Debug Stack
** AFNI version = AFNI_18.2.15 Compile date = Aug 28 2018
** [[Precompiled binary linux_openmp_64: Aug 28 2018]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /home/kxd344/.afni.crashlog

------ CRASH LOG ------------------------------**
Fatal Signal 11 (SIGSEGV) received
… recent internal history …
++++THD_patch_brickim [4]: {ENTRY (file=thd_loaddblk.c line=1274) from THD_open_dataset
----THD_patch_brickim [4]: EXIT} (file=thd_loaddblk.c line=1313) to THD_open_dataset
—THD_open_dataset [3]: EXIT} (file=thd_mastery.c line=171) to 3dClusterize
+++THD_load_datablock [3]: {ENTRY (file=thd_loaddblk.c line=133) from 3dClusterize
++++AFNI_process_environ [4]: {ENTRY (file=afni_environ.c line=112) from THD_load_datablock
+++++AFNI_suck_file [5]: {ENTRY (file=afni_environ.c line=25) from AFNI_process_environ
-----AFNI_suck_file [5]: EXIT} (file=afni_environ.c line=30) to AFNI_process_environ
----AFNI_process_environ [4]: EXIT} (file=afni_environ.c line=132) to THD_load_datablock
++++AFNI_process_environ [4]: {ENTRY (file=afni_environ.c line=112) from THD_load_datablock
+++++AFNI_suck_file [5]: {ENTRY (file=afni_environ.c line=25) from AFNI_process_environ
-----AFNI_suck_file [5]: EXIT} (file=afni_environ.c line=30) to AFNI_process_environ
----AFNI_process_environ [4]: EXIT} (file=afni_environ.c line=132) to THD_load_datablock
THD_load_datablock – mmap succeeded
—THD_load_datablock [3]: EXIT} (file=thd_loaddblk.c line=468) to 3dClusterize
+++AFNI_process_environ [3]: {ENTRY (file=afni_environ.c line=112) from 3dClusterize
++++AFNI_suck_file [4]: {ENTRY (file=afni_environ.c line=25) from AFNI_process_environ
----AFNI_suck_file [4]: EXIT} (file=afni_environ.c line=30) to AFNI_process_environ
—AFNI_process_environ [3]: EXIT} (file=afni_environ.c line=132) to 3dClusterize
+++THD_load_datablock [3]: {ENTRY (file=thd_loaddblk.c line=133) from 3dClusterize
++++AFNI_process_environ [4]: {ENTRY (file=afni_environ.c line=112) from THD_load_datablock
+++++AFNI_suck_file [5]: {ENTRY (file=afni_environ.c line=25) from AFNI_process_environ
-----AFNI_suck_file [5]: EXIT} (file=afni_environ.c line=30) to AFNI_process_environ
----AFNI_process_environ [4]: EXIT} (file=afni_environ.c line=132) to THD_load_datablock
++++AFNI_process_environ [4]: {ENTRY (file=afni_environ.c line=112) from THD_load_datablock
+++++AFNI_suck_file [5]: {ENTRY (file=afni_environ.c line=25) from AFNI_process_environ
-----AFNI_suck_file [5]: EXIT} (file=afni_environ.c line=30) to AFNI_process_environ
----AFNI_process_environ [4]: EXIT} (file=afni_environ.c line=132) to THD_load_datablock
THD_load_datablock – mmap succeeded
—THD_load_datablock [3]: EXIT} (file=thd_loaddblk.c line=468) to 3dClusterize
–3dClusterize [2]: EXIT} (file=basic_boring.c line=71) to Bottom of Debug Stack
++mri_maskify [2]: {ENTRY (file=mri_thresh.c line=196) from Bottom of Debug Stack

mri_maskify
** AFNI compile date = Aug 28 2018
** [[Precompiled binary linux_openmp_64: Aug 28 2018]]
** Program Crash **

Thank you!

Hi-

I’ve sent a PM in case you want to upload the data sets so someone can take a look.

–pt

We have coincidentally run into this here, too, and I just started a build
that fixes it. The input data is masked in memory, which fails in the case
of MMAP.

A workaround until then would be to set AFNI_NOMMAP to YES.

Thanks,

  • rick