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

Panic while trying to access a reference via bzz #4935

Open
darkobas2 opened this issue Dec 18, 2024 · 2 comments
Open

Panic while trying to access a reference via bzz #4935

darkobas2 opened this issue Dec 18, 2024 · 2 comments
Assignees
Labels
needs-triaging new issues that need triaging

Comments

@darkobas2
Copy link
Contributor

Bee 2.3.1

Reference: /bzz/71136b038a5c68c5c19a341cbd82a46966811a6ab5ef41eaa8164cd95d2ad12c

result:
Error Level: error
Logger: node
Message: http: panic serving 127.0.0.1:33180:
runtime error: slice bounds out of range [:160] with capacity 152

Goroutine: 358960352 (running)

Stack Trace:

  • net/http.(*conn).serve.func1()
    net/http/server.go:1947 +0xbe
  • panic({0x153a680?, 0xc001ed15d8?})
    runtime/panic.go:785 +0x132
  • github.com/ethersphere/bee/v2/pkg/file.ChunkAddresses(...)
    github.com/ethersphere/bee/v2/pkg/file/utils.go:39
@darkobas2 darkobas2 added the needs-triaging new issues that need triaging label Dec 18, 2024
@Cafe137
Copy link

Cafe137 commented Jan 22, 2025

In my case it is supposed to be a feed: f69f6bf21e4e97abef7fb52239265373479f14309d70f98f81a335936dd21d8b

"time"="2025-01-22 13:01:13.151150" "level"="error" "logger"="node" "msg"="http: panic serving 127.0.0.1:63738: runtime error: slice bounds out of range [:160] with capacity 137
goroutine 37979 [running]:
net/http.(*conn).serve.func1()
    net/http/server.go:1947 +0xb0
panic({0x1015ff300?, 0x14007280228?})
    runtime/panic.go:785 +0x124
github.com/ethersphere/bee/v2/pkg/file.ChunkAddresses(...)
    github.com/ethersphere/bee/v2/pkg/file/utils.go:39
github.com/ethersphere/bee/v2/pkg/file/joiner.(*joiner).readAtOffset(0x140018d8800, {0x140021cd000, 0x1000, 0x1000}, {0x140009a25a8, 0x89, 0x89}, 0x0, 0x20cc32674a7da, 0x0, ...)
    github.com/ethersphere/bee/v2/pkg/file/joiner/joiner.go:236 +0x6a4
github.com/ethersphere/bee/v2/pkg/file/joiner.(*joiner).ReadAt(0x140018d8800, {0x140021cd000, 0x1000, 0x1000}, 0x0)
    github.com/ethersphere/bee/v2/pkg/file/joiner/joiner.go:195 +0xb4
github.com/ethersphere/bee/v2/pkg/file/joiner.(*joiner).Read(0x140018d8800, {0x140021cd000?, 0x12948e2f8?, 0x30?})
    github.com/ethersphere/bee/v2/pkg/file/joiner/joiner.go:174 +0x28
github.com/ethersphere/bee/v2/pkg/file.JoinReadAll({0x1016caf88?, 0x14006fbb980?}, {0x1016cdd20, 0x140018d8800}, {0x1016bd280, 0x140043ac960})
    github.com/ethersphere/bee/v2/pkg/file/io.go:56 +0xa0
github.com/ethersphere/bee/v2/pkg/file/loadsave.(*loadSave).Load(0x14007c36af8?, {0x1016caf88, 0x14006fbb980}, {0x140017b39c0?, 0x14007c36b00?, 0x140005a0008?})
    github.com/ethersphere/bee/v2/pkg/file/loadsave/loadsave.go:78 +0x178
github.com/ethersphere/bee/v2/pkg/manifest/mantaray.(*Node).load(0x14002a9a2a0, {0x1016caf88?, 0x14006fbb980?}, {0x1292232e0?, 0x140098a5300?})
    github.com/ethersphere/bee/v2/pkg/manifest/mantaray/persist.go:48 +0x58
github.com/ethersphere/bee/v2/pkg/manifest/mantaray.(*Node).LookupNode(0x14002a9a2a0, {0x1016caf88, 0x14006fbb980}, {0x14003b28960, 0x1, 0x8}, {0x1292232e0, 0x140098a5300})
    github.com/ethersphere/bee/v2/pkg/manifest/mantaray/node.go:156 +0x78
github.com/ethersphere/bee/v2/pkg/manifest.(*mantarayManifest).Lookup(0x14007ce75c0, {0x1016caf88, 0x14006fbb980}, {0x10134f6f0?, 0x18?})
    github.com/ethersphere/bee/v2/pkg/manifest/mantaray.go:89 +0x8c
github.com/ethersphere/bee/v2/pkg/api.(*Service).manifestFeed(0x14000830388, {0x1016caf88?, 0x14006fbb980?}, {0x1016d2e40?, 0x14007ce75c0?})
    github.com/ethersphere/bee/v2/pkg/api/bzz.go:668 +0x48
github.com/ethersphere/bee/v2/pkg/api.(*Service).serveReference(0x14000830388, {0x1016d85c8, 0x14001784be0}, {{0x140017b39c0?, 0x14006fbb7a0?, 0x10141d1c0?}}, {0x1400342d1a4, 0x0}, {0x1016c7de0, 0x14000401620}, ...)
    github.com/ethersphere/bee/v2/pkg/api/bzz.go:414 +0x2fc
github.com/ethersphere/bee/v2/pkg/api.(*Service).bzzDownloadHandler(0x14000830388, {0x1016c7de0, 0x14000401620}, 0x14004958dc0)
    github.com/ethersphere/bee/v2/pkg/api/bzz.go:335 +0x2c4
net/http.HandlerFunc.ServeHTTP(0x14000830388?, {0x1016c7de0?, 0x14000401620?}, 0x10141d1c0?)
    net/http/server.go:2220 +0x38
github.com/ethersphere/bee/v2/pkg/api.(*Service).mountAPI.(*Service).actDecryptionHandler.func33.1({0x1016c7de0, 0x14000401620}, 0x14004958dc0)
    github.com/ethersphere/bee/v2/pkg/api/accesscontrol.go:115 +0x450
net/http.HandlerFunc.ServeHTTP(0x14004958c80?, {0x1016c7de0?, 0x14000401620?}, 0x14006fbb530?)
    net/http/server.go:2220 +0x38
github.com/ethersphere/bee/v2/pkg/api.(*Service).mountAPI.(*Service).newTracingHandler.func32.1({0x1016c7de0, 0x14000401620}, 0x14004958c80)
    github.com/ethersphere/bee/v2/pkg/api/api.go:467 +0x374
net/http.HandlerFunc.ServeHTTP(0x10210d100?, {0x1016c7de0?, 0x14000401620?}, 0x140034eb1a0?)
    net/http/server.go:2220 +0x38
github.com/ethersphere/bee/v2/pkg/api.(*Service).mountAPI.(*Service).contentLengthMetricMiddleware.func31.1({0x1016c7de0, 0x14000401620}, 0x14004958c80)
    github.com/ethersphere/bee/v2/pkg/api/api.go:476 +0x70
net/http.HandlerFunc.ServeHTTP(0x1014b2520?, {0x1016c7de0?, 0x14000401620?}, 0x3?)
    net/http/server.go:2220 +0x38
github.com/ethersphere/bee/v2/pkg/jsonhttp.HandleMethods(0x14002a3cdb0, {0x100f1f369, 0x2b}, {0x100f06b2c, 0x1f}, {0x1016c7de0, 0x14000401620}, 0x14004958c80)
    github.com/ethersphere/bee/v2/pkg/jsonhttp/handlers.go:25 +0xf0
github.com/ethersphere/bee/v2/pkg/jsonhttp.MethodHandler.ServeHTTP(0x1016caf88?, {0x1016c7de0?, 0x14000401620?}, 0x10134b080?)
    github.com/ethersphere/bee/v2/pkg/jsonhttp/handlers.go:17 +0x50
github.com/ethersphere/bee/v2/pkg/api.(*Service).mountAPI.func3.(*Service).checkRouteAvailability.1({0x1016c7de0?, 0x14000401620?}, 0x94?)
    github.com/ethersphere/bee/v2/pkg/api/router.go:185 +0x4c
net/http.HandlerFunc.ServeHTTP(0x14004958b40?, {0x1016c7de0?, 0x14000401620?}, 0x30?)
    net/http/server.go:2220 +0x38
github.com/gorilla/mux.(*Router).ServeHTTP(0x140001cc480, {0x1016c7de0, 0x14000401620}, 0x14004958780)
    github.com/gorilla/[email protected]/mux.go:210 +0x194
github.com/ethersphere/bee/v2/pkg/api.(*Service).corsHandler.func1({0x1016c7de0, 0x14000401620}, 0x14004958780)
    github.com/ethersphere/bee/v2/pkg/api/api.go:543 +0x418
net/http.HandlerFunc.ServeHTTP(0x0?, {0x1016c7de0?, 0x14000401620?}, 0x100dd81a8?)
    net/http/server.go:2220 +0x38
github.com/ethersphere/bee/v2/pkg/api.(*Service).pageviewMetricsHandler-fm.(*Service).pageviewMetricsHandler.func1({0x1016c7de0, 0x14000401620}, 0x14004958780)
    github.com/ethersphere/bee/v2/pkg/api/metrics.go:89 +0x84
net/http.HandlerFunc.ServeHTTP(0x1016c7e40?, {0x1016c7de0?, 0x14000401620?}, 0x14000401600?)
    net/http/server.go:2220 +0x38
github.com/ethersphere/bee/v2/pkg/api.(*Service).responseCodeMetricsHandler-fm.(*Service).responseCodeMetricsHandler.func1({0x1016c7e40?, 0x14000401600?}, 0x14004958780)
    github.com/ethersphere/bee/v2/pkg/api/metrics.go:97 +0x6c
net/http.HandlerFunc.ServeHTTP(0x10024ea30?, {0x1016c7e40?, 0x14000401600?}, 0x140005a0008?)
    net/http/server.go:2220 +0x38
github.com/ethersphere/bee/v2/pkg/api.(*Service).EnableFullAPI.func1.1({0x1016c7e40, 0x14000401600}, 0x14004958780)
    github.com/ethersphere/bee/v2/pkg/api/router.go:81 +0x17c
net/http.HandlerFunc.ServeHTTP(0x10?, {0x1016c7e40?, 0x14000401600?}, 0x10023f3ac?)
    net/http/server.go:2220 +0x38
github.com/ethersphere/bee/v2/pkg/api.(*Service).EnableFullAPI.NewHTTPAccessLogHandler.func2.1({0x1016c7cf0?, 0x140032707e0?}, 0x14004958780)
    github.com/ethersphere/bee/v2/pkg/log/httpaccess/http_access.go:41 +0xfc
net/http.HandlerFunc.ServeHTTP(0x14002d8cb78?, {0x1016c7cf0?, 0x140032707e0?}, 0x1005ccf64?)
    net/http/server.go:2220 +0x38
net/http.serverHandler.ServeHTTP({0x14006fbb500?}, {0x1016c7cf0?, 0x140032707e0?}, 0x6?)
    net/http/server.go:3210 +0xbc
net/http.(*conn).serve(0x14004d0eea0, {0x1016caf88, 0x1400039cde0})
    net/http/server.go:2092 +0x4fc
created by net/http.(*Server).Serve in goroutine 100
    net/http/server.go:3360 +0x3dc
"

@Cafe137
Copy link

Cafe137 commented Jan 23, 2025

Update: Feeds are resolvable through their manifest address - the panic happens when trying to resolve it via feed address, which is unsupported AFAIK, but the panic still should not happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triaging new issues that need triaging
Projects
None yet
Development

No branches or pull requests

3 participants