Out of storage space?

Hi there!
I’m running into this error at the dwi2response step:

dwi2response: Output of failed command:
              mrconvert: copying from "/media/nir...en/Tumour/PSychTest/dwi.mif" to "/tmp/mrtrix-tmp-JLYWDl.mif"...  [
              mrconvert: [SYSTEM FATAL CODE: SIGBUS (7)] Bus error: Accessing invalid address (out of storage space?)
              dwiextract: [ERROR] no filename supplied to standard input (broken pipe?)
              dwiextract: [ERROR] error opening image "-"

I think I need to make some changes temporary folders so I don’t run out of space, but I’m not sure how to do this - I’m not very experienced with coding.
Any help would be greatly appreciated!!

This looks like a case of running out of space on the /tmp due to the way Unix piping is handled in MRtrix3. Lots of detail on how to handle this on this thread.

Basic summary:

  • clear out any temporary files from the /tmp folder that might have been left around after previous command crashes or interruptions. These start with the prefix mrtrix-tmp-.

  • if that’s not enough, set the TmpFileDir config file option to point to a location with more storage. The current folder might be simplest, which you can set like this:

    TmpFileDir: .
    

Thanks very much for the reply!
I may be looking in the wrong place, but when i look under /mrtrix3/tmp there are no files, only 3 more directories: cmd core and src. So I don’t think it’s due to the temporary files.
Where do I find this config file option? I found a script called config, but it doesn’t have any TmpFileDir lines within it

No, the folder I’m talking about here is the /tmp folder, it’s not within the MRtrix3 folder, but on your system – it’s the default location for temporary files. Have a look with ls /tmp and navigate into it with cd /tmp.

And on the off-chance that this might prove useful to you, we have a tutorial on using the command -line, where the concept of absolute and relative paths is discussed (which should have avoided the confusion about where the folder is…).

Thank you. That tutorial looks very helpful and I will use it for sure. Also, thanks, I’ve cleared out mp /tmp folder but the issue still remains. Could you give me idiot-proof way to set the TmpFileDir config file option to point somewhere else? Completely clueless regarding how to do this…
Thanks!

Try typing this into your terminal:

echo "TmpFileDir: ." > ~/.mrtrix.conf

success! Many thanks.

Hoping to in the future have a more convenient solution for cleaning up old MRtrix3 files; but given systems can also get bloated by non-MRtrix3 content, it’s worthwhile having an understanding of this stuff anyway :+1:

Dear Robert,

I am having the same issue, despite my /tmp file cleared and has 50GB space.

I am suspicious of my temporary files are not storaged in /tmp file, but I am not capable of determining it.

Do you have any idea?

df -h

Filesystem Size Used Avail Use% Mounted on
none 5.9G 4.0K 5.9G 1% /mnt/wsl
none 954G 690G 264G 73% /usr/lib/wsl/drivers
none 5.9G 0 5.9G 0% /usr/lib/modules
none 5.9G 0 5.9G 0% /usr/lib/modules/5.15.146.1-microsoft-standard-WSL2
/dev/sdc 1007G 64G 893G 7% /
none 5.9G 116K 5.9G 1% /mnt/wslg
none 5.9G 0 5.9G 0% /usr/lib/wsl/lib
rootfs 5.9G 1.9M 5.9G 1% /init
none 5.9G 836K 5.9G 1% /run
none 5.9G 0 5.9G 0% /run/lock
none 5.9G 0 5.9G 0% /run/shm
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
none 5.9G 412K 5.9G 1% /mnt/wslg/versions.txt
none 5.9G 412K 5.9G 1% /mnt/wslg/doc
tmpfs 50G 0 50G 0% /tmp
C:\ 954G 690G 264G 73% /mnt/c
snapfuse 128K 128K 0 100% /snap/bare/5
snapfuse 75M 75M 0 100% /snap/core22/1122
snapfuse 74M 74M 0 100% /snap/core22/864
snapfuse 268M 268M 0 100% /snap/firefox/3941
snapfuse 505M 505M 0 100% /snap/gnome-42-2204/172
snapfuse 92M 92M 0 100% /snap/gtk-common-themes/1535
snapfuse 41M 41M 0 100% /snap/snapd/20290
snapfuse 40M 40M 0 100% /snap/snapd/21184
snapfuse 132M 132M 0 100% /snap/ubuntu-desktop-installer/1276
snapfuse 132M 132M 0 100% /snap/ubuntu-desktop-installer/1286

mrview dwi_preproc_unbiased.mif -overlay.load 5tt_nocoreg.mif overlay.colourmap 2 -overlay.load 5tt_coreg.mif -overlay.colourmap 1

mrview: [SYSTEM FATAL CODE: SIGBUS (7)] Bus error: Accessing invalid address (out of storage space?)

Hi @Emre,

I’m a bit confused here, the command you’re having trouble with looks identical to that in your other thread, but the error message in that other thread was a segmentation fault (SIGSEGV), whereas this one is a bus error (SIGBUS). Is this a typo? Or are you genuinely finding that the same command sometimes produces a bus error, and sometimes a segmentation fault? If that’s the case, then that strongly suggests an issue with the operating system and/or drivers – most likely the drivers for the graphics card (assuming you don’t have any other issues with the command-line tools). I’m assuming you’re running on WSL2, it may be worth applying all system updates on the Windows side and all available updates on the Linux side too…

If that doesn’t fix it, please go through the steps I suggested in response to your other thread, and we’ll see if we can figure it out.

All the best,
Donald.

I am trying to fix this issue since last day, I might have updated the error message by trying to fix. I did not notice it is changed untill you pointed it out.

I think current problem is SIGBUS related

btw It is possible that error messages are different is because of that .mif input images are different. I will post the both.

1 minute ago I ran the same code, It gave SIGSEGV error. I posted on topic