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

kv/count crash server from api and cmd line #95

Closed
IgorShadurin opened this issue Aug 9, 2021 · 1 comment
Closed

kv/count crash server from api and cmd line #95

IgorShadurin opened this issue Aug 9, 2021 · 1 comment
Labels
bug Something isn't working can't reproduce P1 Priority 1

Comments

@IgorShadurin
Copy link
Collaborator

1 - Create user
2 - Create pod
3 - Create kv
4 - Put 1 entry
5 - Delete 1 entry
6 - Call kv/loadcsv with file that contains data:

key_1,"My value here, developer"
key_2,"Some special chars here ""!@#$%^&*()'"
key_3,very_simple_value

7 - Call kv/count

Server will crash with error

time="2021-08-09T11:03:28Z" level=debug msg="download chunk: " duration=10.642572ms reference=75b26568db9cecaa86abc4618a54bb900db020b450bae970d190af7cd621ae8c
time="2021-08-09T11:03:28Z" level=debug msg="download blob: " duration=9.902017ms reference=5fd1230a58cb30e92de7f29c13e5d38ea12e27febcc6c8e091b9658e9b58280c size=271
2021/08/09 11:03:28 http: panic serving 172.21.0.1:57820: unaligned 64-bit atomic operation
goroutine 3389 [running]:
net/http.(*conn).serve.func1(0xa9496e0)
        net/http/server.go:1804 +0x104
panic(0x7177c8, 0xa0a9a8)
        runtime/panic.go:971 +0x4b4
runtime/internal/atomic.panicUnaligned()
        runtime/internal/atomic/unaligned.go:8 +0x24
runtime/internal/atomic.Xadd64(0xa877c0c, 0x2, 0x0, 0xac97ae0, 0x20)
        runtime/internal/atomic/asm_arm.s:233 +0x14
github.com/fairdatasociety/fairOS-dfs/pkg/collection.(*Index).loadIndexAndCount(0xa877bd0, 0xa1959c, 0xac5b9a0, 0xa9e1a08, 0xa9c9a40, 0xad9a240, 0xac55dc0)
        github.com/fairdatasociety/fairOS-dfs/pkg/collection/index.go:228 +0x228
github.com/fairdatasociety/fairOS-dfs/pkg/collection.(*Index).loadIndexAndCount(0xa877bd0, 0xa1959c, 0xac5b9a0, 0xa9e1a08, 0xa9c9a40, 0xac93da0, 0xac55dc0)
        github.com/fairdatasociety/fairOS-dfs/pkg/collection/index.go:223 +0xc0
github.com/fairdatasociety/fairOS-dfs/pkg/collection.(*Index).CountIndex(0xa877bd0, 0x0, 0x0, 0x0, 0x0)
        github.com/fairdatasociety/fairOS-dfs/pkg/collection/index.go:194 +0x110
github.com/fairdatasociety/fairOS-dfs/pkg/collection.(*KeyValue).KVCount(0xa829980, 0xad82320, 0xa, 0x0, 0x0, 0x0, 0x0)
        github.com/fairdatasociety/fairOS-dfs/pkg/collection/kv.go:176 +0x1dc
github.com/fairdatasociety/fairOS-dfs/pkg/dfs.(*DfsAPI).KVCount(0x200c0a0, 0xa9fde00, 0x2c, 0xad82310, 0xc, 0xad82320, 0xa, 0xda6108, 0x7e1f65, 0x3e7530, ...)
        github.com/fairdatasociety/fairOS-dfs/pkg/dfs/kv_api.go:124 +0xd0
github.com/fairdatasociety/fairOS-dfs/pkg/api.(*Handler).KVCountHandler(0x200e090, 0xa184e4, 0xa975d40, 0xac36f80)
        github.com/fairdatasociety/fairOS-dfs/pkg/api/kv_count.go:77 +0x208
net/http.HandlerFunc.ServeHTTP(0x2010760, 0xa184e4, 0xa975d40, 0xac36f80)
        net/http/server.go:2049 +0x34
github.com/fairdatasociety/fairOS-dfs/pkg/api.(*Handler).LoginMiddleware.func1(0xa184e4, 0xa975d40, 0xac36f80)
        github.com/fairdatasociety/fairOS-dfs/pkg/api/login_middleware.go:54 +0x25c
net/http.HandlerFunc.ServeHTTP(0xa9d5700, 0xa184e4, 0xa975d40, 0xac36f80)
        net/http/server.go:2049 +0x34
github.com/fairdatasociety/fairOS-dfs/pkg/api.(*Handler).LogMiddleware.func1(0xa18c00, 0x27f5220, 0xac36f80)
        github.com/fairdatasociety/fairOS-dfs/pkg/api/log_middleware.go:34 +0xac
net/http.HandlerFunc.ServeHTTP(0xa9d5710, 0xa18c00, 0x27f5220, 0xac36f80)
        net/http/server.go:2049 +0x34
github.com/gorilla/mux.(*Router).ServeHTTP(0x207e000, 0xa18c00, 0x27f5220, 0xac36e80)
        github.com/gorilla/[email protected]/mux.go:210 +0x98
github.com/rs/cors.(*Cors).Handler.func1(0xa18c00, 0x27f5220, 0xac36e80)
        github.com/rs/[email protected]/cors.go:219 +0x170
net/http.HandlerFunc.ServeHTTP(0x200f440, 0xa18c00, 0x27f5220, 0xac36e80)
        net/http/server.go:2049 +0x34
net/http.serverHandler.ServeHTTP(0x24bc120, 0xa18c00, 0x27f5220, 0xac36e80)
        net/http/server.go:2867 +0x88
net/http.(*conn).serve(0xa9496e0, 0xa195fc, 0xa98b620)
        net/http/server.go:1932 +0x7f0
created by net/http.(*Server).Serve
        net/http/server.go:2993 +0x318
@IgorShadurin IgorShadurin added bug Something isn't working P1 Priority 1 labels Aug 9, 2021
@asabya
Copy link
Collaborator

asabya commented Jan 13, 2022

closing this for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can't reproduce P1 Priority 1
Projects
None yet
Development

No branches or pull requests

2 participants