Search appears to bring frontend down
Created by: beyang
Repro: No deterministic repro, but this appears to be affecting k8s.sgdev.org. Notice the multiple container restarts. If you pull the logs from the previous container, you see the following:
panic: runtime error: makeslice: cap out of range
goroutine 56172 [running]:
github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend.zoektIndexedRepos(0x23f77c0, 0xc010c002c0, 0xc0017701e0, 0xc002cd05a0, 0x13, 0x13, 0xc00dcee000, 0x0, 0x884f, 0x0, ...)
/buildkite/builds/buildkite-agent-6ffffdfcc4-9vdxd-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/textsearch.go:848 +0x1cc
github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend.searchFilesInRepos(0x23f77c0, 0xc010c00280, 0xc010c00240, 0x0, 0x0, 0x0, 0xc002cd05a0, 0x13, 0x13)
/buildkite/builds/buildkite-agent-6ffffdfcc4-9vdxd-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/textsearch.go:899 +0x171e
github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend.(*searchResolver).suggestFilePaths(0xc01498aae0, 0x23f7840, 0xc0134d12c0, 0x64, 0xc0134d12c0, 0xc001d4dd50, 0x0, 0x0, 0x0)
/buildkite/builds/buildkite-agent-6ffffdfcc4-9vdxd-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/search.go:571 +0x263
github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend.(*searchResolver).Suggestions.func2(0x23f7840, 0xc0134d1260, 0x0, 0x0, 0x0, 0x0, 0x0)
/buildkite/builds/buildkite-agent-6ffffdfcc4-9vdxd-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/search_suggestions.go:99 +0x255
github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend.(*searchResolver).Suggestions.func5(0xc010c16bc0, 0x23f7880, 0xc0129f1ce0, 0xc00bb288f8, 0xc013c2aac0, 0xc01498aae0, 0xc001c98eb0)
/buildkite/builds/buildkite-agent-6ffffdfcc4-9vdxd-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/search_suggestions.go:204 +0xdc
created by github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend.(*searchResolver).Suggestions
/buildkite/builds/buildkite-agent-6ffffdfcc4-9vdxd-1/sourcegraph/.golang/sourcegraph/src/github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/search_suggestions.go:200 +0x47c
I saw this happen twice within 5 minutes. The query I was attempting to search for was sourcegraph-server-gen repo:^github.com/sourcegraph/
.