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

Capture client's callstacks with rstack #36

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Fluxie
Copy link
Collaborator

@Fluxie Fluxie commented Jan 16, 2024

The capture is done if the client provided the process id and the thread id of the client's thread for the capture.

A parametrization will be added in the future for better usability.

The area becomes visible if the client included both the process id and the thread id of the calling thread in the headers of a request. Support for capturing and displaying the callstack will be added in another commit.
Proxide panics when launched from RustRover. I tried to locate the source of the panic. Though it always seemed to come from the internals of the Rust main runtime. Launching the application in debug mode does not trigger the panic.

The application does not panic if a pause of 500 milliseconds is added before the "let chunk = f.size();" gets executed in marcos.rs:draw_views function.  The pause can be anywhere between the first line in main() and the function mentioned above.

unwrap -> expect conversions were done while hunting for this issue.
Currently the task in htt2p.rs only reports that capturing the callstack is not supported on any operating system. But now with the asynchronously executed capture task it will be possible to actually implement the capturing.
This adds parts of the infrastructure required to display the callstack in the ui. And adds a test to verify the basic capturing concept works.

The implementation requires utilizing rstack_self crate to the capture which in turn required helper crates to wrap its functionality for ease of use.
The limiter was not shared between connections.
The capture is done if the client provided the process id and the thread id of the client's thread for the capture.

A parametrization will be added in the future for better usability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant