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

Data Race in SSH Managed Transport #402

Closed
pjbgf opened this issue Jul 1, 2022 · 1 comment
Closed

Data Race in SSH Managed Transport #402

pjbgf opened this issue Jul 1, 2022 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@pjbgf
Copy link
Member

pjbgf commented Jul 1, 2022

Intermittently a data race is being detected when running the controller's tests:

==================
WARNING: DATA RACE
Write at 0x00c000a63dc0 by goroutine 88:
  github.com/fluxcd/source-controller/pkg/git/libgit2/managed.(*sshSmartSubtransport).Close()
      /home/runner/go/pkg/mod/github.com/fluxcd/source-controller@v0.25.7/pkg/git/libgit2/managed/ssh.go:314 +0x97
  github.com/fluxcd/source-controller/pkg/git/libgit2/managed.(*sshSmartSubtransport).Action.func3()
      /home/runner/go/pkg/mod/github.com/fluxcd/source-controller@v0.25.7/pkg/git/libgit2/managed/ssh.go:252 +0x325
  github.com/fluxcd/source-controller/pkg/git/libgit2/managed.(*sshSmartSubtransport).Action·dwrap·2()
      /home/runner/go/pkg/mod/github.com/fluxcd/source-controller@v0.25.7/pkg/git/libgit2/managed/ssh.go:267 +0x39
Previous write at 0x00c000a63dc0 by goroutine 155:
  github.com/fluxcd/source-controller/pkg/git/libgit2/managed.(*sshSmartSubtransport).Close()
      /home/runner/go/pkg/mod/github.com/fluxcd/source-controller@v0.25.7/pkg/git/libgit2/managed/ssh.go:314 +0x97
  github.com/libgit2/git2go/v33.smartSubtransportCloseCallback()
      /home/runner/go/pkg/mod/github.com/libgit2/git2go/v33@v33.0.9/transport.go:409 +0x10d
  _cgoexp_2c6025d51ecc_smartSubtransportCloseCallback()
      _cgo_gotypes.go:9438 +0x5b
  runtime.cgocallbackg1()
      /opt/hostedtoolcache/go/1.17.11/x64/src/runtime/cgocall.go:306 +0x2ab
  github.com/libgit2/git2go/v33.(*Remote).Fetch.func2()
      /home/runner/go/pkg/mod/github.com/libgit2/git2go/v33@v33.0.9/remote.go:1044 +0xc9
  github.com/libgit2/git2go/v33.(*Remote).Fetch()
      /home/runner/go/pkg/mod/github.com/libgit2/git2go/v33@v33.0.9/remote.go:1044 +0x317
  github.com/fluxcd/source-controller/pkg/git/libgit2.(*CheckoutBranch).Checkout()

https://github.com/fluxcd/image-automation-controller/runs/7002619539?check_suite_focus=true

Fixed by #430.

@pjbgf pjbgf added the bug Something isn't working label Jul 1, 2022
@pjbgf pjbgf added this to the GA milestone Sep 3, 2022
@pjbgf pjbgf moved this to Up-Next in Maintainers' Focus Sep 3, 2022
@pjbgf pjbgf moved this from Up-Next to In Progress in Maintainers' Focus Sep 6, 2022
@pjbgf
Copy link
Member Author

pjbgf commented Oct 6, 2022

Closing this as it is technically done as part of git-refactoring. It will merge into main as part of fluxcd/pkg#245, so we can track that issue instead.

@pjbgf pjbgf closed this as completed Oct 6, 2022
Repository owner moved this from In Progress to Since Last Dev Meeting in Maintainers' Focus Oct 6, 2022
@pjbgf pjbgf moved this from Since Last Dev Meeting to Done in Maintainers' Focus Oct 12, 2022
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: Done
Development

No branches or pull requests

2 participants