Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Panic: runtime error on invalid index creation #211

Open
sdudziak opened this issue Sep 28, 2022 · 1 comment
Open

[BUG] Panic: runtime error on invalid index creation #211

sdudziak opened this issue Sep 28, 2022 · 1 comment

Comments

@sdudziak
Copy link

Context: phalanx with file storage configured
When I made a call to create index with minio & etcd took down whole phalanx with panic error:

phalanx {"_level_":"info","_timestamp_":"2022-09-28T08:19:20.986Z","_name_":"phalanx","_caller_":"server/index_service.go:198","_message_":"opening index writers"} phalanx {"_level_":"error","_timestamp_":"2022-09-28T08:19:20.986Z","_name_":"phalanx.manager.writer.directory","_caller_":"directory/directory_minio.go:48","_message_":"Endpoint: does not follow ip address or domain name standards.","uri":"minio://phalanx/indexes/product/shard-2qpDDnjJ"} phalanx panic: runtime error: invalid memory address or nil pointer dereference phalanx [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x11ea50d] phalanx phalanx goroutine 49 [running]: phalanx github.com/mosuka/phalanx/directory.(*MinioDirectory).exists(0x0) phalanx /go/src/github.com/mosuka/phalanx/directory/directory_minio.go:77 +0x4d phalanx github.com/mosuka/phalanx/directory.(*MinioDirectory).Setup(0x0, 0xb) phalanx /go/src/github.com/mosuka/phalanx/directory/directory_minio.go:95 +0x53 phalanx github.com/blugelabs/bluge/index.OpenWriter({{0x15b6c0b, 0x3}, 0x1, 0xc0002263c0, 0x0, 0x0, 0x0, {0xa, 0x4c4b40, 0x4024000000000000, ...}, ...}) phalanx /go/pkg/mod/github.com/blugelabs/[email protected]/index/writer.go:85 +0x394 phalanx github.com/blugelabs/bluge.OpenWriter({{{0x15b6c0b, 0x3}, 0x1, 0xc0002263c0, 0x0, 0x0, 0x0, {0xa, 0x4c4b40, 0x4024000000000000, ...}, ...}, ...}) phalanx /go/pkg/mod/github.com/blugelabs/[email protected]/writer.go:36 +0xb8 phalanx github.com/mosuka/phalanx/index.(*IndexWriters).open(0xc00020b4a0, {0xc0005fc88a, 0x7}, {0xc0003a9a62, 0xe}, 0xc0005fe5a0, 0xc0001a8b00) phalanx /go/src/github.com/mosuka/phalanx/index/writer.go:107 +0x3b8 phalanx github.com/mosuka/phalanx/index.(*IndexWriters).Open(0xc00020b4a0, {0xc0005fc88a, 0x7}, {0xc0003a9a62, 0xe}, 0x0, 0x0) phalanx /go/src/github.com/mosuka/phalanx/index/writer.go:128 +0xe7 phalanx github.com/mosuka/phalanx/server.(*IndexService).assignShardsToNode(0xc000124a80) phalanx /go/src/github.com/mosuka/phalanx/server/index_service.go:216 +0x3ce5 phalanx github.com/mosuka/phalanx/server.(*IndexService).Start.func1() phalanx /go/src/github.com/mosuka/phalanx/server/index_service.go:114 +0x692 phalanx created by github.com/mosuka/phalanx/server.(*IndexService).Start phalanx /go/src/github.com/mosuka/phalanx/server/index_service.go:86 +0x5b

The expected behaviour should be an appropriate HTTP error code returned, index creation attempt should not happened and the application should be functional

@sdudziak sdudziak changed the title Panic: runtime error on invalid index creation [BUG] Panic: runtime error on invalid index creation Sep 28, 2022
@mosuka
Copy link
Owner

mosuka commented Sep 28, 2022

@sdudziak
Thanks. I'll fix it later. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants