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

chore: stop recursive loop in TypeInfo error print #1219

Closed
wants to merge 1 commit into from

Conversation

piux2
Copy link
Contributor

@piux2 piux2 commented Oct 10, 2023

Fix the second issue in #1197

  • Before fix, if a Amino type was not imported as registered Amino package, we got stack overflow

runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc02050c458 stack=[0xc02050c000, 0xc04050c000]
fatal error: stack overflow

  • After fix, if a Amino type was not imported as registered Amino package, we could print the message to verify what has been imported for debugging purpose

Error: unable to unmarshal with amino, unmarshal to std.Tx failed after 17 bytes (error reading slice contents: unrecognized concrete type full name vm.m_call of map[abci.BlockParams:TypeInfo{Type:abci.BlockParams,Registered:true,PointerPreferred:false,TypeURL:"/abci.BlockParams",ReprType:,Fields:[]amino.FieldInfo{amino.FieldInfo{Type:(*reflect.rtype)(0x104cfc920), TypeInfo:(*amino.TypeInfo)(0x1400011c6e0), Name:"MaxTxBytes", Index:0, ........

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

Fix the second issue in gnolang#1197

- Before fix, if a Amino type was not imported as registered Amino package, we got stack overflow 

runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc02050c458 stack=[0xc02050c000, 0xc04050c000]
fatal error: stack overflow

- After fix, if a Amino type was not imported as registered Amino package, we could print the message to verify what has been imported for debugging purpose

Error: unable to unmarshal with amino, unmarshal to std.Tx failed after 17 bytes (error reading slice contents: unrecognized concrete type full name vm.m_call of map[abci.BlockParams:TypeInfo{Type:abci.BlockParams,Registered:true,PointerPreferred:false,TypeURL:"/abci.BlockParams",ReprType:,Fields:[]amino.FieldInfo{amino.FieldInfo{Type:(*reflect.rtype)(0x104cfc920), TypeInfo:(*amino.TypeInfo)(0x1400011c6e0), Name:"MaxTxBytes", Index:0, ........
@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Oct 10, 2023
@thehowl thehowl marked this pull request as draft March 4, 2024 20:11
@thehowl
Copy link
Member

thehowl commented Mar 4, 2024

Moving to draft (PR is old; the CI fails on build)

@piux2
Copy link
Contributor Author

piux2 commented Apr 9, 2024

Closing this, here is a better solution: #1315

@piux2 piux2 closed this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related
Projects
Status: Done
Status: 🚀 Needed for Launch
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants