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

end-of-request USDT probes, log entries don't always happen #914

Closed
davepacheco opened this issue Feb 23, 2024 · 0 comments · Fixed by #965
Closed

end-of-request USDT probes, log entries don't always happen #914

davepacheco opened this issue Feb 23, 2024 · 0 comments · Fixed by #965
Labels
👋 good first issue Good for newcomers.

Comments

@davepacheco
Copy link
Collaborator

After #701, there are potentially two async tasks involved in request handlers:

  • the one in which hyper invokes us when a new request comes in. This one also runs the request handler if using HandlerTaskMode::CancelOnDisconnect.
  • if using HandlerTaskMode::Detached, the one in which the request handler runs

If the request is cancelled (e.g., if the client disconnects), the first of these tasks gets cancelled. With HandlerTaskMode::Detached, the request handler still runs to completion. Unfortunately, the "request completed" log entry USDT probes happen in the first of these contexts. So you don't get these events when the client request was cancelled. This makes it much harder to write correct DTrace scripts and also makes it much harder to debug from logs since you can't assume there's a "request completed" log entry for all requests that did essentially complete.

(This was noticed while debugging oxidecomputer/omicron#5111.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👋 good first issue Good for newcomers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant