Bug 102179 - clEnqueueReadBuffer VM_PAGE FAULT
Summary: clEnqueueReadBuffer VM_PAGE FAULT
Status: NEW
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: 17.2
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 99553
  Show dependency treegraph
 
Reported: 2017-08-12 07:46 UTC by Janpieter Sollie
Modified: 2017-08-15 13:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
clinfo output (7.73 KB, text/plain)
2017-08-12 07:46 UTC, Janpieter Sollie
Details
gdb backtrace (9.61 KB, text/plain)
2017-08-12 07:48 UTC, Janpieter Sollie
Details
dmesg output reporting page fault (6.92 KB, text/plain)
2017-08-12 07:50 UTC, Janpieter Sollie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Janpieter Sollie 2017-08-12 07:46:53 UTC
Created attachment 133450 [details]
clinfo output

I'm not sure whether this is a mesa bug, so if it's not: I'm sorry
Anyway, the problem:
I have 2 GCN cards in my system, a 7700 and a R9 nano
I'm using both with amdgpu on linux-4.13.0-r4
clinfo attached.
My program causes a GPU fault on the 7700 when reading from a buffer.
dmesg part attached
this problem does not occur on the CPU or the R9 nano card
GDB backtrace of thread calling the clEnqueueReadBuffer attached

If this is a known bug, or not yours, I'm sorry
Comment 1 Janpieter Sollie 2017-08-12 07:48:04 UTC
Created attachment 133451 [details]
gdb backtrace
Comment 2 Janpieter Sollie 2017-08-12 07:50:03 UTC
Created attachment 133452 [details]
dmesg output reporting page fault
Comment 3 Janpieter Sollie 2017-08-12 14:40:54 UTC
interesting note:
the following code allows me to execute the clEnqueueReadBuffer:
//set kernel arguments, limited to 1
    clSetKernelArg ( devdb[nr_of_devices].kernel, 0, sizeof(devdb[nr_of_devices].output), &devdb[nr_of_devices].output);

//run kernel
clEnqueueNDRangeKernel(..)
//read buffer
clEnqueueReadBuffer (((device*)device_obj)->command_queue, ((device*)device_obj)->output, CL_FALSE, 0, 16, ((device*)device_obj)->host_output, 0, NULL, NULL);

while it does not work with any 2nd, 3rd, ... kernel parameter, eg:
clSetKernelArg ( devdb[nr_of_devices].kernel, 0, sizeof(devdb[nr_of_devices].output), &devdb[nr_of_devices].output);
clSetKernelArg ( devdb[nr_of_devices].kernel, 1, sizeof(devdb[nr_of_devices].output2), &devdb[nr_of_devices].output2);

hangs at reading output. but no warning of VM_PAGE_FAULTS, these occur when output is the last argument

because I think this is a blocker for most OpenCL users to get their data back, I'm increasing it to major (also, this cannot be analyzed easily: every time the call hangs, I have to reboot my pc, as the process becomes a zombie)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.