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

Fix race condition in DefaultOnWidthChanged #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kylecarbs
Copy link

==================
WARNING: DATA RACE
Write at 0x0000017ecc40 by goroutine 57:
  github.com/chzyer/readline.DefaultOnWidthChanged()
      /home/runner/go/pkg/mod/github.com/chzyer/[email protected]/utils_unix.go:68 +0x30
  github.com/chzyer/readline.NewOperation()
      /home/runner/go/pkg/mod/github.com/chzyer/[email protected]/operation.go:82 +0x84c
  github.com/chzyer/readline.(*Terminal).Readline()
      /home/runner/go/pkg/mod/github.com/chzyer/[email protected]/terminal.go:95 +0x5b
  github.com/chzyer/readline.NewEx()
      /home/runner/go/pkg/mod/github.com/chzyer/[email protected]/readline.go:167 +0x41
  github.com/manifoldco/promptui.(*Prompt).Run()
      /home/runner/go/pkg/mod/github.com/kylecarbs/[email protected][119](https://github.com/coder/coder/runs/5152098085?check_suite_focus=true#step:7:119)0244-d8f2159af2b2/prompt.go:142 +0x35a
  github.com/coder/coder/cli.prompt()
      /home/runner/work/coder/coder/cli/root.go:178 +0x9b2
  github.com/coder/coder/cli.projectCreate.func1()
      /home/runner/work/coder/coder/cli/projectcreate.go:44 +0x364
  github.com/spf13/cobra.(*Command).execute()
      /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0xa7d
  github.com/spf13/cobra.(*Command).ExecuteC()
      /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x5da
  github.com/spf13/cobra.(*Command).Execute()
      /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:902 +0x44
  github.com/coder/coder/cli_test.TestProjectCreate.func2.1()
      /home/runner/work/coder/coder/cli/projectcreate_test.go:83 +0x39

Previous write at 0x0000017ecc40 by goroutine 46:
  github.com/chzyer/readline.DefaultOnWidthChanged()
      /home/runner/go/pkg/mod/github.com/chzyer/[email protected]/utils_unix.go:68 +0x30
  github.com/chzyer/readline.NewOperation()
      /home/runner/go/pkg/mod/github.com/chzyer/[email protected]/operation.go:82 +0x84c
  github.com/chzyer/readline.(*Terminal).Readline()
      /home/runner/go/pkg/mod/github.com/chzyer/[email protected]/terminal.go:95 +0x5b
  github.com/chzyer/readline.NewEx()
      /home/runner/go/pkg/mod/github.com/chzyer/[email protected]/readline.go:167 +0x41
  github.com/manifoldco/promptui.(*Prompt).Run()
      /home/runner/go/pkg/mod/github.com/kylecarbs/[email protected][123](https://github.com/coder/coder/runs/5152098085?check_suite_focus=true#step:7:123)1190244-d8f2[159](https://github.com/coder/coder/runs/5152098085?check_suite_focus=true#step:7:159)af2b2/prompt.go:142 +0x35a
  github.com/coder/coder/cli.prompt()
      /home/runner/work/coder/coder/cli/root.go:178 +0x9b2
  github.com/coder/coder/cli.projectCreate.func1()
      /home/runner/work/coder/coder/cli/projectcreate.go:44 +0x364
  github.com/spf13/cobra.(*Command).execute()
      /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0xa7d
  github.com/spf13/cobra.(*Command).ExecuteC()
      /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x5da
  github.com/spf13/cobra.(*Command).Execute()
      /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:902 +0x44
  github.com/coder/coder/cli_test.TestProjectCreate.func1.1()
      /home/runner/work/coder/coder/cli/projectcreate_test.go:34 +0x39

@kylecarbs
Copy link
Author

@chzyer any shot we could get this merged? It'd help us not have to fork.

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

Successfully merging this pull request may close these issues.

1 participant