3 Replies Latest reply on Jan 27, 2012 3:21 AM by homemadejam

    Crashes in clGetPlatformIDs()

    arsenm

      I have a sort of vague family of problems I've been experiencing for a long time. In various situations clGetPlatformIDs() crashes, and something I've noticed for at least a year.

       

      In the first one is when swapping Catalyst and Nvidia drivers, it ends up crashing consistently. Something more reasonable should happen than that. I usually fix it by removing all drivers and reinstalling. There's similar one that happens on Linux but right now I don't have a better description right now.

       

      The second one happens rather infrequently (less than 1% of the time) on Windows when it otherwise is working. It seems to happen on first use to get the number of platforms:

       

       

      cl_uint nPlatform;
      
      err = clGetPlatformIDs(0, NULL, &nPlatform);
      

      - Information -

      Status: Base Priority: Normal, Priority: Normal, , Kernel Time: 0.000000, User Time: 0.000000, Wait Time: 0.000000

       

      - Unhandled Exception Record -

      Reason: Access Violation (0xc0000005) at address 0x00000000691B29E5 read attempt to address 0x000001B8

       

      - Registers -

      rax=0000000000000000 rbx=00000000693c4ff0 rcx=0000000003f08f70 rdx=0000000000000000 rsi=0000000000d1d080 rdi=0000000000000000

      r8=0000000000000000 r9=0000000000000000 r10=0000000000000005 r11=0000000000000005 r12=0000000000008000 r13=00000000691b2740

      r14=0000000000000000 r15=0000000000000000 rip=00000000691b29e5 rsp=0000000000b7ce10 rbp=0000000003f07970

      cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010246

       

      - Callstack -

      ChildEBP RetAddr  Args to Child

      00b7d0f0 691ab2d3 00d1d080 03f04520 00000000 00000000 aticaldd64!calddiGetExport+0x0

      00b7d180 6902326e 00d1d080 03f07860 03f02ca0 03f04520 aticaldd64!calddiGetExport+0x0

      00b7e890 691d1b2c 03ee7fd8 03ee7fd8 00000000 00000000 aticaldd64!calddiGetExport+0x0

      00b7e8e0 691d1705 00000000 00000000 00b7e958 03ee7fd8 aticaldd64!calddiGetExport+0x0

      00b7e910 691d150e 03f02b58 00000000 00000000 00000000 aticaldd64!calddiGetExport+0x0

      00b7e940 691cb596 03ee7fd0 00000000 00000000 00000002 aticaldd64!calddiGetExport+0x0

      00b7e970 69001c5d 00000037 69001a20 00000000 00000000 aticaldd64!calddiGetExport+0x0

      00b7e9a0 f0a62025 00000037 69001a20 00000000 61736964 aticaldd64!calddiGetExport+0x0

      00b7e9e0 f0a66b26 00000000 00145300 00000000 02704730 amdocl64!clGetSamplerInfo+0x0

      00b7ea30 f0a41beb 00000000 00000000 00145300 00145300 amdocl64!clGetSamplerInfo+0x0

      00b7ea60 f0a38d74 0000003b f1326698 00000000 0000003b amdocl64!clGetSamplerInfo+0x0

      00b7eaa0 f0a216d7 00145300 f1a640f0 00000000 00000000 amdocl64!clGetSamplerInfo+0x0

      00b7eb00 f0a260ab 00145300 00000000 00000000 00b7ed10 amdocl64!+0x0

      00b7eb50 f0a2c575 00000008 00000000 00fd1c70 f0a2c5a0 amdocl64!clGetPlatformInfo+0x0

      00b7eb90 f1b41137 00000008 00000000 00000000 fef5d6b6 amdocl64!clEnqueueReleaseGLObjects+0x0

      00b7ec00 f1b42d0d 00000001 40044244 00000001 025dd290 OpenCL!+0x0

      00b7f070 f1b4101c 00000000 00000004 00000004 0000000c OpenCL!clGetExtensionFunctionAddress+0x0

      00b7f0a0 f1b412ac cccccccc cccccccc cccccccc cccccccc OpenCL!+0x0

      00b7f0d0 3ffec188 00000000 00b7fb00 cccccccc cccccccc OpenCL!clGetPlatformIDs+0x0

        • Re: Crashes in clGetPlatformIDs()
          arsenm

          On Linux I also get it into a state where this trace comes from clinfo:

           

          #0  0x00007ffff77576f3 in ?? () from /usr/lib/libstdc++.so.6

          #1  0x00007ffff7757743 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() () from /usr/lib/libstdc++.so.6

          #2  0x00007ffff55a678a in ?? () from /opt/amdstream/lib/libamdocl64.so

          #3  0x00007ffff55a6dae in ?? () from /opt/amdstream/lib/libamdocl64.so

          #4  0x00007ffff55b11f4 in ?? () from /opt/amdstream/lib/libamdocl64.so

          #5  0x00007ffff55b34de in ?? () from /opt/amdstream/lib/libamdocl64.so

          #6  0x00007ffff5562c50 in ?? () from /opt/amdstream/lib/libamdocl64.so

          #7  0x00007ffff556d3d9 in ?? () from /opt/amdstream/lib/libamdocl64.so

          #8  0x00007ffff55974df in ?? () from /opt/amdstream/lib/libamdocl64.so

          #9  0x00007ffff559ac8f in ?? () from /opt/amdstream/lib/libamdocl64.so

          #10 0x00007ffff559b37f in ?? () from /opt/amdstream/lib/libamdocl64.so

          #11 0x00007ffff5560f53 in ?? () from /opt/amdstream/lib/libamdocl64.so

          #12 0x00007ffff55701b5 in ?? () from /opt/amdstream/lib/libamdocl64.so

          #13 0x00007ffff553a881 in clGetPlatformInfo () from /opt/amdstream/lib/libamdocl64.so

          #14 0x00007ffff7bd7e8d in ?? () from /usr/lib/libOpenCL.so.1

          #15 0x00007ffff7bd9c13 in ?? () from /usr/lib/libOpenCL.so.1

          #16 0x00007ffff7bd9320 in clGetPlatformIDs () from /usr/lib/libOpenCL.so.1

          #17 0x000000000040767b in ?? ()

          #18 0x0000000000401b02 in ?? ()

          #19 0x00007ffff6c2438d in __libc_start_main () from /lib/libc.so.6

          #20 0x0000000000401999 in ?? ()

          #21 0x00007fffffffdc58 in ?? ()

          #22 0x00000000ffffffff in ?? ()

          #23 0x0000000000000001 in ?? ()

          #24 0x00007fffffffdfdf in ?? ()

          #25 0x0000000000000000 in ?? ()

          • Re: Crashes in clGetPlatformIDs()
            homemadejam

            I know this seems relatively simple, but I have noticed some quirks with this function before. What happens if you change the first argument from zero to 1?