You are not logged in.

#1 2013-03-30 19:31:54

tim
Member
From: Sweden
Registered: 2006-10-29
Posts: 98

gdb [NOT] broken [SOLVED]

OK now I know this has been talked about in loads of places and supposedly fixed, but I'm getting this error: Could not load shared library symbols for linux-vdso.so.1

I know the bug was even dismissed here as being cosmetic but for me it's not at all cosmetic. I can't debug with gdb at all. Programs just exit so I can't get past this error message.

Any help would be very much appreciated and yes, I'm actually developing cuda code but the problem is with gdb so I'm keeping the discussion about gdb only.

Here is the output if i try to debug anything with gdb

GNU gdb (GDB) 7.5.1
Copyright (C) 2012 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-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /storage/dev/registration/gpuHistogram...done.
(gdb) run
Starting program: /storage/dev/registration/gpuHistogram
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Inferior 1 (process 12987) exited with code 01]

Last edited by tim (2013-04-02 19:30:27)

Offline

#2 2013-03-30 23:32:38

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: gdb [NOT] broken [SOLVED]

tim wrote:

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000

That is your problem. The warning about three vdso is still a non-issue and unrelated here. How are you compiling your binaries? Flags are important.

Offline

#3 2013-03-31 06:04:35

tim
Member
From: Sweden
Registered: 2006-10-29
Posts: 98

Re: gdb [NOT] broken [SOLVED]

I'm compilng with

nvcc -g -pg -G --ptxas-options=-v -arch sm_30 -o executableName sourceFileNames.cu -lm

However I've tried to compile with all sorts of different combinations and I still see the same problems.

Also I thought that the address in the error is the address that the virtual library linux-vdso.so.1 is loaded and since it is NOT loaded then there are no symbols. I guess that's not correct?

Offline

#4 2013-03-31 06:51:21

tim
Member
From: Sweden
Registered: 2006-10-29
Posts: 98

Re: gdb [NOT] broken [SOLVED]

So here is a more complete listing of what I'm doing:

tim@gpumonster registration]$ make
nvcc -pg -g -G --ptxas-options=-v -gencode arch=compute_30,code=sm_30 -o gpuHistogram gpuHistogram.cu gpuHistogramTest.cu -lm
ptxas info    : removed because its not important
[tim@gpumonster registration]$ optirun cuda-gdb gpuHistogram
NVIDIA (R) CUDA Debugger
5.0 release
Portions Copyright (C) 2007-2012 NVIDIA Corporation
GNU gdb (GDB) 7.2
Copyright (C) 2010 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-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /storage/dev/registration/gpuHistogram...done.
(cuda-gdb) break main
Breakpoint 1 at 0x404533: file gpuHistogramTest.cu, line 690.
(cuda-gdb) run
Starting program: /storage/dev/registration/gpuHistogram
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]

Breakpoint 1, main () at gpuHistogramTest.cu:690
690       testSliceSelection();
(cuda-gdb) step
testSliceSelection () at gpuHistogramTest.cu:541
541       cudaError_t error = cudaGetLastError();
(cuda-gdb)
Cannot remove breakpoints because program is no longer writable.
Further execution is probably impossible.
542       int devID = 0;
(cuda-gdb)
fatal:  All CUDA devices are used for display and cannot be used while debugging. (error code = 24)
(cuda-gdb)

I have no idea why that last error is shown since the gpu is NOT running a display

Offline

#5 2013-04-01 21:01:34

tim
Member
From: Sweden
Registered: 2006-10-29
Posts: 98

Re: gdb [NOT] broken [SOLVED]

So in fact the problem is that optirun doesn't play nice with gdb/cuda-gdb.

For anyone that is interested, cuda-gdb (& nsight) works without optirun. You just have to ensure the device nodes are created for the gpu & the gpu is on (bumblebee & bbswitch etc).

Offline

Board footer

Powered by FluxBB