[...]
i965: Failed to submit batchbuffer: Input/output error
assertion "pthread__tsd_destructors[key] != NULL" failed: file "/x/netbsd-9/src/lib/libpthread/pthread_tsd.c", line 177, function "pthread__add_specific"
It seems like something called pthread_key_delete() while/before the pthread_setspecific() call.
I believe the code there should be changed to simply return without doing anything if specified key doesn't exist, and the assert() removed.
Jaromir