I don't have the complete picture yet, but it seems like the some children of the intersect scan have gone away without notifying the parent
goroutine 91047 [semacquire, 1 minutes]:
sync.runtime_Semacquire(0xc0000e7c54)
/usr/local/go/src/runtime/sema.go:56 +0x42
sync.(*WaitGroup).Wait(0xc0000e7c54)
/usr/local/go/src/sync/waitgroup.go:130 +0x64
github.com/couchbase/query/execution.(*valueExchange).retrieveChildNoStop(0xc0000e7b80, 0x1)
/home/marco/query/src/github.com/couchbase/query/execution/exchange.go:488 +0xbc
github.com/couchbase/query/execution.(*base).childrenWaitNoStop(0xc0000e7b80, 0x1)
/home/marco/query/src/github.com/couchbase/query/execution/base.go:780 +0x50
github.com/couchbase/query/execution.(*IntersectScan).RunOnce.func1()
/home/marco/query/src/github.com/couchbase/query/execution/scan_intersect.go:151 +0x86c
github.com/couchbase/query/util.(*Once).Do(0xc0000e7cb8, 0xc0019ddf50)
/home/marco/query/src/github.com/couchbase/query/util/sync.go:55 +0x4a
github.com/couchbase/query/execution.(*IntersectScan).RunOnce(0xc0000e7b80, 0xc000e0c000, 0x28b8940, 0xc003b2fe00)
/home/marco/query/src/github.com/couchbase/query/execution/scan_intersect.go:65 +0x82
github.com/couchbase/query/execution.execOp(0x28c08e0, 0xc0000e7b80, 0xc000e0c000, 0x28b8940, 0xc003b2fe00)
/home/marco/query/src/github.com/couchbase/query/execution/base.go:495 +0x54
created by github.com/couchbase/query/execution.(*base).fork
/home/marco/query/src/github.com/couchbase/query/execution/base.go:505 +0xfa
Repro:
install travel-sample
run the query (couple of times in UI or cbq shell)
Looks like some synchronization issue.
runtime.goparkunlock(...)