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]: Node is creating multiple temp directories on command executions #3348

Closed
1 task done
harish551 opened this issue Sep 19, 2024 · 2 comments · Fixed by #3349
Closed
1 task done

[Bug]: Node is creating multiple temp directories on command executions #3348

harish551 opened this issue Sep 19, 2024 · 2 comments · Fixed by #3349
Assignees
Labels
type: bug Issues that need priority attention -- something isn't working

Comments

@harish551
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

In latest versions of code while we are using a temp dir for queries or any kind of command executions
node is trying to create a temp directory but these are not removing after executing folders still exists on temp folder

https://github.com/cosmos/gaia/blob/main/cmd/gaiad/cmd/root.go#L437

var tempDir = func() string {
	dir, err := os.MkdirTemp("", ".gaia")
	if err != nil {
		dir = gaia.DefaultNodeHome
	}
	defer os.RemoveAll(dir)

	return dir
}

This function will remove node home if there is problem with creating temp directory
it happened to me multiple times when the server's disk is full (it will completely erase node home)

Gaia Version

v19.0.0, v20.0.0

How to reproduce?

check tmp folder after executing some queries
you will find lot of .gaia-temp** folders

@harish551 harish551 added status: waiting-triage This issue/PR has not yet been triaged by the team. type: bug Issues that need priority attention -- something isn't working labels Sep 19, 2024
@github-project-automation github-project-automation bot moved this to 🩹 F1: Triage in Cosmos Hub Sep 19, 2024
@harish551 harish551 changed the title [Bug]: Node is creating TempDir on every command execution [Bug]: Node is creating multiple temp directories on command executions Sep 19, 2024
@MSalopek MSalopek removed the status: waiting-triage This issue/PR has not yet been triaged by the team. label Sep 19, 2024
@MSalopek
Copy link
Contributor

Thank you for reporting this.

This was confirmed as an issue and will be scheduled for fixing.

If this is posing issues for your current setup, you can modify the init procedure in your root.go - the change does not affect node state.

@harish551
Copy link
Author

Okay thank you

I've already worked on this fix for omniflixhub

OmniFlix/omniflixhub#190

@bermuell bermuell self-assigned this Sep 19, 2024
@bermuell bermuell moved this from 🩹 F1: Triage to 🏗 F3: InProgress in Cosmos Hub Sep 19, 2024
@bermuell bermuell moved this from 🏗 F3: InProgress to 👀 F3: InReview in Cosmos Hub Sep 19, 2024
@github-project-automation github-project-automation bot moved this from 👀 F3: InReview to 👍 F4: Assessment in Cosmos Hub Sep 20, 2024
@mpoke mpoke moved this from 👍 F4: Assessment to ✅ Done in Cosmos Hub Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Issues that need priority attention -- something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants