Reset or release invalidated command queue

Like to find out if there is any way to reset or release an invalidated command queue.

The scenario is as follows.

Of course, to solve the root of the problem is to find the kernel or OpenCL calls that has invalidated the command queue. Somehow, the kernel “belongs” to someone else that I have no control over. The solution is to disable the kernel and recreate the command queue. In this way, the software carries on running. However, this “recreation” of command queue can only happen less than 10 times before it failed to create the command queue (using clCreateCommandQueue). Before each recreation, clReleaseCommandQueue is called. But, this does not seem to help


In some implementations invalid command queue is a generic catastrophic error- it might be unrecoverable. The best thing to do is to determine why it happens in the first place, it is some type of bug, either in the app or in the implementation.