microsoft / microsoft/ebpf-for-windows

Add tests for async map operation race conditions

Open
#4,810 0 comments 0 reactions 2 assignees Claimed by @mikeagun View on GitHub
enhancement P2 tests triaged
Dominant language
C
Stars
3.6k
Forks
311
Avg merge
6d 10h
Merged PRs (30d)
21

Description

### Describe the feature you'd like supported

There was a race condition found in #4647 in async map operations for the perf event array and ring buffer maps.

The problem is that there is no synchronization between the IOCTL handlers, async completion, and async cancellation.

The bug was fixed in #4790 , but we still need comprehensive tests to validate the fix to this race condition.

We should add tests to comprehensively hit the async completion/cancellation paths.

### Proposed solution

The race conditions are between async op completion/cancellation, so we should add test(s) where one thread thread repeatedly calls perf buffer new + free while events are being written to the buffer at high rate.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.