[Mrtrix-discussion] mrview segmentation fault

Donald Tournier d.tournier at brain.org.au
Sun Nov 30 19:26:41 PST 2008


Hi Kerstin,

The problem seems to be with your OpenGL setup - i.e. related to your
graphics card, rather than MRtrix as such. The relevant error message
is:
NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).
NVIDIA: Direct rendering failed; attempting indirect rendering.

There is a permissions problem on the nvidiactl device, which is what
your system uses to provide access to the graphics card (presumably an
NVidia card). This means that it fails to use the graphics card
directly, and so causes the system to switch to software-only
rendering (indirect rendering). Presumably, some of the graphics
processing is a little too much for the software renderer, and causes
the crash.

I'm not too sure what the solution would be, but the first thing to
check are the permissions on the /dev/ndiviactl device. On my system,
this is what I have:

$ ls -l /dev/nvidiactl
crw-rw-rw- 1 root root 195, 255 2008-12-01 09:59 /dev/nvidiactl

This basically says that I have read-write permissions to this device
for everyone. You might find that the first entry says: crw------- or
something like that, which would indicate that only root has
permissions to access the device. If so, this is the cause of the
problem. This following command will set the permissions to the same
as I have. Try it and see if it sort the problem out:

$ sudo chmod a+rw /dev/nvidiactl

Let me know if it worked. If not, send me the full output of the
"glxinfo" command.
Cheers,

Donald.


On Mon, Dec 1, 2008 at 1:15 PM, Kerstin Pannek <k.pannek1 at uq.edu.au> wrote:
> Hi Kerstin
> I can open all csd.mif files as regular images.
> I recompiled the debugging version of MRtrix. I have attached the output of
> running mrview -debug and in gdb as text files to this email.
> Interestingly, I just discovered that orientation plots that worked this
> morning work only occasionally now...
> Thanks for your help
> Kerstin
>
>
> Donald Tournier wrote:
>>
>> Hi Kerstin,
>>
>> This is really strange. Can you open the csd.mif file as a regular
>> image (i.e. using the File->Open dialog)? If you can, then there is
>> probably something else going on. Someone else had a very similar
>> issue when running MRtrix within a virtual PC (i.e. an emulator),
>> which I guess was related to the poor graphics card support and/or the
>> limited memory available. In any case, it sounded more like a
>> limitation of the system rather than the software itself. Things might
>> be different in your case though, since you are able to display some,
>> but not all your csd.mif files...
>>
>> Here's a couple of things you can do to try to narrow down the problem:
>>
>> 1. run mrview from the command line with the -debug option, and repeat
>> the steps taken to get it to crash. Then copy/paste and send me the
>> command-line output.
>>
>> 2. run mrview within the debugger:
>> $ gdb mrview
>> followed by "run" at the gdb prompt"
>> (gdb) run
>>
>> then load your csd.mif file to get mrview to crash, at which point the
>> debugger will print out a message about the error. You can send me a
>> full diagnostic by typing "bt full" at the prompt and copy/pasting the
>> output:
>> (gdb) bt full
>>
>> If you have the time, BEFORE doing the steps above, you could
>> recompile a debugging version of MRtrix. This will make the diagnostic
>> information produced by "bt full" much more comprehensive. To do this,
>> use these commands (from the MRtrix installation folder):
>> $ ./build clean
>> $ ./build -debug
>> And proceed as per the installation instructions.
>>
>> Thanks!
>>
>> Donald.
>>
>>
>> On Mon, Dec 1, 2008 at 11:23 AM, Kerstin Pannek <k.pannek1 at uq.edu.au>
>> wrote:
>>
>>>
>>> Hi!
>>> I have a problem looking at the orientation plots of several datasets.
>>> mrview crashes on opening csd.mif (view->sidebar->orientation
>>> plot->browse->open --- segmentation fault). This happens only for a few
>>> datasets. All datasets are processed the same way. Deleting the file and
>>> rerunning csdeconv doesn't solve the problem. Any ideas?
>>> Thanks
>>> Kerstin
>>> _______________________________________________
>>> Mrtrix-discussion mailing list
>>> Mrtrix-discussion at www.nitrc.org
>>> http://www.nitrc.org/mailman/listinfo/mrtrix-discussion
>>>
>>>
>>
>>
>>
>>
>
>
> sneed:mrtrix$ mrview tensor/fa.mif -debug
> mrview [INFO]: opening image "tensor/fa.mif"...
> mrview [DEBUG]: reading key/value file "tensor/fa.mif"...
> mrview [DEBUG]: sanitising transformation matrix...
> mrview [DEBUG]: preparing file "tensor/fa.mif"
> mrview [DEBUG]: setting up image "tensor/fa.mif"...
> mrview [DEBUG]: sanitising transformation matrix...
> mrview [DEBUG]: setting up data increments for "tensor/fa.mif"...
> mrview [DEBUG]: data increments initialised with start = 99, stride = [ -1
> 100 10000 ]
> NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).
> NVIDIA: Direct rendering failed; attempting indirect rendering.
> mrview [DEBUG]: mapping image "tensor/fa.mif"...
> mrview [DEBUG]: file "tensor/fa.mif" mapped at 0x7fbab4150000, size 2400272
> (read-only)
> mrview [DEBUG]: data mapper for image "tensor/fa.mif" mapped with segment
> size = 600000 (optimised)
> NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).
> NVIDIA: Direct rendering failed; attempting indirect rendering.
> mrview [INFO]: DWI renderer successfully initialised
> mrview [INFO]: GL_RENDERER   = GeForce 7100 GS/PCI/SSE2
> mrview [INFO]: GL_VERSION    = 2.1.0 NVIDIA 96.43.05
> mrview [INFO]: GL_VENDOR     = NVIDIA Corporation
> mrview [DEBUG]: preparing file
> "/giglo/sneed-01/kerstin/data/EKBERG/DTI_b3000/mrtrix/csd/response.txt"
> mrview [INFO]: opening image
> "/giglo/sneed-01/kerstin/data/EKBERG/DTI_b3000/mrtrix/csd/csd.mif"...
> mrview [DEBUG]: reading key/value file
> "/giglo/sneed-01/kerstin/data/EKBERG/DTI_b3000/mrtrix/csd/csd.mif"...
> mrview [DEBUG]: sanitising transformation matrix...
> mrview [DEBUG]: preparing file
> "/giglo/sneed-01/kerstin/data/EKBERG/DTI_b3000/mrtrix/csd/csd.mif"
> mrview [DEBUG]: setting up image
> "/giglo/sneed-01/kerstin/data/EKBERG/DTI_b3000/mrtrix/csd/csd.mif"...
> mrview [DEBUG]: sanitising transformation matrix...
> mrview [DEBUG]: setting up data increments for
> "/giglo/sneed-01/kerstin/data/EKBERG/DTI_b3000/mrtrix/csd/csd.mif"...
> mrview [DEBUG]: data increments initialised with start = 0, stride = [ 45
> 4500 450000 1 ]
> mrview [DEBUG]: mapping image
> "/giglo/sneed-01/kerstin/data/EKBERG/DTI_b3000/mrtrix/csd/csd.mif"...
> mrview [DEBUG]: file
> "/giglo/sneed-01/kerstin/data/EKBERG/DTI_b3000/mrtrix/csd/csd.mif" mapped at
> 0x7fbaabaf8000, size 108000282 (read-only)
> mrview [DEBUG]: data mapper for image
> "/giglo/sneed-01/kerstin/data/EKBERG/DTI_b3000/mrtrix/csd/csd.mif" mapped
> with segment size = 27000000 (optimised)
> Segmentation fault
>
>
> sneed:mrtrix$ gdb mrview
> GNU gdb 6.8-debian
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu"...
> (gdb) run
> Starting program: /data/home/kerstin/bin/mrtrix/bin/mrview
> [Thread debugging using libthread_db enabled]
> [New Thread 0x7f4bb4fe1730 (LWP 25807)]
> NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).
> NVIDIA: Direct rendering failed; attempting indirect rendering.
> NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).
> NVIDIA: Direct rendering failed; attempting indirect rendering.
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7f4bb4fe1730 (LWP 25807)]
> 0x000000000048322e in MR::Image::Mapper::re (this=0xaf6c60,
> offset=18445767945754771456) at lib/image/mapper.h:251
> 251           if (optimised) return (((float32*) segment[0])[offset]);
> (gdb) bt full
> #0  0x000000000048322e in MR::Image::Mapper::re (this=Cannot access memory
> at address 0x7fffbd1cfdb8
> ) at lib/image/mapper.h:251
>        nseg = Cannot access memory at address 0x7fffbd1cfdc8
> (gdb)
>
>
>



-- 
Jacques-Donald Tournier (PhD)
Brain Research Institute, Melbourne, Australia
Tel: +61 (0)3 9496 4078


More information about the Mrtrix-discussion mailing list