Runtime panic when performing any search in version 3.32.0
Created by: DavidZidar
I just updated to v3.32.0 and it keeps crashing and restarting any time a try to do a search.
Sourcegraph version: 3.32.0
Platform information:
Debian Linux
Kernel 5.13.4-x86_64-linode146
Linode
docker-ce 5:20.10.83-0debian-buster
Single Sourcegraph container + lang-typescript container
Steps to reproduce:
- Start Sourcegraph v3.32.0
- Perform a search or type in the search box
Expected behavior:
The search should complete.
Actual behavior:
When performing a search I see this stack trace in the logs:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x1b11221]
goroutine 995 [running]:
github.com/sourcegraph/sourcegraph/internal/search/zoekt.doZoektSearchGlobal({0x66f7e00, 0xc001422d80}, {0x6691c40, 0xc00212d560}, {0x293eaad, 0x4}, {0x0, 0x0}, 0x1f4, {0x812c6f8, ...}, ...)
github.com/sourcegraph/sourcegraph/internal/search/zoekt/indexed_search.go:485 +0x401
github.com/sourcegraph/sourcegraph/internal/search/zoekt.(*IndexedUniverseSearchRequest).Search(0xc000ee94a0, {0x66f7e00, 0xc001422d80}, {0x6694120, 0xc00220ac80})
github.com/sourcegraph/sourcegraph/internal/search/zoekt/indexed_search.go:173 +0x177
github.com/sourcegraph/sourcegraph/internal/search/unindexed.SearchFilesInRepos.func2()
github.com/sourcegraph/sourcegraph/internal/search/unindexed/unindexed.go:72 +0x32
golang.org/x/sync/errgroup.(*Group).Go.func1()
golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x67
created by golang.org/x/sync/errgroup.(*Group).Go
golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92
If I type in the search box I get the following error:
goroutine panic: runtime error: invalid memory address or nil pointer dereference
goroutine 886 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x65
github.com/sourcegraph/sourcegraph/internal/goroutine.Go.func1.1()
github.com/sourcegraph/sourcegraph/internal/goroutine/goroutine.go:19 +0x39
panic({0x25398c0, 0x80b5e60})
runtime/panic.go:1038 +0x215
github.com/sourcegraph/sourcegraph/internal/search/zoekt.doZoektSearchGlobal({0x66f8df8, 0xc002037340}, {0x6691c40, 0xc001d16c90}, {0x295797c, 0x6}, {0x0, 0x0}, 0x1e, {0x812c6f8, ...}, ...)
github.com/sourcegraph/sourcegraph/internal/search/zoekt/indexed_search.go:485 +0x401
github.com/sourcegraph/sourcegraph/internal/search/zoekt.(*IndexedUniverseSearchRequest).Search(0xc0011943c0, {0x66f8df8, 0xc002037340}, {0x6694120, 0xc002037360})
github.com/sourcegraph/sourcegraph/internal/search/zoekt/indexed_search.go:173 +0x177
github.com/sourcegraph/sourcegraph/internal/search/symbol.Search.func2()
github.com/sourcegraph/sourcegraph/internal/search/symbol/symbol.go:71 +0xa7
github.com/sourcegraph/sourcegraph/internal/goroutine.Go.func1()
github.com/sourcegraph/sourcegraph/internal/goroutine/goroutine.go:24 +0x3f
created by github.com/sourcegraph/sourcegraph/internal/goroutine.Go
github.com/sourcegraph/sourcegraph/internal/goroutine/goroutine.go:16 +0x5b
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x1b11221]
goroutine 863 [running]:
github.com/sourcegraph/sourcegraph/internal/search/zoekt.doZoektSearchGlobal({0x66f7e00, 0xc001e1b300}, {0x6691c40, 0xc001c7ab88}, {0x293eaad, 0x4}, {0x0, 0x0}, 0x1e, {0x812c6f8, ...}, ...)
github.com/sourcegraph/sourcegraph/internal/search/zoekt/indexed_search.go:485 +0x401
github.com/sourcegraph/sourcegraph/internal/search/zoekt.(*IndexedUniverseSearchRequest).Search(0xc000191b30, {0x66f7e00, 0xc001e1b300}, {0x6694120, 0xc002008f20})
github.com/sourcegraph/sourcegraph/internal/search/zoekt/indexed_search.go:173 +0x177
github.com/sourcegraph/sourcegraph/internal/search/unindexed.SearchFilesInRepos.func2()
github.com/sourcegraph/sourcegraph/internal/search/unindexed/unindexed.go:72 +0x32
golang.org/x/sync/errgroup.(*Group).Go.func1()
golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x67
created by golang.org/x/sync/errgroup.(*Group).Go
golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x92