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

libp2p数组越界,崩溃 #1000

Closed
wchh opened this issue Feb 23, 2021 · 4 comments · Fixed by #1059
Closed

libp2p数组越界,崩溃 #1000

wchh opened this issue Feb 23, 2021 · 4 comments · Fixed by #1059
Assignees
Labels
Milestone

Comments

@wchh
Copy link

wchh commented Feb 23, 2021

panic: runtime error: slice bounds out of range [:826] with capacity 512
2
3 goroutine 9921985 [running]:
4 github.com/libp2p/go-msgio.(*reader).ReadMsg(0xc00c5d44c0, 0x0, 0x0, 0x0, 0x0, 0x0)
5 D:/goWork/pkg/mod/github.com/libp2p/[email protected]/msgio.go:235 +0x2dc
6 github.com/libp2p/go-libp2p-secio.(*etmReader).fill(0xc0052e34a0, 0x1de, 0x0)
7 D:/goWork/pkg/mod/github.com/libp2p/[email protected]/rw.go:132 +0x3f
8 github.com/libp2p/go-libp2p-secio.(*etmReader).Read(0xc0052e34a0, 0xc00c525cd0, 0xc, 0xc, 0x0, 0x0, 0x0)
9 D:/goWork/pkg/mod/github.com/libp2p/[email protected]/rw.go:171 +0x2a5
10 io.ReadAtLeast(0x2a09e810, 0xc003127000, 0xc00c525cd0, 0xc, 0xc, 0xc, 0xc, 0x0, 0x0)
11 C:/Go/src/io/io.go:310 +0x8e
12 io.ReadFull(...)
13 C:/Go/src/io/io.go:329
14 github.com/libp2p/go-yamux.(*Session).recvLoop(0xc000131ce0, 0x0, 0x0)
15 D:/goWork/pkg/mod/github.com/libp2p/[email protected]/session.go:526 +0xe1
16 github.com/libp2p/go-yamux.(*Session).recv(0xc000131ce0)
17 D:/goWork/pkg/mod/github.com/libp2p/[email protected]/session.go:505 +0x32
18 created by github.com/libp2p/go-yamux.newSession
19 D:/goWork/pkg/mod/github.com/libp2p/[email protected]/session.go:125 +0x380
20 panic: runtime error: slice bounds out of range [:2158] with capacity 2048

@libangzhu
Copy link
Contributor

这个是数据读取到buf中,并越界了。先确认下有没有存在多个goroutine同时对某个stream流进行读或者写,很有可能是这个问题导致的

@yann-sjtu
Copy link
Collaborator

老版本libp2p的bug
libp2p/go-libp2p#1108

@33cn
Copy link
Owner

33cn commented Oct 15, 2021

🎉 This issue has been resolved in version 1.66.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@33cn 33cn added the released label Oct 15, 2021
@33cn
Copy link
Owner

33cn commented Oct 15, 2021

🎉 This issue has been resolved in version 1.66.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

5 participants