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

gnomod: Infinite loop when a requested package does not exist. #835

Closed
ajnavarro opened this issue May 19, 2023 · 0 comments · Fixed by #1317
Closed

gnomod: Infinite loop when a requested package does not exist. #835

ajnavarro opened this issue May 19, 2023 · 0 comments · Fixed by #1317
Labels
🐞 bug Something isn't working

Comments

@ajnavarro
Copy link
Contributor

ajnavarro commented May 19, 2023

Infinite loop when a requested package does not exist.

Description

Due to the internal logic used when fetching a package, specifically when calling writePackage method, if the requested package does not exist, there is no error, and filename is empty, causing another call to writePackage repeating the cycle, causing an infinite loop.

Your environment

  • Linux pop-os 6.2.6-76060206-generic x86_64 GNU/Linux
  • branch that causes this issue (with the commit hash): master: cc6d351

Steps to reproduce

Draft PR with the failing case: #834

Expected behavior

Do not create an infinite loop

Actual behavior

It is looping until OOM or stack overflow.

CC @harry-hov

@ajnavarro ajnavarro added the 🐞 bug Something isn't working label May 19, 2023
@moul moul moved this to 🏆 Needed for Launch in 🚀 The Launch [DEPRECATED] Sep 5, 2023
@moul moul added this to the 🚀 main.gno.land milestone Sep 6, 2023
harry-hov added a commit that referenced this issue Nov 8, 2023
Add test for package does not exist.

Not able to reproduce `Infinite loop when a requested package does not
exist` (#835)
moul pushed a commit to moul/gno that referenced this issue Nov 14, 2023
Add test for package does not exist.

Not able to reproduce `Infinite loop when a requested package does not
exist` (gnolang#835)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
Status: 🚀 Needed for Launch
Development

Successfully merging a pull request may close this issue.

2 participants