weird segfault with cuda-gdb

Hi,

i am getting some weird bug with cuda-gdb inside libcuda.so.1 when i call cudaMalloc:

printf("calling cuda Malloc with size=%d\n",gi->gpu_mem_size);

	cutilSafeCall(cudaMalloc((void**) &d_ptr,gi->gpu_mem_size));

if i run with cuda-gdb i get the SIGSEGV , if i run without it i do not.

node1 tmp # cuda-gdb ./nslave 

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 "/lib/libthread_db.so.1".

(cuda-gdb) break load_inputs_onto_cppn

Breakpoint 1 at 0x41fb51: file gpu.cu, line 465.

(cuda-gdb) run 1

Starting program: /tmp/nslave 1

Breakpoint 1 at 0x41fb41: file /tmp/tmpxft_0000165b_00000000-1_gpu.cudafe1.stub.c, line 3.

Breakpoint 1 at 0x41fb51: file gpu.cu, line 465.

[Thread debugging using libthread_db enabled]

[New process 3535]

slave_id=1

slave 1: doing slave_init()

gi=-279879680

[New Thread 140041509512960 (LWP 3535)]

maxgflops device id=0

calling cuda Malloc with size=33554432

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 140041509512960 (LWP 3535)]

0x00007f5df188c201 in ?? () from /usr/lib/libcuda.so.1

(cuda-gdb) backtrace

#0  0x00007f5df188c201 in ?? () from /usr/lib/libcuda.so.1

#1  0x00007f5df1893d0f in ?? () from /usr/lib/libcuda.so.1

#2  0x00007f5df189412b in ?? () from /usr/lib/libcuda.so.1

#3  0x00007f5df18944b1 in ?? () from /usr/lib/libcuda.so.1

#4  0x00007f5df18b8ebd in ?? () from /usr/lib/libcuda.so.1

#5  0x00007f5df188988a in ?? () from /usr/lib/libcuda.so.1

#6  0x00007f5df1875aad in ?? () from /usr/lib/libcuda.so.1

#7  0x00007f5df1907b2c in ?? () from /usr/lib/libcuda.so.1

#8  0x00007f5df1131a54 in ?? () from /usr/local/cuda/lib64/libcudart.so.3

#9  0x00007f5df11355da in ?? () from /usr/local/cuda/lib64/libcudart.so.3

#10 0x00007f5df111a115 in cudaMalloc () from /usr/local/cuda/lib64/libcudart.so.3

#11 0x000000000042e280 in gpu_allocate_mem (gi=0x7f5def516000) at gpu.cu:630

#12 0x0000000000405d62 in allocate_gpu_space (gi=0x7f5def516000) at neat-common.c:410

#13 0x000000000040e953 in slave_init () at neat-slave.c:2004

#14 0x000000000040ec39 in stand_alone_slave (slave_id=1 '

node1 tmp # cuda-gdb ./nslave

NVIDIA ® CUDA Debugger

BETA release

Portions Copyright © 2008,2009 NVIDIA Corporation

GNU gdb 6.6

Copyright © 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 “/lib/libthread_db.so.1”.

(cuda-gdb) break load_inputs_onto_cppn

Breakpoint 1 at 0x41fb51: file gpu.cu, line 465.

(cuda-gdb) run 1

Starting program: /tmp/nslave 1

Breakpoint 1 at 0x41fb41: file /tmp/tmpxft_0000165b_00000000-1_gpu.cudafe1.stub.c, line 3.

Breakpoint 1 at 0x41fb51: file gpu.cu, line 465.

[Thread debugging using libthread_db enabled]

[New process 3535]

slave_id=1

slave 1: doing slave_init()

gi=-279879680

[New Thread 140041509512960 (LWP 3535)]

maxgflops device id=0

calling cuda Malloc with size=33554432

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 140041509512960 (LWP 3535)]

0x00007f5df188c201 in ?? () from /usr/lib/libcuda.so.1

(cuda-gdb) backtrace

#0 0x00007f5df188c201 in ?? () from /usr/lib/libcuda.so.1

#1 0x00007f5df1893d0f in ?? () from /usr/lib/libcuda.so.1

#2 0x00007f5df189412b in ?? () from /usr/lib/libcuda.so.1

#3 0x00007f5df18944b1 in ?? () from /usr/lib/libcuda.so.1

#4 0x00007f5df18b8ebd in ?? () from /usr/lib/libcuda.so.1

#5 0x00007f5df188988a in ?? () from /usr/lib/libcuda.so.1

#6 0x00007f5df1875aad in ?? () from /usr/lib/libcuda.so.1

#7 0x00007f5df1907b2c in ?? () from /usr/lib/libcuda.so.1

#8 0x00007f5df1131a54 in ?? () from /usr/local/cuda/lib64/libcudart.so.3

#9 0x00007f5df11355da in ?? () from /usr/local/cuda/lib64/libcudart.so.3

#10 0x00007f5df111a115 in cudaMalloc () from /usr/local/cuda/lib64/libcudart.so.3

#11 0x000000000042e280 in gpu_allocate_mem (gi=0x7f5def516000) at gpu.cu:630

#12 0x0000000000405d62 in allocate_gpu_space (gi=0x7f5def516000) at neat-common.c:410

#13 0x000000000040e953 in slave_init () at neat-slave.c:2004

#14 0x000000000040ec39 in stand_alone_slave (slave_id=1 ‘\001’) at neat-slave.c:2087

#15 0x000000000040263a in main (argc=2, argv=0x7ffffc6ebae8) at nslave.c:18

(cuda-gdb)

01') at neat-slave.c:2087

#15 0x000000000040263a in main (argc=2, argv=0x7ffffc6ebae8) at nslave.c:18

(cuda-gdb)

This is on the initial stages of the program, i don’t think i have any bugs before that to corrupt cuda libraries. any suggestions where to look what is hapening? (i use cuda3.0 beta)