External Email - Use Caution
Dear R., Thank you for your suggestions. I have now allocated 22 GB of RAM to Ubuntu 22, but unfortunately I am still encountering the same error. My machine has 32 GB in total, so I am not able to allocate the full 32 GB for a complete recon-all run. As background, I need to use the SegmentAAN.sh script (SegmentAAN.sh <SUBJECT_ID> <SUBJECT_DIR> ), which is only available in FreeSurfer ≥ 8.0. One possible workaround is that my department provides access to an HPC-based Linux system where FreeSurfer 7.3.2 is available (and cannot currently be upgraded). I was wondering whether it would be reasonable to run recon-all on the HPC system, and then perform SegmentAAN.sh locally using FreeSurfer 8.2.0 based on those outputs. I would appreciate your thoughts on whether this approach is feasible. If not, do you perhaps have any other solutions on solving this 'double free' issue? Best regards, Huaiyu
________________________________ From: fsbuild fsbuild@contbay.com Sent: Tuesday, April 21, 2026 1:48 To: freesurfer@nmr.mgh.harvard.edu freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] Re: Recon-all error: free(): double free detected in tcache 2; Command terminated by signal 6
⚠ Caution: External sender
External Email - Use Caution
The "double free" notification may be from data corruption in memory, e.g., memory management in the Ubuntu Linux virtual machine running on top of the Windows host via WSL2 has gone wrong from trying to free the same location in memory 2X. So the Linux OS kills the process (signal 6). This might be from mri_synthseg running tensorflow and running out of memory. I would check on how much memory WSL2 has been given to run the guest Linux OS, Ubuntu 22. My guess is at least 4G of physical RAM needs to be reserved to run the Windows OS on the machine, and subsequently you could try allocating the rest to WSL2. I would try to give Ubuntu22 at least 16G of RAM, but for a full recon-all 32G ay be needed.
- R.
On Apr 20, 2026, at 11:14, Huaiyu Liu huaiyu.liu@ucl.ac.uk wrote: