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

Reducing data race via SyncLockMap #3959

Merged
merged 3 commits into from
Jul 24, 2023
Merged

Reducing data race via SyncLockMap #3959

merged 3 commits into from
Jul 24, 2023

Conversation

Mzack9999
Copy link
Member

Proposed changes

This PR replace contextargs.Args with mapsutil.SyncLockMap improving native race avoidance

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@Mzack9999 Mzack9999 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jul 19, 2023
@Mzack9999 Mzack9999 self-assigned this Jul 19, 2023
@Mzack9999 Mzack9999 changed the title Bugfix 3817 synclock map Reducing data race via SyncLockMap Jul 19, 2023
@Mzack9999 Mzack9999 linked an issue Jul 19, 2023 that may be closed by this pull request
@Mzack9999 Mzack9999 marked this pull request as ready for review July 19, 2023 17:36
Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggesting removing unused types,methods

v2/pkg/protocols/common/contextargs/contextargs.go Outdated Show resolved Hide resolved
v2/pkg/protocols/common/contextargs/args.go Outdated Show resolved Hide resolved
Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integration tests are failing due to expired client / server certificates that are used in integration test generic/auth/certifiicate/http-get.yaml

$  TESTS="generic/auth/certificate/http-get.yaml" ./run.sh       130 ↵
::group::Build nuclei
::endgroup::
::group::Build nuclei integration-test
::endgroup::
::group::Installing nuclei templates

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.9

		projectdiscovery.io

[INF] No new updates found for nuclei templates
::endgroup::
2023/07/24 20:04:46 http: TLS handshake error from 127.0.0.1:50778: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2023-07-24T20:04:46+05:30 is after 2023-07-21T00:43:06Z
2023/07/24 20:04:47 http: TLS handshake error from 127.0.0.1:50779: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2023-07-24T20:04:47+05:30 is after 2023-07-21T00:43:06Z
[✘] Test "generic/auth/certificate/http-get.yaml" failed: incorrect number of results: 0 (actual) vs [1] (expected) 
Results:

cc: @Mzack9999

@ehsandeep ehsandeep merged commit 5074722 into dev Jul 24, 2023
8 of 11 checks passed
@ehsandeep ehsandeep deleted the bugfix-3817-synclock-map branch July 24, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate race conditions in integration tests
3 participants