Description
Libcouchbase appears to be invoking various trace methods against trace spans that were created by the application after the final callback of the associated method has returned. For instance, a view query's final callback is invoked and then the associated trace for that view query is closed, this leads to a segfault as libcouchbase tries to set properties against a freed span (the span is freed as part of the final callback that is invoked, since otherwise it would be leaked). I believe that this also implies that the spans are being closed late (query spans should be closed as soon as the first row is received, as query row streaming is not considered part of the SDK-side trace).