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 concurrent map read and write in socket dataset #21690

Merged
merged 2 commits into from
Oct 12, 2020

Conversation

adriansr
Copy link
Contributor

@adriansr adriansr commented Oct 8, 2020

What does this PR do?

Fixes a panic caused by a concurrent map read and write in Auditbeat's system/socket dataset.

Why is it important?

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

Without synchronization, the provided test fails:

go test -race -test.v -test.run TestProcessDNSRace

Related issues

Closes #21192

This fixes a panic caused by a concurrent map read and write in Auditbeat's
system/socket dataset.

Fixes elastic#21192
@adriansr adriansr requested a review from a team as a code owner October 8, 2020 14:14
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 8, 2020
@adriansr adriansr requested review from a team and removed request for a team October 8, 2020 14:15
@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 8, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #21690 updated]

  • Start Time: 2020-10-09T08:06:05.818+0000

  • Duration: 39 min 36 sec

Test stats 🧪

Test Results
Failed 0
Passed 228
Skipped 33
Total 261

Can't be copying around a `process` struct as now it contains a mutex.
@adriansr adriansr merged commit 9ab0a91 into elastic:master Oct 12, 2020
adriansr added a commit to adriansr/beats that referenced this pull request Oct 12, 2020
This fixes a panic caused by a concurrent map read and write in Auditbeat's
system/socket dataset.

Fixes elastic#21192

(cherry picked from commit 9ab0a91)
@adriansr adriansr added v7.11.0 and removed needs_backport PR is waiting to be backported to other branches. labels Oct 12, 2020
adriansr added a commit to adriansr/beats that referenced this pull request Oct 12, 2020
This fixes a panic caused by a concurrent map read and write in Auditbeat's
system/socket dataset.

Fixes elastic#21192

(cherry picked from commit 9ab0a91)
adriansr added a commit to adriansr/beats that referenced this pull request Oct 12, 2020
This fixes a panic caused by a concurrent map read and write in Auditbeat's
system/socket dataset.

Fixes elastic#21192

(cherry picked from commit 9ab0a91)
v1v added a commit to v1v/beats that referenced this pull request Oct 13, 2020
* upstream/master: (127 commits)
  Update obs app links (elastic#21682)
  fix: update fleet test suite name (elastic#21738)
  Remove dot from file.extension value in Auditbeat FIM (elastic#21644)
  Fix leaks with metadata processors (elastic#16349)
  Add istiod metricset (elastic#21519)
  [Ingest Manager] Change Sync/Close call order (elastic#21735)
  [Ingest Manager] Syncing unpacked files (elastic#21706)
  Fix concurrent map read and write in socket dataset (elastic#21690)
  Fix conditional coding to remove seccomp info from Winlogbeat (elastic#21652)
  [Elastic Agent] Fix issue where inputs without processors defined would panic (elastic#21628)
  Add configuration of filestream input (elastic#21565)
  libbeat/logp: introduce Logger.WithOptions (elastic#21671)
  Make o365audit input cancellable (elastic#21647)
  fix: remove extra curly brace in script (elastic#21692)
  [Winlogbeat] Remove brittle configuration validation from wineventlog (elastic#21593)
  Fix function that parses from/to/contact headers (elastic#21672)
  [CI] Support Windows-2016 in pipeline 2.0 (elastic#21337)
  Skip publisher flaky tests (elastic#21657)
  backport: add 7.10 branch (elastic#21635)
  [CI: Packaging] fix: push ubi8 images too (elastic#21621)
  ...
adriansr added a commit that referenced this pull request Oct 13, 2020
This fixes a panic caused by a concurrent map read and write in Auditbeat's
system/socket dataset.

Fixes #21192

(cherry picked from commit 9ab0a91)
adriansr added a commit that referenced this pull request Oct 13, 2020
This fixes a panic caused by a concurrent map read and write in Auditbeat's
system/socket dataset.

Fixes #21192

(cherry picked from commit 9ab0a91)
adriansr added a commit that referenced this pull request Oct 13, 2020
This fixes a panic caused by a concurrent map read and write in Auditbeat's
system/socket dataset.

Fixes #21192

(cherry picked from commit 9ab0a91)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…lastic#21731)

This fixes a panic caused by a concurrent map read and write in Auditbeat's
system/socket dataset.

Fixes elastic#21192

(cherry picked from commit 17e4204)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Auditbeat] System socket panics with concurrent map read and write
3 participants