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: add rw lock to prevent concurrent map read write #198

Merged

Conversation

hengyoush
Copy link
Owner

  • Added missing mutex locks in discardSslEventsIfNeeded and discardEventsIfNeeded methods to ensure thread safety.
  • Improved the logic for discarding SSL and kernel events by sequence.

@hengyoush hengyoush linked an issue Dec 19, 2024 that may be closed by this pull request
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 19, 2024
Copy link

vercel bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kyanos ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 4:30pm

@dosubot dosubot bot added the bug-fix this pr fix a bug label Dec 19, 2024
@hengyoush hengyoush changed the title fix: add rw lock to prevent concurrent map read rite fix: add rw lock to prevent concurrent map read write Dec 19, 2024
Copy link

cloudflare-workers-and-pages bot commented Dec 19, 2024

Deploying kyanos with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8843cff
Status: ✅  Deploy successful!
Preview URL: https://98612521.kyanos.pages.dev
Branch Preview URL: https://197-concurrent-map-read-and.kyanos.pages.dev

View logs

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Dec 19, 2024
@hengyoush hengyoush merged commit f384ad8 into main Dec 19, 2024
13 checks passed
@hengyoush hengyoush deleted the 197-concurrent-map-read-and-map-write-causing-fatal-error branch December 19, 2024 16:45
hengyoush added a commit that referenced this pull request Jan 6, 2025
* fix(kern_event_handler): add rw lock to prevent concurrent map read write

* fix: seperate ssl in/out locks

* fix: remove lock prevent reentrent issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix this pr fix a bug size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concurrent map read and map write causing fatal error
1 participant