cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

rollyng
Journeyman III

Multi GPU gdb segmentation fault

Multi GPU compile+run SDK examples fine but debug causes segment fault

Hi all,

I am using ubuntu 10.10 with Eclipse 3.5 + CDT 6.0 as IDE. I have installed 11.3 driver and SDK 2.4 and have HD6990. It compiled and ran SDK examples without problem and I can see the console output which is fine.

However, once I set a break point in the .cpp file and run debug with standard gdb, it results in segment fault and fails to complete execution? It said " Stopped due to shared library event "

Has anyone tried such IDE config and help to solve the problem?

Thanks!

Here are the outputs from the debug console:

Reading symbols from /home/rolly/workspace/myCLinfo/Debug/myCLinfo...done.

Stopped due to shared library event
[Thread debugging using libthread_db enabled]
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event

I believe it may due to that gdb fails to find the shared lib?

So I did the following:

rolly@rolly-X8DTG-QF:~/workspace/myCLinfo/Debug$ ldd myCLinfo
    linux-vdso.so.1 =>  (0x00007fffab98e000)
    libOpenCL.so.1 => /usr/lib/libOpenCL.so.1 (0x00007f4047507000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f4047201000)
    libm.so.6 => /lib/libm.so.6 (0x00007f4046f7d000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f4046d67000)
    libc.so.6 => /lib/libc.so.6 (0x00007f40469e4000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00007f40467c6000)
    libdl.so.2 => /lib/libdl.so.2 (0x00007f40465c2000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f404772b000)

How can I add these to gdb in Eclipse? Thanks!

OK, let me go back to gdb in command prompt:

rolly@rolly-X8DTG-QF:~$ cd /home/rolly/workspace/myCLinfo/Debug
rolly@rolly-X8DTG-QF:~/workspace/myCLinfo/Debug$ gdb ./myCLinfo
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
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".
For bug reporting instructions, please see:
...
Reading symbols from /home/rolly/workspace/myCLinfo/Debug/myCLinfo...done.
(gdb) r --debug
Starting program: /home/rolly/workspace/myCLinfo/Debug/myCLinfo --debug
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff41d5d60 in ?? () from /usr/lib/fglrx/libaticaldd.so
(gdb) c
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.

Any hint?

0 Likes
21 Replies