[BUG] Forward the declared runtime budget in profiler capture #117

Closed
opened 2026-10-14 08:00:17 +02:00 by erikinkinen · 1 comment
Owner

Summary

The native invocation profiler's capture command crashes before starting a workload because it reads an argument that the CLI does not define. Both the default and an explicit --runtime-bytes value are affected.

Reproduction

From Integration, supply a readable context JSON file and the required capture arguments:

python3 -B scripts/profile-native-invocations.py capture \
  --binary workload --binary-sha256 <sha256> \
  --kernel kernel --revision <commit> --context context.json \
  --output capture --backgrounds 0 --iterations 1 --runtime-bytes 67108865

After reading the context, argument evaluation raises AttributeError: 'Namespace' object has no attribute 'memory_bytes'. Omitting --runtime-bytes produces the same failure. No sample process is started.

Expected and actual behavior

Expected: pass the declared runtime_bytes value to capture's address-space budget, retaining its existing input validation and refusal behavior.

Actual: the parser defines --runtime-bytes, but dispatch reads args.memory_bytes. AttributeError escapes the normal rejection handler and the command exits 1.

Environment and identity

  • Component: Integration 164b3045; the same CLI bytes occur at 53a5836e.
  • Route: capture argument parsing and dispatch, before source admission or workload execution.
  • Configuration: Python 3.14 on Linux x86_64; no image or VM is involved.
  • Authority: explicit caller paths and budgets; the reproducing dispatch controls mock capture and acquire no workload authority.
  • Last known working revision: not established.

Evidence and prior checks

Three controls exercise the actual CLI parser: default budget, explicit budget and backend rejection. All three reproduce the missing attribute against the original script. Forwarding args.runtime_bytes makes all three pass and preserves the original value on backend rejection. The first failed receipt and complete streams are retained. This verifies CLI dispatch, not native captures, timings or guest execution.

Tracking

Related: profiling work and Integration review.

  • Forward the declared runtime budget without a silent default or compatibility alias.
  • Retain default, explicit-budget and refusal regressions in the maintained CLI coverage.
  • Publish the repair and reconcile the profiling requirements.
## Summary The native invocation profiler's capture command crashes before starting a workload because it reads an argument that the CLI does not define. Both the default and an explicit `--runtime-bytes` value are affected. ## Reproduction From Integration, supply a readable context JSON file and the required capture arguments: ```sh python3 -B scripts/profile-native-invocations.py capture \ --binary workload --binary-sha256 <sha256> \ --kernel kernel --revision <commit> --context context.json \ --output capture --backgrounds 0 --iterations 1 --runtime-bytes 67108865 ``` After reading the context, argument evaluation raises `AttributeError: 'Namespace' object has no attribute 'memory_bytes'`. Omitting `--runtime-bytes` produces the same failure. No sample process is started. ## Expected and actual behavior Expected: pass the declared `runtime_bytes` value to capture's address-space budget, retaining its existing input validation and refusal behavior. Actual: the parser defines `--runtime-bytes`, but dispatch reads `args.memory_bytes`. AttributeError escapes the normal rejection handler and the command exits 1. ## Environment and identity - Component: [Integration 164b3045](https://git.erikinkinen.fi/erix/integration/src/commit/164b30456d052b04fda7d9e5f11d4e781cc4e3a6/scripts/profile-native-invocations.py); the same CLI bytes occur at `53a5836e`. - Route: capture argument parsing and dispatch, before source admission or workload execution. - Configuration: Python 3.14 on Linux x86_64; no image or VM is involved. - Authority: explicit caller paths and budgets; the reproducing dispatch controls mock capture and acquire no workload authority. - Last known working revision: not established. ## Evidence and prior checks Three controls exercise the actual CLI parser: default budget, explicit budget and backend rejection. All three reproduce the missing attribute against the original script. Forwarding `args.runtime_bytes` makes all three pass and preserves the original value on backend rejection. The first failed receipt and complete streams are retained. This verifies CLI dispatch, not native captures, timings or guest execution. ## Tracking Related: [profiling work](https://git.erikinkinen.fi/erix/integration/issues/3) and [Integration review](https://git.erikinkinen.fi/erix/integration/pulls/12). - [x] Forward the declared runtime budget without a silent default or compatibility alias. - [x] Retain default, explicit-budget and refusal regressions in the maintained CLI coverage. - [x] Publish the repair and reconcile the profiling requirements.
Author
Owner

Fixed in a95990ca. Capture now forwards the declared runtime budget. The maintained tests cover the default, an explicit value and the backend refusal path; all 13 profiler unit cases pass. This closes the CLI dispatch failure. Native workload capture and guest profiling remain separate requirements.

Fixed in [a95990ca](https://git.erikinkinen.fi/erix/integration/commit/a95990ca6f6a405fd275f7528e4626cfd079ee18). Capture now forwards the declared runtime budget. The maintained tests cover the default, an explicit value and the backend refusal path; all 13 profiler unit cases pass. This closes the CLI dispatch failure. Native workload capture and guest profiling remain separate requirements.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:15 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/integration#117
No description provided.