microsoft / microsoft/SysinternalsEBPF

telemetryStart should have a stop mechanism other than signals

Open
#3 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
288
Forks
38
Avg merge
21d 13h
Merged PRs (30d)
1

Description

Currently, teletryStart is a fully blocking call. There appears to be no way to stop tracing without sending a signal that would cause perf_buffer__poll to return <0, .e.g., SIGSTOP or SIGCONT (based on the comments). This can race with the call to perf_buffer_poll which may not be on the stack when the signal arrives.

If you are trying to use this library in-process, it is difficult to control stopping as designed.

An Init->Start->Stop->Fini pattern would be useful for this library.

https://github.com/Sysinternals/SysinternalsEBPF/blob/b9035cf7780c9c733f4be06ff29f7b4fc447b395/telemetryLoader.c#L1432-L1470

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading telemetryLoader.c around lines 1432-1470 and trace how telemetryStart reaches perf_buffer__poll. Identify the lifecycle boundaries needed for an Init-Start-Stop-Fini API and verify that an in-process caller can stop tracing without relying on signals; done means the requested stop mechanism is defined and covered by relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.