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

keys parse hangs forever with no default switch during GetSealedConfig #9560

Closed
4 tasks
okwme opened this issue Jun 22, 2021 · 3 comments
Closed
4 tasks

keys parse hangs forever with no default switch during GetSealedConfig #9560

okwme opened this issue Jun 22, 2021 · 3 comments

Comments

@okwme
Copy link
Contributor

okwme commented Jun 22, 2021

Summary of Bug

I'm trying to run the command:

gaiad keys parse cosmos1k749ve39lqde8rmkttjsf7dr5u6ag8nur9qldy

but it hangs forever. Digging into the key command it looks like this line 60 in /types/config.go:

// GetSealedConfig returns the config instance for the SDK if/once it is sealed.
func GetSealedConfig(ctx context.Context) (*Config, error) {
	config := GetConfig()
	select {
	case <-config.sealedch:
		return config, nil
	case <-ctx.Done():
		return nil, ctx.Err()
	}
}

Neither of the select statements ever finalize and so the command hangs. When I change it to:

// GetSealedConfig returns the config instance for the SDK if/once it is sealed.
func GetSealedConfig(ctx context.Context) (*Config, error) {
	config := GetConfig()
	select {
	case <-config.sealedch:
		return config, nil
	case <-ctx.Done():
		return nil, ctx.Err()
	default:
		return nil, errors.New("whyyyy")
	}
}

I see the "whyyyy" error.

Version

I'm using a custom built version of gaia and tried it with cosmos sdk v0.42.4 as well as with v0.42.6 the error happens in both builds for me

Steps to Reproduce


For Admin Use

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

Is this a duplicate of #8572?

Maybe we should backport the PR to 0.42

@amaury1093
Copy link
Contributor

amaury1093 commented Jun 22, 2021

backport PR: #9561

@okwme
Copy link
Contributor Author

okwme commented Jun 22, 2021

beautiful! ty

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

No branches or pull requests

2 participants