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

crash on github.com/aler9/gomavlib/pkg/frame.(*V2Frame).Decode #16

Closed
tubzby opened this issue Nov 25, 2021 · 3 comments
Closed

crash on github.com/aler9/gomavlib/pkg/frame.(*V2Frame).Decode #16

tubzby opened this issue Nov 25, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@tubzby
Copy link

tubzby commented Nov 25, 2021

I'm using this lib to test a px4 UAV, somehow I hit on this crash, two times, no clue yet.

Nov 25 14:57:16 gdcx uavm[208678]: panic: runtime error: slice bounds out of range [:920] with capacity 512
Nov 25 14:57:16 gdcx uavm[208678]: goroutine 1923 [running]:
Nov 25 14:57:16 gdcx uavm[208678]: bufio.(*Reader).Read(0xc0004cfaa0, {0xc0004ae7e0, 0xc0003afe08, 0x44c532})
Nov 25 14:57:16 gdcx uavm[208678]:         /usr/local/go/src/bufio/bufio.go:238 +0x2ed
Nov 25 14:57:16 gdcx uavm[208678]: io.ReadAtLeast({0xd07100, 0xc0004cfaa0}, {0xc0004ae7e0, 0x20, 0x20}, 0x20)
Nov 25 14:57:16 gdcx uavm[208678]:         /usr/local/go/src/io/io.go:328 +0x9a
Nov 25 14:57:16 gdcx uavm[208678]: io.ReadFull(...)
Nov 25 14:57:16 gdcx uavm[208678]:         /usr/local/go/src/io/io.go:347
Nov 25 14:57:16 gdcx uavm[208678]: github.com/aler9/gomavlib/pkg/frame.(*V2Frame).Decode(0xc00031c600, 0x3)
Nov 25 14:57:16 gdcx uavm[208678]:         /Users/liuzhiping/go/pkg/mod/github.com/aler9/[email protected]/pkg/frame/v2.go:141 +0x1f3
Nov 25 14:57:16 gdcx uavm[208678]: github.com/aler9/gomavlib/pkg/transceiver.(*Transceiver).Read(0xc000678b80)
Nov 25 14:57:16 gdcx uavm[208678]:         /Users/liuzhiping/go/pkg/mod/github.com/aler9/[email protected]/pkg/transceiver/transceiver.go:130 +0x79
Nov 25 14:57:16 gdcx uavm[208678]: github.com/aler9/gomavlib.(*Channel).run.func1()
Nov 25 14:57:16 gdcx uavm[208678]:         /Users/liuzhiping/go/pkg/mod/github.com/aler9/[email protected]/channel.go:93 +0xbc
Nov 25 14:57:16 gdcx uavm[208678]: created by github.com/aler9/gomavlib.(*Channel).run
Nov 25 14:57:16 gdcx uavm[208678]:         /Users/liuzhiping/go/pkg/mod/github.com/aler9/[email protected]/channel.go:85 +0xef

go version: 1.17

@tubzby
Copy link
Author

tubzby commented Nov 26, 2021

Hi @aler9 , thanks for your excellent work!
I might have found a bug which I first post it here: golang/go#49795

@aler9 aler9 added the bug Something isn't working label Dec 8, 2021
aler9 added a commit that referenced this issue Dec 8, 2021
@aler9
Copy link
Member

aler9 commented Dec 8, 2021

This have been fixed, thanks for the report, but i have a couple of things to say:

  • next time please share at least the node configuration, otherwise it's nearly impossible to debug the issue.
  • the Golang core library is tested with fuzzy tests and by a huge community, it surely wasn't a Go issue.
  • since you found the solution, you'd better have reported it back.

@aler9 aler9 closed this as completed Dec 8, 2021
@github-actions
Copy link

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants