<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>989</bug_id>
          
          <creation_ts>2014-03-02 16:50:39 +0100</creation_ts>
          <short_desc>CLProgramTest.programBinariesTest and LowLevelBindingTest.lowLevelVectorAddTest cause SIGSEGV or EXCEPTION_ACCESS_VIOLATION on AMD cards</short_desc>
          <delta_ts>2014-04-13 23:29:53 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jocl</product>
          <component>opencl</component>
          <version>1</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Wade Walker">wwalker3</reporter>
          <assigned_to name="Wade Walker">wwalker3</assigned_to>
          <cc>sgothel</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3817</commentid>
    <comment_count>0</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2014-03-02 16:50:39 +0100</bug_when>
    <thetext>Here are sample stacks from Linux and Windows:

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libamdocl64.so+0x42664e]  clCreateKernelsInProgram+0xae

[error occurred during error reporting (printing native stack), id 0xb]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.jogamp.opencl.llb.impl.CLAbstractImpl.dispatch_clCreateKernelsInProgram0(JILjava/lang/Object;ILjava/lang/Object;IJ)I+0
j  com.jogamp.opencl.llb.impl.CLAbstractImpl.clCreateKernelsInProgram(JILcom/jogamp/common/nio/PointerBuffer;Ljava/nio/IntBuffer;)I+104
j  com.jogamp.opencl.CLProgram.createCLKernels()Ljava/util/Map;+40
j  com.jogamp.opencl.CLProgramTest.programBinariesTest()V+334


Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [amdocl64.dll+0x16f454]
j  com.jogamp.opencl.llb.impl.CLAbstractImpl.clCreateKernelsInProgram(JILcom/jogamp/common/nio/PointerBuffer;Ljava/nio/IntBuffer;)I+104
j  com.jogamp.opencl.CLProgram.createCLKernels()Ljava/util/Map;+40
j  com.jogamp.opencl.CLProgramTest.programBinariesTest()V+327
v  ~StubRoutines::call_stub
V  [jvm.dll+0x1cb0c3]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.jogamp.opencl.llb.impl.CLAbstractImpl.dispatch_clCreateKernelsInProgram0(JILjava/lang/Object;ILjava/lang/Object;IJ)I+0
j  com.jogamp.opencl.llb.impl.CLAbstractImpl.clCreateKernelsInProgram(JILcom/jogamp/common/nio/PointerBuffer;Ljava/nio/IntBuffer;)I+104
j  com.jogamp.opencl.CLProgram.createCLKernels()Ljava/util/Map;+40
j  com.jogamp.opencl.CLProgramTest.programBinariesTest()V+327</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3818</commentid>
    <comment_count>1</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2014-03-02 16:51:43 +0100</bug_when>
    <thetext>Bought a used Radeon HD 5450 at a thrift shop yesterday, will try to duplicate these at home and debug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3836</commentid>
    <comment_count>2</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2014-03-08 17:17:49 +0100</bug_when>
    <thetext>Duplicated these errors on Win 8.1 with Radeon HD 5450, debugging now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3837</commentid>
    <comment_count>3</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2014-03-08 23:13:41 +0100</bug_when>
    <thetext>programBinariesTest() failure was due to AMD drivers crashing in clCreateKernelsInProgram() when the program is not built yet, instead of returning error code CL_INVALID_PROGRAM_EXECUTABLE as they should.

lowLevelVectorAddTest() failure was apparently due to the AMD drivers writing past the end of a direct byte buffer in such a way that it made System.gc() crash when called during teardown (this crash didn&apos;t even dump stack). Making the buffer larger solved the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3838</commentid>
    <comment_count>4</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2014-03-08 23:42:31 +0100</bug_when>
    <thetext>Fixes are at https://github.com/WadeWalker/jocl/tree/bug_989_fix_AMD_driver_crashes, waiting to merge until build server is back up</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3872</commentid>
    <comment_count>5</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2014-04-13 23:10:14 +0200</bug_when>
    <thetext>lowLevelVectorAddTest() still fails on linux-x86_64-amd and win7-x86_32-amd; will try increasing buffer size further and rewinding it between all reuses.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3873</commentid>
    <comment_count>6</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2014-04-13 23:29:53 +0200</bug_when>
    <thetext>That fixed it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>