cuda-gdb segfaults on setting break, linux64, 3.0b

Just a curious thing I don’t see anyone else having trouble with, so placing it here just to see.

I’ve installed 195.17, and the 3.0 beta, and everything looks good. I’m trying to run through the gdb walkthrough, so I made the bitreverse program, compiled it with “nvcc -g -G -o bitreverse bitreverse.cu”,

and run gdb…

[vputz@gyges bitreverse]$ cuda-gdb bitreverse

NVIDIA (R) CUDA Debugger

BETA release

Portions Copyright (C) 2008,2009 NVIDIA Corporation

GNU gdb 6.6

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "x86_64-unknown-linux-gnu"...

Using host libthread_db library "/lib64/libthread_db.so.1".

(cuda-gdb) break main

Segmentation fault (core dumped)

[vputz@gyges bitreverse]$

Oddly, I can RUN the program just fine if I “cuda-gdb bitreverse” and just type “run”. But obviously something is wrong. I can even cause it to fail faster by trying to load all symbols early…

[vputz@gyges bitreverse]$ cuda-gdb --readnow bitreverse

NVIDIA (R) CUDA Debugger

BETA release

Portions Copyright (C) 2008,2009 NVIDIA Corporation

GNU gdb 6.6

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "x86_64-unknown-linux-gnu"...

Segmentation fault (core dumped)

[vputz@gyges bitreverse]$

This is a FC12 system with a GTX 295 and a Tesla C1060. One possible issue is gcc 4.4.2, but it’s run everything else just fine. I tried looking for cuda-gdb sources, but no luck. Also, some programs run differently under cuda-gdb than by themselves.

Any suggestions?

This is a dumb question, but you are doing this on a non-display device? cuda-gdb won’t work on the display device (the display driver kills it almost immediately). I used compute exclusivity to get on on a non-display device.

On Ubuntu 9.04 I am pretty sure I got it working ok (right now I am not near a 195 driver box to check it, sorry).

Not a dumb question at all-- but in this case it’s a headless server with no X running at all (I’m ssh-ing in). Cuda-gdb runs fine and the programs run–they just do strange things. Perhaps I should play with exclusivity settings to make sure they are set, but I would think it wouldn’t be a problem.

It might be 4.4 related–are you trying to compile your apps with 4.4 instead of 4.3?

I sure was. Installing compat-gcc34 and using the “–compiler-bindir” and symlink trick, I was able to compile with gcc 3.4 and was then able to set breakpoints, and work through the tutorial. One problem I do have is that my program runs differently under cuda-gdb than outside it, which is quite a puzzle; I need to look more carefully at the known issues to see if we’re falling under that.

I am experiencing similar issues. I am running Ubuntu 9.10, and compiling my CUDA apps using the Ubuntu 4.3.4-5ubuntu1 version of the gcc/g++ and the CUDA 3.0 beta with the 195.17 driver. Whenever I link cublas to a CUDA executable it will segfault when running under cuda-gdb, typically at the first cudaMalloc(). I can reproduce this on my system by adding “USECUBLAS := 1” to the matrixMul example. Not linking CUBLAS is not an option as my application relies on both custom kernels and cublas calls. Is there any compatibility information which gcc versions work with which cuda/driver versions.

We have similar situation here, similar setup (Ubuntu 9.10, X64, Tesla C1060, gcc 4.3.4-5ubuntu1, Cuda Beta 3.0, drivers 195.17) we are not able to debug our programs, we just even made a dummy program and cuda_gdb stops with a SIGBUS message at moment when cudaMalloc is being called… I tried cuda_gdb with version 2.3 and it worked as expected