arcan icon indicating copy to clipboard operation
arcan copied to clipboard

(core) possible detach corruption

Open letoram opened this issue 6 years ago • 0 comments

This seem to be triggered by a rare and ugly edge case. Best place to reproduce so far has been a release-build using safespaces on a PSVR, i.e. a relatively complex sharing graph with aggressive optimizations.

The first set symptom is a live-lock on detach_object when cleaning up the context. Slightly closer inspection gives that it is part of the:

torem = dst->first;
	while (torem){
	if (torem->elem == src)
	   break;

		 torem = torem->next;
	}

Block that never terminates. This means that torem->next manages to run into a cycle. Did not have access to more debug info or tracing options at the time of discovery, so just documenting here.

Another (more likely?) possibility is that this comes from a linked rendertarget and we are seeing an optimization of the recursion. This fits the part about safespaces triggering it as it is the only active user of define_linktarget, and it is relatively speaking a less tested feature.

letoram avatar Aug 18 '19 13:08 letoram