*** caught segfault *** address... cause 'memory not mapped'

Hi again-
On the last slice of my 2x2x2 rm anova, I get this error:

*** caught segfault ***
address 0xfffffffd2524d030, cause ‘memory not mapped’

Traceback:
1: write.c.AFNI(filename, dset = brk, label = label, space = space, note = note, origin = origin, delta = delta, orient = orient, idcode = idcode, defhead = defhead, verb = verb, maskinf = maskinf, scale = scale, addFDR = addFDR, statsym = statsym, view = view, com_hist = com_hist, type = type, TR = TR, overwrite = overwrite)
2: write.AFNI(lop$outFN, out, brickNames, defhead = head, idcode = newid.AFNI(), com_hist = lop$com_history, statsym = statsym, addFDR = 1, type = “MRI_short”, overwrite = lop$overwrite)
An irrecoverable exception occurred. R is aborting now …
Segmentation fault

Could the afni experts decode that for me? Possibly something in my txt file, so Ill just be combing through it, looking for errors.

Thanks so much

Jess

Hi Jess,

To be sure, what program are you actually running? And how long does it take to get to that last slice when it crashes?

While I am not sure what is failing, there are 2 variables you might try setting, and maybe one of them will get aroung this (then you might test to see which it is). Set AFNI_NOMMAP and SKIP_COMPRESS_SETUP to “YES”, and see how it goes, e.g. (in tcsh syntax),

setenv AFNI_NOMMAP YES
setenv SKIP_COMPRESS_SETUP YES

Please let us know how it goes.

Thanks,

  • rick

Thank you for responding. It took 18 minutes from slice 1 to 256 (which is a little faster than its finished in the past). I will try those variables. I am running 3dMVM with these options:

#!/bin/tcsh

3dMVM -mask clippedfullmask3.nii -prefix Accuracy_30 -jobs 1
-model 1
-resid /Users/jessicadefenderfer/Desktop/CV15_WAV72/ACC_30_RESID.nii
-wsVars “oxyaccnoiseType”
-num_glt 3
-gltLabel 1 OxyEff -gltCode 1 ‘oxy : 1HbO -1HbR’
-gltLabel 2 AccEff -gltCode 2 ‘acc : 1right -1wrong’
-gltLabel 3 NoiseTypeEff -gltCode 3 ‘noiseType : 1vocod -1noise’
-dataTable
Subj oxy acc noiseType InputFile \

After changing those two variables, running the anova, I still encountered the same error. A little over 30 minutes to get to slice 256 before seeing:

*** caught segfault ***
address 0x15f3e5f030, cause ‘memory not mapped’

Traceback:
1: write.c.AFNI(filename, dset = brk, label = label, space = space, note = note, origin = origin, delta = delta, orient = orient, idcode = idcode, defhead = defhead, verb = verb, maskinf = maskinf, scale = scale, addFDR = addFDR, statsym = statsym, view = view, com_hist = com_hist, type = type, TR = TR, overwrite = overwrite)
2: write.AFNI(lop$outFN, out, brickNames, defhead = head, idcode = newid.AFNI(), com_hist = lop$com_history, statsym = statsym, addFDR = 1, type = “MRI_short”, overwrite = lop$overwrite)
An irrecoverable exception occurred. R is aborting now …
Segmentation fault

I should note before I was encountering this error, I was getting the “vector memory limit reached” but when i changed the R_MAX_VSIZE variable to 200Gb, and I no longer got that error. I’m thinking that the memory limit set by R actually includes both the total memory used and the compressed memory, and when the final slice is done, the memory and compressed memory combined go over 200 (meanwhile the memory pressure visual doesnt indicate anything is having a problem). Im on a mac, high Sierra, 32gb DDR4, 4.2 GHz Intel Core i7. Any ideas?

Wow, that is a bit confusing in multiple ways. First, what is it doing such that it needs 118 GB of RAM in R? Second, how can it even do that, compressed or not, when you have only 32 GB on your system? Third, even if it can, shouldn’t it be thrashing (swapping in and out RAM), which would make it veeeery slow? Fourth, during all this, the activity monitor shows 30 GB RAM and 2.37 GB swap used. How can that be so small?

So I am not sure what to suggest. It seems like you are running out of memory, though it is not clear what to try about it. You might consider closing a bunch of the M!cr@s*ft programs, and see if that help it to finish (or just get farther). It seems likely that slice 256 is that last one, so maybe it is almost done.

Do you want to try that?

– rick

I know, the activity monitor is a bit confusing. The “Memory” column reflects the total memory used (memory plus compressed memory). Technically, the amount of ram (of 32gb) being used at any given moment is at the bottom of the screen where it says “memory used”. Sometimes it gets close to 32, but never seems to reach 32. And the “memory pressure” gauge doesnt show much happening there, so its hard for me to believe that im having a memory problem. Ill try making a smaller test file with fewer participants and see what happens.

That’s a good idea. How many volumes are supplied in the datatable? It is hard to imagine that using so much memory.

Do you have AFNI_COMPRESSOR or AFNI_AUTOGZIP set?

  • rick

Not that I am aware of. I didnt change any of the default settings. How would I check? So far I am able to run 8 participants with success and see an output file with results. Only thing I know to do, is continue adding participants back in, 2 at a time, to see when it fails.

Ick, that might be a slow process.

You can check for those variables in the output of:

afni -get_processed_env

That output accounts for environment variables and the .afnirc file, or any AFNI var you might set on the command line.

  • rick

Looks like I have autogzip set, but I dont see the compressor variable. I found out that removing -resid option from the anova allows it finish without error (including all subjects). I made a new post here with more information:
https://afni.nimh.nih.gov/afni/community/board/read.php?1,163176,163176#msg-163176

AFNI_ALWAYS_LOCK=YES
AFNI_AUTOGZIP=YES
AFNI_DEFAULT_IMSAVE=jpg
AFNI_DEFAULT_OPACITY=8
AFNI_DISP_SCROLLBARS=YES
AFNI_FLOATSCAN=YES
AFNI_GRAPH_FORCE_AUTO_SCALE=YES
AFNI_GRAPH_TEXTLIMIT=20
AFNI_GRAYSCALE_BOT=25
AFNI_HINTS=YES
AFNI_IMAGE_MAXFRAC=0.88
AFNI_IMAGE_MINFRAC=0.04
AFNI_KEEP_PANNING=YES
AFNI_LEFT_IS_LEFT=YES
AFNI_NO_ADOPTION_WARNING=YES
AFNI_ONE_OBLIQUE_WARNING=YES
AFNI_PLUGINS_ALPHABETIZE=YES
AFNI_SESSTRAIL=1
AFNI_SPLASH_XY=444:222
AFNI_VIDEO_DELAY=66
AFNI_VIEW_ANAT_BRICK=YES
AFNI_VIEW_FUNC_BRICK=YES
AFNI_gamma=1.7
AFNI_graph_data_thick=1
AFNI_graph_dplot_thick=1
AFNI_graph_ggap=3
AFNI_graph_height=384
AFNI_graph_ideal_thick=1
AFNI_graph_ort_thick=1
AFNI_graph_width=512
AFNI_ncolors=80
AFNI_plug_crender_butcolor=#cc1033
AFNI_plug_drawdset_butcolor=#992066
AFNI_tsplotgeom=512x384