Possible bug when using integrated graphics

Hi there

I have a set of kernels that do some image operations.
They all run fine on several gpu’s and cpu’s but for some reason when using a gpu of the intel platform that’s integrated in the cpu it just plain crashes my whole java vm.

The source of the problem seems to be coming from inside of jocl, when calling Delete in clBuildProgram.
I will post the full stack trace at the end of this post so you can have a look yourself.

Maybe it’s possible that one of the pointer has already been destroyed and can’t be used again or maybe it just wasn’t renewed. I don’t know what exactly is going on ofcourse inside of the function.

The hardware:

  • i7 3770 @ 3,40 Ghz
  • integrated graphics: Intel HD Graphics 4000

The driver:

Here is the full crash log:

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fee906fe6a, pid=1264, tid=2992
#
# JRE version: 6.0_27-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.2-b06 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [igdfcl64.dll+0x91fe6a]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x00000000005cd800):  JavaThread "main" [_thread_in_native, id=2992, stack(0x00000000026d0000,0x00000000027d0000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x0000000000000040

Registers:
RAX=0x0000000000000000, RBX=0x0000000000000007, RCX=0x0000000000000000, RDX=0x00000000027c8810
RSP=0x00000000027c8758, RBP=0x0000000000000007, RSI=0x00000000027c87e8, RDI=0x00000000027c8820
R8 =0x0000000000000000, R9 =0x00000000027c8bb0, R10=0x0000000000000010, R11=0x00000000027c87d8
R12=0x0000000017bd9470, R13=0x0000000017a98090, R14=0x00000000027ccad0, R15=0x0000000000000000
RIP=0x000007fee906fe6a, EFLAGS=0x0000000000010202

Top of Stack: (sp=0x00000000027c8758)
0x00000000027c8758:   000007fee877acaa 0000000000000000
0x00000000027c8768:   00000000027c8810 00000000027c87f8
0x00000000027c8778:   17aeb5f000000009 17aa9c5000000000
0x00000000027c8788:   0000000000000000 00000000027c8910
0x00000000027c8798:   00000000027c8910 00000000027c8914
0x00000000027c87a8:   000007fee892448e 0000000018802698
0x00000000027c87b8:   000007fee8b639fc 0000000000000000
0x00000000027c87c8:   000007fe00000004 0000000000000000
0x00000000027c87d8:   000007fe00000005 0000000000000000
0x00000000027c87e8:   00000000027c87d8 00000000027c88a0
0x00000000027c87f8:   000007fee8797dd3 00000000183364d0
0x00000000027c8808:   0000000000000000 000007fe00000005
0x00000000027c8818:   0000000000000000 00000000027c8db0
0x00000000027c8828:   000007fee8797d9e 0000000018802698
0x00000000027c8838:   fffffffffffffffe 0000000000000000
0x00000000027c8848:   00000000027c8930 00000000027c8a20 

Instructions: (pc=0x000007fee906fe6a)
0x000007fee906fe4a:   8b 4c 24 30 e8 cd dd 8d ff 48 8b c8 e8 35 d8 23
0x000007fee906fe5a:   00 48 83 c4 28 c3 48 89 4c 24 08 48 8b 44 24 08
0x000007fee906fe6a:   48 8b 40 40 c3 cc 48 89 54 24 10 48 89 4c 24 08
0x000007fee906fe7a:   48 83 ec 28 48 8b 54 24 38 48 8b 4c 24 30 e8 e3 


Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x0000000000000007 is an unknown value
RCX=0x0000000000000000 is an unknown value
RDX=0x00000000027c8810 is pointing into the stack for thread: 0x00000000005cd800
RSP=0x00000000027c8758 is pointing into the stack for thread: 0x00000000005cd800
RBP=0x0000000000000007 is an unknown value
RSI=0x00000000027c87e8 is pointing into the stack for thread: 0x00000000005cd800
RDI=0x00000000027c8820 is pointing into the stack for thread: 0x00000000005cd800
R8 =0x0000000000000000 is an unknown value
R9 =0x00000000027c8bb0 is pointing into the stack for thread: 0x00000000005cd800
R10=0x0000000000000010 is an unknown value
R11=0x00000000027c87d8 is pointing into the stack for thread: 0x00000000005cd800
R12=0x0000000017bd9470 is an unknown value
R13=0x0000000017a98090 is an unknown value
R14=0x00000000027ccad0 is pointing into the stack for thread: 0x00000000005cd800
R15=0x0000000000000000 is an unknown value


Stack: [0x00000000026d0000,0x00000000027d0000],  sp=0x00000000027c8758,  free space=993k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [igdfcl64.dll+0x91fe6a]  Delete+0x91edfa

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.jocl.CL.clBuildProgramNative(Lorg/jocl/cl_program;I[Lorg/jocl/cl_device_id;Ljava/lang/String;Lorg/jocl/BuildProgramFunction;Ljava/lang/Object;)I+0
j  org.jocl.CL.clBuildProgram(Lorg/jocl/cl_program;I[Lorg/jocl/cl_device_id;Ljava/lang/String;Lorg/jocl/BuildProgramFunction;Ljava/lang/Object;)I+8
j  id.compare.image.impl.gpu.operation.MaxOperation.<init>(Lid/compare/image/impl/gpu/OpenCLEnvironment;)V+66
j  id.compare.image.impl.gpu.ImageComparisonServiceImpl.createMaxOperation()Lcom/id/compare/image/operation/IMaxOperation;+20
j  com.id.compare.image.ImageComparator.calculateDiff(Lcom/id/compare/image/IImage;Lcom/id/compare/image/IImage;Lcom/id/compare/image/ImageComparator$ImageComparisonServicePoolObject;)Lcom/id/compare/image/IImage;+40
j  com.id.compare.image.ImageComparator.createDifferenceImage(Ljavax/media/jai/PlanarImage;Ljavax/media/jai/PlanarImage;)Ljava/awt/image/BufferedImage;+1317
j  com.id.compare.image.ImageComparator.createDifferenceImage(Ljava/awt/image/BufferedImage;Ljava/awt/image/BufferedImage;)Ljava/awt/image/BufferedImage;+15
j  com.id.compare.image.test.testcase.TestBenchmark.doImageCompare(Ljava/io/File;Ljava/io/File;)Lcom/id/compare/image/test/testcase/BenchmarkImage;+23
j  com.id.compare.image.test.testcase.TestBenchmark.testBenchmark()V+42
v  ~StubRoutines::call_stub
j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161
j  junit.framework.TestCase.runTest()V+107
j  junit.framework.TestCase.runBare()V+7
j  junit.framework.TestResult$1.protect()V+4
j  junit.framework.TestResult.runProtected(Ljunit/framework/Test;Ljunit/framework/Protectable;)V+1
j  junit.framework.TestResult.run(Ljunit/framework/TestCase;)V+18
j  junit.framework.TestCase.run(Ljunit/framework/TestResult;)V+2
j  junit.framework.TestSuite.runTest(Ljunit/framework/Test;Ljunit/framework/TestResult;)V+2
j  junit.framework.TestSuite.run(Ljunit/framework/TestResult;)V+40
j  junit.framework.TestSuite.runTest(Ljunit/framework/Test;Ljunit/framework/TestResult;)V+2
j  junit.framework.TestSuite.run(Ljunit/framework/TestResult;)V+40
j  org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(Lorg/eclipse/jdt/internal/junit/runner/TestExecution;)V+40
j  org.eclipse.jdt.internal.junit.runner.TestExecution.run([Lorg/eclipse/jdt/internal/junit/runner/ITestReference;)V+17
j  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests([Ljava/lang/String;Ljava/lang/String;Lorg/eclipse/jdt/internal/junit/runner/TestExecution;)V+61
j  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Lorg/eclipse/jdt/internal/junit/runner/TestExecution;)V+10
j  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run()V+70
j  org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main([Ljava/lang/String;)V+14
j  org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(Ljava/lang/Object;)Ljava/lang/Object;+4
v  ~StubRoutines::call_stub
j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161
j  org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;+15
j  org.eclipse.equinox.internal.app.EclipseAppHandle.run(Ljava/lang/Object;)Ljava/lang/Object;+196
j  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ljava/lang/Object;)Ljava/lang/Object;+103
j  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ljava/lang/Object;)Ljava/lang/Object;+29
j  org.eclipse.core.runtime.adaptor.EclipseStarter.run(Ljava/lang/Object;)Ljava/lang/Object;+149
j  org.eclipse.core.runtime.adaptor.EclipseStarter.run([Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;+183
v  ~StubRoutines::call_stub
j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161
j  org.eclipse.equinox.launcher.Main.invokeFramework([Ljava/lang/String;[Ljava/net/URL;)V+211
j  org.eclipse.equinox.launcher.Main.basicRun([Ljava/lang/String;)V+126
j  org.eclipse.equinox.launcher.Main.run([Ljava/lang/String;)I+4
j  org.eclipse.equinox.launcher.Main.main([Ljava/lang/String;)V+10
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x000000000c964800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3908, stack(0x0000000017730000,0x0000000017830000)]
  0x000000000c961800 JavaThread "Thread-23" daemon [_thread_blocked, id=3936, stack(0x000000000f3a0000,0x000000000f4a0000)]
  0x000000000c964000 JavaThread "Thread-21" daemon [_thread_blocked, id=3944, stack(0x000000000dd90000,0x000000000de90000)]
  0x000000000c963000 JavaThread "Thread-19" daemon [_thread_blocked, id=3980, stack(0x000000000c4e0000,0x000000000c5e0000)]
  0x000000000c969800 JavaThread "LoggerThread" daemon [_thread_blocked, id=3940, stack(0x000000000ff70000,0x0000000010070000)]
  0x000000000c968000 JavaThread "Thread-13" daemon [_thread_blocked, id=3912, stack(0x000000000f2a0000,0x000000000f3a0000)]
  0x000000000c967800 JavaThread "Thread-11" daemon [_thread_blocked, id=3920, stack(0x000000000e590000,0x000000000e690000)]
  0x000000000c967000 JavaThread "Thread-9" daemon [_thread_blocked, id=3924, stack(0x000000000e490000,0x000000000e590000)]
  0x000000000c966000 JavaThread "Thread-7" daemon [_thread_blocked, id=3904, stack(0x000000000e390000,0x000000000e490000)]
  0x000000000c962800 JavaThread "Shared file monitor" daemon [_thread_blocked, id=3896, stack(0x000000000df90000,0x000000000e090000)]
  0x000000000c960800 JavaThread "Shared file monitor" daemon [_thread_blocked, id=3888, stack(0x000000000b030000,0x000000000b130000)]
  0x000000000c11d800 JavaThread "ReaderThread" [_thread_in_native, id=2264, stack(0x000000000b230000,0x000000000b330000)]
  0x0000000009727800 JavaThread "Worker-JM" [_thread_blocked, id=1620, stack(0x000000000b410000,0x000000000b510000)]
  0x0000000009673000 JavaThread "[Timer] - Main Queue Handler" daemon [_thread_blocked, id=3504, stack(0x000000000b130000,0x000000000b230000)]
  0x000000000996a800 JavaThread "Bundle File Closer" daemon [_thread_blocked, id=3500, stack(0x0000000009f60000,0x000000000a060000)]
  0x0000000008a67800 JavaThread "Start Level Event Dispatcher" daemon [_thread_blocked, id=3664, stack(0x0000000009e60000,0x0000000009f60000)]
  0x0000000008c02000 JavaThread "Framework Event Dispatcher" daemon [_thread_blocked, id=2792, stack(0x0000000009d60000,0x0000000009e60000)]
  0x0000000008abc000 JavaThread "State Saver" [_thread_blocked, id=2712, stack(0x0000000009c60000,0x0000000009d60000)]
  0x00000000089c9800 JavaThread "Framework Active Thread" [_thread_blocked, id=2996, stack(0x0000000009b60000,0x0000000009c60000)]
  0x0000000008d08800 JavaThread "OSGi Console" [_thread_blocked, id=2060, stack(0x00000000091e0000,0x00000000092e0000)]
  0x00000000076ae800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1652, stack(0x0000000008790000,0x0000000008890000)]
  0x00000000076a5800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=3028, stack(0x0000000008690000,0x0000000008790000)]
  0x000000000769a000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=2720, stack(0x0000000008590000,0x0000000008690000)]
  0x0000000007699000 JavaThread "Attach Listener" daemon [_thread_blocked, id=2868, stack(0x0000000008490000,0x0000000008590000)]
  0x0000000007698000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=740, stack(0x0000000008390000,0x0000000008490000)]
  0x0000000007649000 JavaThread "Finalizer" daemon [_thread_blocked, id=2744, stack(0x0000000008290000,0x0000000008390000)]
  0x0000000007642800 JavaThread "Reference Handler" daemon [_thread_blocked, id=796, stack(0x0000000008190000,0x0000000008290000)]
=>0x00000000005cd800 JavaThread "main" [_thread_in_native, id=2992, stack(0x00000000026d0000,0x00000000027d0000)]

Here is the 2nd part of the crash log, it didn’t fit :slight_smile:

  0x0000000007637000 VMThread [stack: 0x0000000008090000,0x0000000008190000] [id=1056]
  0x00000000076c8800 WatcherThread [stack: 0x0000000008890000,0x0000000008990000] [id=220]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 PSYoungGen      total 61696K, used 32349K [0x00000000eaab0000, 0x00000000f3870000, 0x0000000100000000)
  eden space 56960K, 48% used [0x00000000eaab0000,0x00000000ec5a8f58,0x00000000ee250000)
  from space 4736K, 99% used [0x00000000ee250000,0x00000000ee6ee840,0x00000000ee6f0000)
  to   space 15616K, 0% used [0x00000000f2930000,0x00000000f2930000,0x00000000f3870000)
 PSOldGen        total 75968K, used 15505K [0x00000000c0000000, 0x00000000c4a30000, 0x00000000eaab0000)
  object space 75968K, 20% used [0x00000000c0000000,0x00000000c0f24510,0x00000000c4a30000)
 PSPermGen       total 24512K, used 24368K [0x00000000b8000000, 0x00000000b97f0000, 0x00000000c0000000)
  object space 24512K, 99% used [0x00000000b8000000,0x00000000b97cc3f0,0x00000000b97f0000)

Code Cache  [0x00000000027d0000, 0x0000000002a40000, 0x00000000067d0000)
 total_blobs=811 nmethods=388 adapters=376 free_code_cache=65086784 largest_free_block=9536

Dynamic libraries:
0x0000000000400000 - 0x000000000042e000 	C:\Program Files\Java\jre6\bin\javaw.exe
0x0000000076cf0000 - 0x0000000076e99000 	C:\Windows\SYSTEM32
tdll.dll
0x0000000076610000 - 0x000000007672f000 	C:\Windows\system32\kernel32.dll
0x000007fefd4b0000 - 0x000007fefd51c000 	C:\Windows\system32\KERNELBASE.dll
0x000007fefd6b0000 - 0x000007fefd78b000 	C:\Windows\system32\ADVAPI32.dll
0x000007fefda30000 - 0x000007fefdacf000 	C:\Windows\system32\msvcrt.dll
0x000007fefdc30000 - 0x000007fefdc4f000 	C:\Windows\SYSTEM32\sechost.dll
0x000007fefecc0000 - 0x000007fefeded000 	C:\Windows\system32\RPCRT4.dll
0x0000000076730000 - 0x000000007682a000 	C:\Windows\system32\USER32.dll
0x000007fefd520000 - 0x000007fefd587000 	C:\Windows\system32\GDI32.dll
0x000007fefec80000 - 0x000007fefec8e000 	C:\Windows\system32\LPK.dll
0x000007fefd5e0000 - 0x000007fefd6a9000 	C:\Windows\system32\USP10.dll
0x000007fefec90000 - 0x000007fefecbe000 	C:\Windows\system32\IMM32.DLL
0x000007fefea40000 - 0x000007fefeb49000 	C:\Windows\system32\MSCTF.dll
0x000007fefd110000 - 0x000007fefd150000 	C:\Windows\system32
vinitx.dll
0x000000006d7f0000 - 0x000000006dfa8000 	C:\Program Files\Java\jre6\bin\server\jvm.dll
0x000007fefa230000 - 0x000007fefa26b000 	C:\Windows\system32\WINMM.dll
0x000000006d760000 - 0x000000006d76e000 	C:\Program Files\Java\jre6\bin\verify.dll
0x000000006d3b0000 - 0x000000006d3d7000 	C:\Program Files\Java\jre6\bin\java.dll
0x000000006d7b0000 - 0x000000006d7c2000 	C:\Program Files\Java\jre6\bin\zip.dll
0x000007fefc9e0000 - 0x000007fefc9f7000 	C:\Windows\system32\CRYPTSP.dll
0x000007fefc6e0000 - 0x000007fefc727000 	C:\Windows\system32\rsaenh.dll
0x000007fefc460000 - 0x000007fefc47e000 	C:\Windows\system32\USERENV.dll
0x000007fefd150000 - 0x000007fefd15f000 	C:\Windows\system32\profapi.dll
0x000007fefd040000 - 0x000007fefd04f000 	C:\Windows\system32\CRYPTBASE.dll
0x000000006d600000 - 0x000000006d617000 	C:\Program Files\Java\jre6\bin
et.dll
0x000007fefd590000 - 0x000007fefd5dd000 	C:\Windows\system32\WS2_32.dll
0x000007fefebf0000 - 0x000007fefebf8000 	C:\Windows\system32\NSI.dll
0x000007fefc980000 - 0x000007fefc9d5000 	C:\Windows\system32\mswsock.dll
0x000007fefc970000 - 0x000007fefc977000 	C:\Windows\System32\wship6.dll
0x000007fefad50000 - 0x000007fefad65000 	C:\Windows\system32\NLAapi.dll
0x000007fefb300000 - 0x000007fefb315000 	C:\Windows\system32
apinsp.dll
0x000007fefb2e0000 - 0x000007fefb2f9000 	C:\Windows\system32\pnrpnsp.dll
0x000007fefc800000 - 0x000007fefc85b000 	C:\Windows\system32\DNSAPI.dll
0x000007fefb2d0000 - 0x000007fefb2db000 	C:\Windows\System32\winrnr.dll
0x000007fefc320000 - 0x000007fefc327000 	C:\Windows\System32\wshtcpip.dll
0x000007fefaa30000 - 0x000007fefaa57000 	C:\Windows\system32\IPHLPAPI.DLL
0x000007fefaa20000 - 0x000007fefaa2b000 	C:\Windows\system32\WINNSI.DLL
0x000007fef8a00000 - 0x000007fef8a08000 	C:\Windows\system32\rasadhlp.dll
0x000007fefa8d0000 - 0x000007fefa923000 	C:\Windows\System32\fwpuclnt.dll
0x000000006d620000 - 0x000000006d62b000 	C:\Program Files\Java\jre6\bin
io.dll
0x0000000072000000 - 0x0000000072012000 	C:\Users\intellistamp\workspaces\Intellistamp-head-v2\.metadata\.plugins\org.eclipse.pde.core\.bundle_pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502\eclipse_1406.dll
0x000007fefbb90000 - 0x000007fefbd84000 	C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\COMCTL32.dll
0x000007fefdbb0000 - 0x000007fefdc21000 	C:\Windows\system32\SHLWAPI.dll
0x000007fefc250000 - 0x000007fefc25c000 	C:\Windows\system32\VERSION.dll
0x000007fef1ad0000 - 0x000007fef1b1a000 	C:\Users\intellistamp\workspaces\Intellistamp-head-v2\com.id.external.org.jocl.win32.x86_64\JOCL_0_1_7.dll
0x000007fef4b60000 - 0x000007fef4b73000 	C:\Windows\system32\OpenCL.dll
0x000007fefd790000 - 0x000007fefd967000 	C:\Windows\system32\SETUPAPI.dll
0x000007fefd240000 - 0x000007fefd276000 	C:\Windows\system32\CFGMGR32.dll
0x000007fefdad0000 - 0x000007fefdba7000 	C:\Windows\system32\OLEAUT32.dll
0x000007fefedf0000 - 0x000007fefeff3000 	C:\Windows\system32\ole32.dll
0x000007fefd490000 - 0x000007fefd4aa000 	C:\Windows\system32\DEVOBJ.dll
0x000007fefdc50000 - 0x000007fefe9d8000 	C:\Windows\system32\SHELL32.dll
0x000000006d540000 - 0x000000006d54a000 	C:\Program Files\Java\jre6\bin\management.dll
0x000007fef9ef0000 - 0x000007fefa1af000 	C:\Windows\system32
vapi64.dll
0x000007fefd200000 - 0x000007fefd23a000 	C:\Windows\system32\WINTRUST.dll
0x000007fefd320000 - 0x000007fefd48a000 	C:\Windows\system32\CRYPT32.dll
0x000007fefd1f0000 - 0x000007fefd1ff000 	C:\Windows\system32\MSASN1.dll
0x000007fef1c50000 - 0x000007fef1c90000 	C:\Windows\system32\IntelOpenCL64.dll
0x000007feef400000 - 0x000007feef4a8000 	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64\intelocl.dll
0x000000006ccb0000 - 0x000000006cd83000 	C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_08e4299fa83d7e3c\MSVCP90.dll
0x0000000069570000 - 0x000000006960d000 	C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_08e4299fa83d7e3c\MSVCR90.dll
0x000007feedb40000 - 0x000007feedc5d000 	C:\Windows\system32\OPENGL32.dll
0x000007fef2940000 - 0x000007fef296d000 	C:\Windows\system32\GLU32.dll
0x000007feef300000 - 0x000007feef3f1000 	C:\Windows\system32\DDRAW.dll
0x000007fef87e0000 - 0x000007fef87e8000 	C:\Windows\system32\DCIMAN32.dll
0x000007fefb4a0000 - 0x000007fefb4b8000 	C:\Windows\system32\dwmapi.dll
0x000007feec9a0000 - 0x000007feedb36000 	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64\clang_compiler.dll
0x000007fef4b80000 - 0x000007fef4b95000 	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64	ask_executor.dll
0x0000000180000000 - 0x000000018004b000 	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64	bb.dll
0x000007fef2df0000 - 0x000007fef2f15000 	C:\Windows\system32\dbghelp.dll
0x000007feec940000 - 0x000007feec996000 	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64\cpu_device.dll
0x000007feec8a0000 - 0x000007feec93b000 	C:\Windows\system32\igdrcl64.dll
0x0000000001df0000 - 0x0000000001e29000 	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64	bbmalloc.dll
0x000007feebf60000 - 0x000007feec897000 	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64\OclCpuBackEnd.dll
0x000007feebed0000 - 0x000007feebf53000 	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64\clbltfne9.dll
0x000000000f4a0000 - 0x000000000f8fc000 	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64\__ocl_svml_e9.dll
0x000000006d000000 - 0x000000006d1c3000 	C:\Program Files\Java\jre6\bin\awt.dll
0x000007fef9dd0000 - 0x000007fef9e41000 	C:\Windows\system32\WINSPOOL.DRV
0x000007fee8750000 - 0x000007feea308000 	C:\Windows\system32\igdfcl64.dll
0x0000000076ec0000 - 0x0000000076ec7000 	C:\Windows\system32\PSAPI.DLL

VM Arguments:
jvm_args: -ea -Dcom.id.programdir=C:\Users\intellistamp\workspaces\Intellistamp-head-v2\id.intellistamp.eclipse.launchers/eclipseout -Djava.security.auth.login.config=C:\Users\intellistamp\workspaces\Intellistamp-head-v2\id.intellistamp.eclipse.launchers/bin/login.conf -DDEBUG -Dcom.sun.media.jai.disableMediaLib=true -Djava.awt.headless=true -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=128m -Dcom.id.product.name=IntelliStamp -Dcom.id.product.id=intellistamp -Dcom.id.server.category=process -Dcom.id.default.port.range=136 -Xmx1024m -Declipse.p2.data.area=@config.dir\p2 -Dfile.encoding=Cp1252 
java_command: org.eclipse.equinox.launcher.Main -clean -nl en_US -id:syslog -id:loglevel ERROR-consoleLog -console -version 3 -port 49432 -testLoaderClass org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader -loaderpluginname org.eclipse.jdt.junit.runtime -classNames com.id.compare.image.test.CompareTestSuite -application org.eclipse.pde.junit.runtime.coretestapplication -data C:\Users\intellistamp\workspaces\Intellistamp-head-v2/../junit-workspace -configuration file:C:/Users/intellistamp/workspaces/Intellistamp-head-v2/.metadata/.plugins/org.eclipse.pde.core/pde-junit/ -dev file:C:/Users/intellistamp/workspaces/Intellistamp-head-v2/.metadata/.plugins/org.eclipse.pde.core/pde-junit/dev.properties -clean -nl en_US -id:syslog -id:loglevel ERROR-consoleLog -console -testpluginname com.id.compare.image.test
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64
USERNAME=intellistamp
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 7 , 64 bit Build 7601 Service Pack 1

CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 58 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht

Memory: 4k page, physical 7290372k(5420272k free), swap 14578892k(12485668k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (20.2-b06) for windows-amd64 JRE (1.6.0_27-b07), built on Jul 19 2011 01:08:22 by "java_re" with MS VC++ 8.0 (VS2005)

time: Wed Sep 19 11:00:31 2012
elapsed time: 10 seconds```

From the log I can not say much more than that the error happens in clBuildProgramNative. A quick review of the source code did not reveal anything obvious being wrong. And for several reasons, it’s difficult to guess what it might be related to:

  • The clBuildProgramNative function does nothing that is not done in a similar form in other methods
  • The crash only occurs under very specific conditions
  • I can hardly reproduce the bug, without an appropriate Intel GPU…

Nevertheless, can you post an example program where the crash happens reproducably (on the respective platform)? Another interesting point would be to see whether it works in native OpenCL, but I see that it’s hard to verify this…

I fixed it but I can’t explain it… Maybe you can?

This is the kernel that crashed:

__constant sampler_t samplerIn = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP | CLK_FILTER_NEAREST;

__kernel void maxOp(
	__read_only image2d_t input1,
	__read_only image2d_t input2,
	__write_only image2d_t output
){
	int gx = get_global_id(0);
	int gy = get_global_id(1);
	
	int2 pos = {gx,gy};
	
	uint4 input1pixel = read_imageui(input1,samplerIn,pos);
	uint4 input2pixel = read_imageui(input2,samplerIn,pos);
	if(input1pixel.x >= input2pixel.x){
	     write_imageui(output,pos,input1pixel);
	}
       else{
             write_imageui(output,pos,input2pixel);
       }
}```

I changed the following lines in the if statement:
```if(input1pixel.x < input2pixel.x){
		input1pixel = input2pixel;
	}
	write_imageui(output,pos,input1pixel);```

Now it compiles and my whole line of kernels runs no problem on the iGPU.. But as i have told you, i have no idea why..

Again, I have to admit that I have no idea. I should probably also give the Intel SDK a try (although I’m not sure whether it runs on my main development machine, which still uses XP … I think the Intel SDK required Vista/7 …).

Some of these errors you recently reported seem SO strange that it’s tempting to isolate only the kernel and its compilation in a C-OpenCL example and ask in the respective forums (Intel, AMD, NVIDIA, and maybe Khronos) whether these are known bugs in the compilers. (I had the impression that Image support in OpenCL in general was “difficult” for some vendors (except NVIDIA ;)), and some of their earlier compilers did not support them, so it’s not unlikely that there are some glitches). But in doubt, I have to verify that these bugs are not related to JOCL.

I’m curious: What does the Intel compiler return as the “Program Binaries” when running a program like that: http://forum.byte-welt.de/showthread.php?p=13714#post13714 Maybe the resulting binaries can support the guesswork that is involved here…