cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Linuxhippy
Adept I

SIGSEV in libamdocl64.so when using fine grain SVM buffers

Hi,

I am currently trying to experiment with fine grain SVM buffers, however I experience crashes in libamdocl64.so:

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 0x7ffff208b700 (LWP 7997)]

0x00007ffff330425d in ?? () from /lib64/libamdocl64.so

Missing separate debuginfos, use: debuginfo-install libX11-1.6.0-2.1.el7.x86_64 libXau-1.0.8-2.1.el7.x86_64 libXext-1.3.2-2.1.el7.x86_64 libXinerama-1.1.3-2.1.el7.x86_64 libxcb-1.9-5.el7.x86_64 mesa-libGL-10.2.7-5.20140910.el7.x86_64

(gdb) bt

#0  0x00007ffff330425d in ?? () from /lib64/libamdocl64.so

#1  0x00007ffff330308a in ?? () from /lib64/libamdocl64.so

#2  0x00007ffff3303276 in ?? () from /lib64/libamdocl64.so

#3  0x00007ffff3337cd0 in ?? () from /lib64/libamdocl64.so

#4  0x00007ffff3360e49 in ?? () from /lib64/libamdocl64.so

#5  0x00007ffff3361947 in ?? () from /lib64/libamdocl64.so

#6  0x00007ffff32fe35d in ?? () from /lib64/libamdocl64.so

#7  0x00007ffff32fe6fa in ?? () from /lib64/libamdocl64.so

#8  0x00007ffff329f08f in ?? () from /lib64/libamdocl64.so

#9  0x00007ffff330cd3c in ?? () from /lib64/libamdocl64.so

#10 0x00007ffff6ddfdf5 in start_thread (arg=0x7ffff208b700) at pthread_create.c:308

#11 0x00007ffff70ea1ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

I am using the latest stable Catalyst-Version on a Kaveri-based system running CentOS-7, C-Code as well as the empty kernel are attached.

I would be greateful for any idea what might be going wrong here.

Thank you in advance & br, Clemens

PS: The driver used was:

Platform Version: OpenCL 2.0 AMD-APP (1800,5)

Fglrx 15.20.3

0 Likes
1 Solution
dipak
Big Boss

In order to use OpenCL 2.0 features like SVM, you need to build/compile your kernel code for OpenCL 2.0 using build option "-cl-std=CL2.0" (clBuildProgram). Please try this.

View solution in original post

0 Likes
3 Replies
dipak
Big Boss

In order to use OpenCL 2.0 features like SVM, you need to build/compile your kernel code for OpenCL 2.0 using build option "-cl-std=CL2.0" (clBuildProgram). Please try this.

0 Likes

Hi dipak,

Thanks for your reply, indeed the missing build option "-cl-std=CL2.0" was the only issue, now the code is working as expected.

So the only issue left is the non-critical driver crash with SIGSEV when the build-option is missing (in my opinion it should issue a warning instead), it would be great if you could forward this to the driver developers so it can be fixed in a future driver release.

Thanks & br, Clemens

0 Likes

Actually one can pass SVM buffer or any other device buffer to the same kernel code. It depends on the host-side code especially kernel compilation/building and argument setting. In OpenCL 1.x, there is not concept of SVM, so, kernel expects normal device memory for each pointer argument. That's why, kernel code built for CL1.2 can treat the pointers completely different than kernel code build for CL2.0 with SVM support. As a result, if you pass a SVM pointer to a kernel that expects a device memory pointer, it can trigger a runtime pointer access violation problem. It is programmer's responsibility to pass the valid pointers to the kernel.

Regards,

0 Likes