oracle / oracle/dtrace

Unrecognized PERF_RECORD_* causes "dtrace: processing aborted: Success"

Open
#7 1 comment 0 reactions 1 assignee View on GitHub

@kvanhees is already working on this.

Since Mar 31, 2023.

Dominant language
C
Stars
189
Forks
23
PR merge metrics
No merged PRs in 30d

Description

When dt_consume_one() encounters an unrecognized hdr->type -- for example, PERF_RECORD_LOST -- it returns DTRACE_WORKSTATUS_ERROR without running dt_set_errno(dtp, errno). Then, dt_consume_cpu() passes DTRACE_WORKSTATUS_ERROR up the call stack through dtrace_consume() and dtrace_work(). In cmd/dtrace.c in main(), the dtrace_work() error return value leads to the dfatal("processing aborted") call. The unset dtp->dt_errno adds the "Success" string. The result is that processing is aborted with only the puzzling explanation that the status is "Success."

Runs of the test suite can produce occasional such failures, which are typically not reproducible upon retrial.

Here is one way to demonstrate the problem:
# dtrace -n 'ksys_write:entry { trace(1); }'
with output directed to the terminal (albeit possibly within a 'script' session to capture output). On my VM, even as many as ten million lines of output might be shown over the course of even a minute, but then the run aborts with the telltale message.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.