SIGSEGV error recieved while implementing 3dWrapDrive WSL 1 Windows 11 Ubuntu 24.04

AFNI version info (afni -ver):
Precompiled binary linux_ubuntu_24_64: Oct 31 2024 (Version AFNI_24.3.06 'Elagabalus')

code text  # @auto_tlrc -base MNI152_2009_template.nii.gz -input ${subj}_T1w_ns+orig \
             -no_ss                                                     \
             -init_xform AUTO_CENTER

Hello AFNI experts,

I am a beginner to AFNI and am trying to proceed with my first ever analysis during the university course. I am trying to run the script that was built with "afni-proc.py" with some changes in the paths. The trouble is the following message that I consistently recieve:

error message

#++ Removing all the temporary files
#Script is running:
\rm -f ./__tt_vr_base_min_outlier*
#Script is running:
\rm -f ./__tt_sub-017_T1w*

Finished alignment successfully

@auto_tlrc -base MNI152_2009_template.nii.gz -input sub-017_T1w_ns+orig -no_ss -init_xform AUTO_CENTER
Center distance of 35.647981 mm no auto_center needed
Center distance of 35.647981 mm
Padding ...
++ 3dZeropad: AFNI version=AFNI_24.3.06 (Oct 31 2024) [64-bit]
++ output dataset: ./__ats_tmp__ref_MNI152_2009_template.nii.gz_15pad+tlrc.BRIK
Resampling ...
++ 3dcalc: AFNI version=AFNI_24.3.06 (Oct 31 2024) [64-bit]
++ Authored by: A cast of thousands
++ 3dcalc: AFNI version=AFNI_24.3.06 (Oct 31 2024) [64-bit]
++ Authored by: A cast of thousands
Clipping -0.000100 32767.000100 ...
++ 3dcalc: AFNI version=AFNI_24.3.06 (Oct 31 2024) [64-bit]
++ Authored by: A cast of thousands
++ 3drefit: AFNI version=AFNI_24.3.06 (Oct 31 2024) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset __ats_tmp___rs_sub-017_T1w_ns+tlrc.HEAD

  • changing dataset view code
  • Changed dataset view type and filenames.
    ++ 3drefit processed 1 datasets
    ++ 3drefit: AFNI version=AFNI_24.3.06 (Oct 31 2024) [64-bit]
    ++ Authored by: RW Cox
    ++ Processing AFNI dataset __ats_tmp__resamp_NN+tlrc.HEAD
  • changing dataset view code
  • Changed dataset view type and filenames.
    ++ 3drefit processed 1 datasets
    ++ 3drefit: AFNI version=AFNI_24.3.06 (Oct 31 2024) [64-bit]
    ++ Authored by: RW Cox
    ++ Processing AFNI dataset __ats_tmp__resamp_edge_art+tlrc.HEAD
  • changing dataset view code
  • Changed dataset view type and filenames.
    ++ 3drefit processed 1 datasets
    Registration (cubic final interpolation) ...
    ++ 3dWarpDrive: AFNI version=AFNI_24.3.06 (Oct 31 2024) [64-bit]
    ++ Authored by: RW Cox

Fatal Signal 11 (SIGSEGV) received
THD_mask_clust
mri_warp3D_align_setup
3dWarpDrive main
Bottom of Debug Stack
AFNI version = AFNI_24.3.06 Compile date = Oct 31 2024
[[Precompiled binary linux_ubuntu_24_64: Oct 31 2024]]
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/km_ivanov/.afni.crashlog
Error: Failed in 3dWarpDrive

A little story behind:

I have faced some troubles with the same SIGSEGV error on the different stage of preprocessing before, but fixed it with rebooting the laptop and the Xserver. I was trying to find information on the Xserver errors topic on the forum but failed to find a solution.
So, some standard information that was always requested:

Additional infortmation

a) echo $DISPLAY

:0.0

b)  afni_system_check.py -check_all

-------------------------------- general ---------------------------------
architecture: 64bit ELF
cpu type: x86_64
system: Linux
release: 4.4.0-26100-Microsoft
version: #1882-Microsoft Fri Jan 01 08:00:00 PST 2016
distribution: ubuntu 24.04 Noble Numbat
number of CPUs: 16
apparent login shell: bash
shell RC file: .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /home/km_ivanov/abin/afni
afni version : Precompiled binary linux_ubuntu_24_64: Oct 31 2024
: AFNI_24.3.06 'Elagabalus'
AFNI_version.txt : AFNI_24.3.06, linux_ubuntu_24_64, Oct 31 2024, official
which python : /usr/bin/python
python version : 3.12.3
which R : /usr/bin/R
R version : R version 4.3.3 (x86_64-pc-linux-gnu)

instances of various programs found in PATH:
afni : 1 (/home/km_ivanov/abin/afni)
R : 1 (/usr/bin/R)
python : 1 (/usr/bin/python3.12)
python2 : 0
python3 : 1 (/usr/bin/python3.12)

testing ability to start various programs...
afni : success
suma : success
3dSkullStrip : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
uber_subject.py : success
3dMVM : success

------------------------ dependent program tests -------------------------
checking for dependent programs...

which tcsh : /usr/bin/tcsh
tcsh version : 6.24.10
which Xvfb : /usr/bin/Xvfb

checking for R packages...
rPkgsInstall -pkgs ALL -check : success

R RHOME : /usr/lib/R

------------------------------ python libs -------------------------------

++ module loaded: matplotlib.pyplot
module file : /usr/lib/python3/dist-packages/matplotlib/pyplot.py
matplotlib version : 3.6.3

++ module loaded: flask
module file : /usr/lib/python3/dist-packages/flask/init.py
flask version : 3.0.2

++ module loaded: flask_cors
module file : /usr/lib/python3/dist-packages/flask_cors/init.py
flask_cors version : 4.0.0

-------------------------------- env vars --------------------------------
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Users/user/AppData/Local/Programs/cursor/resources/app/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/Users/user/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/user/AppData/Local/Muse Hub/lib:/mnt/c/Program Files/Git/cmd:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Users/user/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/user/AppData/Local/Muse Hub/lib:/mnt/c/Program Files/PsychoPy:/mnt/c/Program Files/PsychoPy/DLLs:/snap/bin:/home/km_ivanov/abin

PYTHONPATH =
R_LIBS = /home/km_ivanov/R
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =
CONDA_SHLVL =
CONDA_DEFAULT_ENV =
CC =

----------------------------- eval dot files -----------------------------

----------- AFNI $HOME files -----------

.afnirc                   : found
.sumarc                   : found
.afni/help/all_progs.COMP : found

--------- shell startup files ----------

-- good: .tcshrc seems to contain 'source .cshrc'
-- considered operations: path, apsearch

-- note: followers should not need edits, so edit flags should be 0
(have 1 follower(s), which can be ignored)

dot file test : want 1 modifications across 3 files:

  file             path  flatdir  apsearch        follower
  ---------------  ----  -------  --------        --------
  .cshrc           0     0        1               0
  .tcshrc          0     0        0               1
  .bashrc          0     0        0               0

------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas : found TT_N27+tlrc under /home/km_ivanov/abin

------------------------------ OS specific -------------------------------
which apt-get : /usr/bin/apt-get
apt-get version : apt 2.7.14 (amd64)

have Ubuntu system: ubuntu 24.04 Noble Numbat
have Ubuntu afni : Precompiled binary linux_ubuntu_24_64: Oct 31 2024

========================= summary, please fix: =========================

  • just be aware: login shell 'bash', but our code examples use 'tcsh'
  • dot file test : want 1 modifications across 3 files:
  • insufficient data for AFNI bootcamp
    (see "Prepare for Bootcamp" on install pages)

If you have ever faced the issue, or have some ideas how to fix it, I would be happy to recieve your help!

Best,

Kirill

Hi Kirill,

Is this still a problem? It is difficult to think what could possibly be done, since you are running ubuntu 24 and using those binaries. What problems might come from the Windows layer is harder to guess at. Do you have a non-windows machine to do the main processing on?

Maybe some of the Windows components could be updated too. I see at 2016 for the Microsoft version of something (is that the subsystem version?). Anyway, if there are ways to update this, it might be a good idea.

-rick

We managed to run it on another machine, (it was either windows 11 + ubuntu 22, or pure Linux), but none of the students managed to do it with ubuntu 24, so we think it is the problem. Maybe there are some conflicts between wsl and ubuntu 24?

But maybe windows component updating might also help, I will try it another time. Thank you a lot for the respond!

And @dglen reports that WSL-1 often works a bit better than WSL-2, mostly for speed, but there could certainly be related component issues.

Using WSL machines for the real processing leading to potential publication might be questionable for these types of reasons. Looking at data is one thing, publishing an analysis is another.

-rick

The failure here is at a memory intensive point. I do find a big difference between WSL versions. For WSL2, you can adjust some resource configurations, as shown here:

https://learn.microsoft.com/en-us/answers/questions/1296124/how-to-increase-memory-and-cpu-limits-for-wsl2-win

You can try to give more resources to the WSL instance by changing the configuration in the .wslconfig in the C:\Users\username directory.

The @auto_tlrc program calls the 3dWarpDrive program. That is often called because the afni_proc.py command specifies an affine base template and a tlrc block to align to a standard template. This might be with a nonlinear alignment too if tlrc_NL_warp is also specified. Also consider using sswarper2 as a pre-afni_proc.py step. That uses 3dAllineate (instead of 3dWarpDrive) and 3dQwarp for nonlinear alignment.