[Bug 217635] lang/beignet: crash in get_program_global_data() after 1.3.0 update

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Mar 8 08:38:42 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217635

            Bug ID: 217635
           Summary: lang/beignet: crash in get_program_global_data() after
                    1.3.0 update
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: regression
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: x11 at FreeBSD.org
          Reporter: jbeich at FreeBSD.org
          Assignee: x11 at FreeBSD.org
             Flags: maintainer-feedback?(x11 at FreeBSD.org)

Created attachment 180620
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=180620&action=edit
workaround

I'm using drm-next (i915kms, Skylake GT2) and Beignet 1.3.0 started to crash
unless built with ASan. Looking in src/cl_program.c suggests
get_program_global_data() shouldn't be called with OpenCL 1.2 but 2.0 is
disabled by default, so something is wrong.

https://cgit.freedesktop.org/beignet/commit/?id=295b1cb6d1ac

$ clinfo
Number of platforms                               1
  Platform Name                                   Intel Gen OCL Driver
  Platform Vendor                                 Intel
  Platform Version                                OpenCL 1.2 beignet 1.3
  Platform Profile                                FULL_PROFILE
  Platform Extensions                            
cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics
cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_image2d_from_buffer
cl_khr_depth_images cl_khr_spir cl_khr_icd cl_intel_accelerator
cl_intel_subgroups cl_intel_subgroups_short
  Platform Extensions function suffix             Intel
Segmentation fault

Process 90021 stopped
* thread #1, stop reason = signal SIGSEGV: invalid address (fault address:
0x20)
    frame #0:
libdrm_intel.so.1`drm_intel_bo_set_softpin_offset(bo=0x0000000000000000,
offset=34486951936) at intel_bufmgr.c:266
   263  int
   264  drm_intel_bo_set_softpin_offset(drm_intel_bo *bo, uint64_t offset)
   265  {
-> 266          if (bo->bufmgr->bo_set_softpin_offset)
   267                  return bo->bufmgr->bo_set_softpin_offset(bo, offset);
   268
   269          return -ENODEV;
(lldb) bt
* thread #1, stop reason = signal SIGSEGV: invalid address (fault address:
0x20)
  * frame #0:
libdrm_intel.so.1`drm_intel_bo_set_softpin_offset(bo=0x0000000000000000,
offset=34486951936) at intel_bufmgr.c:266
    frame #1: libcl.so`get_program_global_data(prog=0x000000080126c1c0) at
cl_program.c:227
    frame #2: libcl.so`cl_program_build(p=0x000000080126c1c0, options="") at
cl_program.c:677
    frame #3: libcl.so`clBuildProgram(program=0x000000080126c1c0,
num_devices=1, device_list=0x00007fffffffe1e0, options="",
pfn_notify=0x0000000000000000, user_data=0x0000000000000000) at cl_api.c:835
    frame #4: libcl.so`cl_self_test(device=0x000000080168a2a0,
atomic_in_l3_flag=SELF_TEST_PASS) at cl_device_id.c:852
    frame #5: libcl.so`cl_get_device_ids(platform=0x00000008016863d8,
device_type=4294967295, num_entries=0, devices=0x0000000000000000,
num_devices=0x0000000801300d10) at cl_device_id.c:907
    frame #6: libcl.so`clGetDeviceIDs(platform=0x00000008016863d8,
device_type=4294967295, num_entries=0, devices=0x0000000000000000,
num_devices=0x0000000801300d10) at cl_api_device_id.c:43
    frame #7: libOpenCL.so.1`clGetDeviceIDs(platform=0x00000008016863d8,
device_type=4294967295, num_entries=0, devices=0x0000000000000000,
num_devices=0x0000000801300d10) at ocl_icd_loader_gen.c:58
    frame #8: clinfo`printPlatformInfo(p=0) at clinfo.c:459
    frame #9: clinfo`main(argc=1, argv=0x00007fffffffe448) at clinfo.c:2676
    frame #10: clinfo`_start(ap=<unavailable>, cleanup=<unavailable>) at
crt1.c:72
(lldb) f 1
frame #1: libcl.so`get_program_global_data(prog=0x000000080126c1c0) at
cl_program.c:227
   224    interp_program_get_global_constant_data(prog->opaque, (char*)p);
   225
   226    prog->global_data = cl_buffer_alloc_userptr(bufmgr, "program global
data", p, alignedSz, 0);
-> 227    cl_buffer_set_softpin_offset(prog->global_data, (size_t)p);
   228    cl_buffer_set_bo_use_full_range(prog->global_data, 1);
   229
   230    uint32_t reloc_count =
interp_program_get_global_reloc_count(prog->opaque);

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-x11 mailing list