[Mesa-dev] EXTERNAL: Re: Clover clEnqueue* function don't implement blocking?

Francisco Jerez currojerez at riseup.net
Tue Apr 15 09:39:16 PDT 2014


"Dorrington, Albert" <albert.dorrington at lmco.com> writes:

>> -----Original Message-----
>> From: Francisco Jerez [mailto:currojerez at riseup.net]
>> > In the case where I had the 23,328 events in the queue, at least two
>> > dozen kernels has been compiled, and each kernel had been executed 6
>> times, with different input parameters.
>> > (I would have to back the changes out to get exact numbers)
>> >
>> > From all appearances, the queued_events queue was never being flushed
>> until the clFinish() call.
>> >
>> 
>> And how exactly does that lead to a crash?
>> 
>
> From the analysis I was doing over the weekend, when the clFinish() is
> called, there were 23,328 events listed in queued_events.  The flush
> routine appears to be recursive, and processed approximage 20,000 of
> the events, before seg-faulting.

Hm...  I don't see how the command_queue::flush() routine could ever
recurse.

> When I looked at the backtrace and structures, it appeared that the
> reference that was being flushed, no longer held valid information for
> the type of data it was supposed to hold.

That sounds like you have some sort of memory corruption issue that's
being exacerbated by the lack of flushes.  I'd be OK with adding
explicit flushes to the blocking clEnqueue* commands to match the spec
more literally, but I have the impression that we're missing the
ultimate cause of the problem.

> More than likely, this occurred since the resource was released back
> to the system after a clEnqueue call, and reused by another resource
> of a different type.
>
That shouldn't happen...  If clover has an internal reference to some
resource its reference count should be incremented so it's not released
to the system as long as the referencing object still exists.

>[...]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140415/84c34c34/attachment.sig>


More information about the mesa-dev mailing list