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

[Bug]: server/v2/stf: nil deref panic in deliverTx #20663

Closed
1 task done
mark-rushakoff opened this issue Jun 13, 2024 · 2 comments · Fixed by #20724
Closed
1 task done

[Bug]: server/v2/stf: nil deref panic in deliverTx #20663

mark-rushakoff opened this issue Jun 13, 2024 · 2 comments · Fixed by #20724
Labels

Comments

@mark-rushakoff
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

I was tracing through some code and I put in a panic to get a stack trace for a particular execution path. I did not know the panic I added was going to go through (STF).deliverTx. The STF code recovered the panic, but then s.logger.Error caused a nil dereference panic due to s.logger being unset. There appears to be no code path that sets s.logger

This is the line that causes the nil dereference:

s.logger.Error("panic during transaction execution", "error", recoveryError)

This panic would have shown up in test if the recover path were covered.

Cosmos SDK Version

main

How to reproduce?

No response

@julienrbrt
Copy link
Member

+1 runtime should set it. The constructor doesn't have it for some reason.

@tac0turtle
Copy link
Member

we are still writing tests for server/v2 and other componenets in the v2 family. There will be many more things that pop up

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