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

API method doc/count crashing the server #101

Closed
IgorShadurin opened this issue Aug 12, 2021 · 6 comments
Closed

API method doc/count crashing the server #101

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

Comments

@IgorShadurin
Copy link
Collaborator

1 - Login, create pod, doc, put doc
2 - Call doc/count

Get error:

time="2021-08-12T14:31:04Z" level=info msg="counting document db: my_doc"
time="2021-08-12T14:31:04Z" level=info msg="loading Manifest: 940d57f6c16cmy_docid"
time="2021-08-12T14:31:04Z" level=debug msg="download chunk: " duration=1.957391ms reference=c437262dca5bb9a0d3f32a5850b0e12536ff9cd0f6cc219b38c5137a3e6235ca
time="2021-08-12T14:31:04Z" level=debug msg="download blob: " duration=4.222944ms reference=2972a96d1da706424995a44a2f81c4bb18b6bd6e0ffd9be3c8056fa96d4cfad6 size=179
2021/08/12 14:31:04 http: panic serving 192.168.100.6:50383: unaligned 64-bit atomic operation
goroutine 701 [running]:
net/http.(*conn).serve.func1(0x2abcba0)
        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(0x2e4e2bc, 0x1, 0x0, 0x28406c0, 0x50)
        runtime/internal/atomic/asm_arm.s:233 +0x14
github.com/fairdatasociety/fairOS-dfs/pkg/collection.(*Index).loadIndexAndCount(0x2e4e280, 0xa1959c, 0x2b63f60, 0x2a919e0, 0x2ea05f0, 0x28f5470, 0x2891800)
        github.com/fairdatasociety/fairOS-dfs/pkg/collection/index.go:228 +0x228
github.com/fairdatasociety/fairOS-dfs/pkg/collection.(*Index).CountIndex(0x2e4e280, 0x0, 0x0, 0x0, 0x0)
        github.com/fairdatasociety/fairOS-dfs/pkg/collection/index.go:194 +0x110
github.com/fairdatasociety/fairOS-dfs/pkg/collection.(*Document).Count(0x294bf20, 0x2afc7b0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2abcfc0)
        github.com/fairdatasociety/fairOS-dfs/pkg/collection/document.go:343 +0x1f4
github.com/fairdatasociety/fairOS-dfs/pkg/dfs.(*DfsAPI).DocCount(0x2a9a080, 0x2b90e70, 0x2c, 0x2afc7a0, 0xc, 0x2afc7b0, 0x6, 0x0, 0x0, 0x0, ...)
        github.com/fairdatasociety/fairOS-dfs/pkg/dfs/doc_api.go:125 +0xe0
github.com/fairdatasociety/fairOS-dfs/pkg/api.(*Handler).DocCountHandler(0x2a96060, 0xa184e4, 0x2928f30, 0x2d7e580)
        github.com/fairdatasociety/fairOS-dfs/pkg/api/doc_count.go:81 +0x228
net/http.HandlerFunc.ServeHTTP(0x2a90948, 0xa184e4, 0x2928f30, 0x2d7e580)
        net/http/server.go:2049 +0x34
github.com/fairdatasociety/fairOS-dfs/pkg/api.(*Handler).LoginMiddleware.func1(0xa184e4, 0x2928f30, 0x2d7e580)
        github.com/fairdatasociety/fairOS-dfs/pkg/api/login_middleware.go:54 +0x25c
net/http.HandlerFunc.ServeHTTP(0x280e8b0, 0xa184e4, 0x2928f30, 0x2d7e580)
        net/http/server.go:2049 +0x34
github.com/fairdatasociety/fairOS-dfs/pkg/api.(*Handler).LogMiddleware.func1(0xa18c00, 0x2bca140, 0x2d7e580)
        github.com/fairdatasociety/fairOS-dfs/pkg/api/log_middleware.go:34 +0xac
net/http.HandlerFunc.ServeHTTP(0x280e8c0, 0xa18c00, 0x2bca140, 0x2d7e580)
        net/http/server.go:2049 +0x34
github.com/gorilla/mux.(*Router).ServeHTTP(0x2abc000, 0xa18c00, 0x2bca140, 0x2d7e480)
        github.com/gorilla/[email protected]/mux.go:210 +0x98
github.com/rs/cors.(*Cors).Handler.func1(0xa18c00, 0x2bca140, 0x2d7e480)
        github.com/rs/[email protected]/cors.go:219 +0x170
net/http.HandlerFunc.ServeHTTP(0x2a97410, 0xa18c00, 0x2bca140, 0x2d7e480)
        net/http/server.go:2049 +0x34
net/http.serverHandler.ServeHTTP(0x2ac6120, 0xa18c00, 0x2bca140, 0x2d7e480)
        net/http/server.go:2867 +0x88
net/http.(*conn).serve(0x2abcba0, 0xa195fc, 0x2ab4760)
        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 12, 2021
@asabya
Copy link
Collaborator

asabya commented Jan 13, 2022

closing this for now

@asabya asabya closed this as completed Jan 13, 2022
@tfius
Copy link
Contributor

tfius commented Jan 17, 2022

seems like value is 32bit somewhere

@tfius tfius reopened this Jan 17, 2022
@tfius
Copy link
Contributor

tfius commented Jan 17, 2022

this is connected to #95

@tfius
Copy link
Contributor

tfius commented Jan 17, 2022

@IgorShadurin where did you run this ? on 32bit system ?

@asabya
Copy link
Collaborator

asabya commented Jan 28, 2022

The issue might be caused on arm or 32bit system or both.
Adding golang issues to keep track.
golang/go#11891
golang/go#599
golang/go#23345
golang/go#36606

@asabya
Copy link
Collaborator

asabya commented Dec 22, 2022

Closing it for now. Feel free to open it, if the issue still persists.

@asabya asabya closed this as completed Dec 22, 2022
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

3 participants