qingstor / qsctl

Advanced command line tool for QingStor Object Storage.
Apache License 2.0
23 stars 13 forks source link

Data race when cp files #283

Closed Prnyself closed 4 years ago

Prnyself commented 4 years ago

Details list below:

==================
WARNING: DATA RACE
Read at 0x00c0000cc338 by goroutine 27:
  sync.(*WaitGroup).Add()
      internal/race/race.go:37 +0x18d
  github.com/qingstor/qsctl/v2/cmd/qsctl/taskutils.StartProgress()
      github.com/qingstor/qsctl/v2@/cmd/qsctl/taskutils/progress.go:129 +0x588
  main.cpRun.func1()
      github.com/qingstor/qsctl/v2@/cmd/qsctl/cp.go:86 +0x37

Previous write at 0x00c0000cc338 by main goroutine:
  sync.(*WaitGroup).Wait()
      internal/race/race.go:41 +0xee
  github.com/vbauerster/mpb/v4.(*Progress).Wait()
      github.com/vbauerster/mpb/v4@v4.12.2/progress.go:191 +0xfe
  main.cpRun()
      github.com/qingstor/qsctl/v2@/cmd/qsctl/taskutils/progress.go:141 +0x354
  github.com/spf13/cobra.(*Command).execute()
      github.com/spf13/cobra@v0.0.7/command.go:838 +0x523
  github.com/spf13/cobra.(*Command).ExecuteC()
      github.com/spf13/cobra@v0.0.7/command.go:943 +0x479
  main.main()
      github.com/spf13/cobra@v0.0.7/command.go:883 +0xfe

Goroutine 27 (running) created at:
  main.cpRun()
      github.com/qingstor/qsctl/v2@/cmd/qsctl/cp.go:85 +0xa52
  github.com/spf13/cobra.(*Command).execute()
      github.com/spf13/cobra@v0.0.7/command.go:838 +0x523
  github.com/spf13/cobra.(*Command).ExecuteC()
      github.com/spf13/cobra@v0.0.7/command.go:943 +0x479
  main.main()
      github.com/spf13/cobra@v0.0.7/command.go:883 +0xfe
==================
Found 1 data race(s)