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]: race condition for mongo password in proxy/integrations package #1728

Closed
1 task done
re-Tick opened this issue Mar 27, 2024 · 0 comments · Fixed by #1729
Closed
1 task done

[bug]: race condition for mongo password in proxy/integrations package #1728

re-Tick opened this issue Mar 27, 2024 · 0 comments · Fixed by #1729
Assignees
Labels
bug Something isn't working keploy

Comments

@re-Tick
Copy link
Contributor

re-Tick commented Mar 27, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I run test for the recorded test cases and build the Keploy binary locally with race flag, there is a warning log:

==================
WARNING: DATA RACE
Write at 0x000003a502a0 by goroutine 55:
  go.keploy.io/server/v2/pkg/core/proxy/integrations/mongo.(*Mongo).MockOutgoing()
      /Users/ritikjain/Desktop/keploy-workspace/keploy-refactor/keploy/pkg/core/proxy/integrations/mongo/mongo.go:63 +0x78
  go.keploy.io/server/v2/pkg/core/proxy.(*Proxy).handleConnection()
      /Users/ritikjain/Desktop/keploy-workspace/keploy-refactor/keploy/pkg/core/proxy/proxy.go:464 +0x39fc
  go.keploy.io/server/v2/pkg/core/proxy.(*Proxy).start.func4()
      /Users/ritikjain/Desktop/keploy-workspace/keploy-refactor/keploy/pkg/core/proxy/proxy.go:237 +0xbc
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/ritikjain.linux/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x7c

Previous write at 0x000003a502a0 by goroutine 57:
  go.keploy.io/server/v2/pkg/core/proxy/integrations/mongo.(*Mongo).MockOutgoing()
      /Users/ritikjain/Desktop/keploy-workspace/keploy-refactor/keploy/pkg/core/proxy/integrations/mongo/mongo.go:63 +0x78
  go.keploy.io/server/v2/pkg/core/proxy.(*Proxy).handleConnection()
      /Users/ritikjain/Desktop/keploy-workspace/keploy-refactor/keploy/pkg/core/proxy/proxy.go:464 +0x39fc
  go.keploy.io/server/v2/pkg/core/proxy.(*Proxy).start.func4()
      /Users/ritikjain/Desktop/keploy-workspace/keploy-refactor/keploy/pkg/core/proxy/proxy.go:237 +0xbc
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/ritikjain.linux/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x7c

Goroutine 55 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /home/ritikjain.linux/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:75 +0x10c
  go.keploy.io/server/v2/pkg/core/proxy.(*Proxy).start()
      /Users/ritikjain/Desktop/keploy-workspace/keploy-refactor/keploy/pkg/core/proxy/proxy.go:235 +0x418
  go.keploy.io/server/v2/pkg/core/proxy.(*Proxy).StartProxy.func1()
      /Users/ritikjain/Desktop/keploy-workspace/keploy-refactor/keploy/pkg/core/proxy/proxy.go:103 +0x5c
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/ritikjain.linux/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x7c

Goroutine 57 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /home/ritikjain.linux/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:75 +0x10c
  go.keploy.io/server/v2/pkg/core/proxy.(*Proxy).start()
      /Users/ritikjain/Desktop/keploy-workspace/keploy-refactor/keploy/pkg/core/proxy/proxy.go:235 +0x418
  go.keploy.io/server/v2/pkg/core/proxy.(*Proxy).StartProxy.func1()
      /Users/ritikjain/Desktop/keploy-workspace/keploy-refactor/keploy/pkg/core/proxy/proxy.go:103 +0x5c
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/ritikjain.linux/go/pkg/mod/golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x7c
==================

Steps to reproduce

  1. Clone a sample app and keploy repo
  2. Install the keploy
  3. Record test cases for the sample app
  4. Build the keploy binary with -race flag
  5. Make alias of the newly built keploy binary
  6. Run the test cmd

Environment

None

Version

Cloud

Repository

keploy

@re-Tick re-Tick added the bug Something isn't working label Mar 27, 2024
@re-Tick re-Tick self-assigned this Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working keploy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant