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

write some code include panic, the stack info will print on terminal #3

Closed
4 tasks
KamiD opened this issue Dec 23, 2019 · 4 comments
Closed
4 tasks
Labels
production Needed to be production ready

Comments

@KamiD
Copy link

KamiD commented Dec 23, 2019

Summary of Bug

I wrote a panic code in contract: 'escrow'. then i deployed on my wasmd. after init, i call contract by
wasmcli tx wasm execute fred $CONTRACT "$APPROVE" -y
The tx was succeed, when i terminate wasmd by ctrl+c, the stack error print on my terminal

Version

  • using branch: master.

  • commit id: d12c434

nothing to show for wasmcli --version and wasmd --version

Steps to Reproduce

  1. add follow code in contract.rs and call it in pub fn handle<T: Storage>
fn try_panic(){
   panic!("panic test!");
} 
  1. compile and deploy it to your own wasmd.
  2. use wasmcli to test contract
  3. switch to wasmd and send ctrl+c to terminate it

The error will showed up


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@ethanfrey
Copy link
Member

Thank you for the report. Can you send a copy of your forked escrow code? And the value of $APPROVE pass in here? wasmcli tx wasm execute fred $CONTRACT "$APPROVE" -y.

The contract should fail. If not, I will investigate further and fix it.

As to the error message / stack trace when hitting ctrl+C, this is an odd known issue that doesn't affect the chain performance but is worrying on restart. I will create a new issue for this.

@workshub
Copy link

workshub bot commented Jan 13, 2020

This issue is now published on WorksHub. If you would like to work on this issue you can
start work on the WorksHub Issue Details page.

@workshub
Copy link

workshub bot commented Feb 8, 2020

@Verdinjoshua26 started working on this issue via WorksHub.

@ethanfrey ethanfrey added the production Needed to be production ready label Jun 15, 2020
@alpe alpe added this to the v1.0.0 milestone Oct 14, 2020
@ethanfrey
Copy link
Member

This has been fixed with wasmer 1.0.0, used by cosmwasm-vm 0.13.

Fix is on master as of #358 and will be on the v0.14.0 release. Took a year, but this looks a lot nicer now.

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

No branches or pull requests

3 participants