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

[Doc] add notes on specialties on py-spy stack traces #43509

Merged
merged 5 commits into from
Apr 4, 2024

Conversation

hongchaodeng
Copy link
Member

@hongchaodeng hongchaodeng commented Feb 28, 2024

Why are these changes needed?

Related issue number

Closes #43129

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@scottsun94
Copy link
Contributor

Thanks for the fix!

@rynewang Do you only want to add those notes to the documentation? Shall we also show them in the error message directly?

Failed to execute `['sudo', '-n', '/home/ray/anaconda3/bin/py-spy', 'record', '-o', PosixPath('/tmp/ray/session_2024-01-31_09-17-15_037017_341/logs/flamegraph_33695_cpu_profiling.svg'), '-p', '33695', '-d', '5', '-f', 'flamegraph']`.
- if you see "No such file or direction" in the stderr below, your worker process may have been exited. 
- If you see "No stack counts found" in the stderr below, your worker process may be sleeping and did not have activity in the last 5s.

=== stderr ===
[2024-01-31T22:37:27.932972718Z ERROR inferno::flamegraph] No stack counts found
Error: Failed to write flamegraph: I/O error: No stack counts found


=== stdout ===
py-spy> Sampling process 100 times a second for 5 seconds. Press Control-C to exit.

@hongchaodeng hongchaodeng self-assigned this Mar 4, 2024
Copy link
Contributor

@rynewang rynewang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I wonder if we can also add it to the py-spy page, i.e. in

def _format_failed_profiler_command(cmd, profiler, stdout, stderr) -> str:

Copy link
Contributor

@angelinalg angelinalg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a typo. Consider installing Vale, a lint checker for your text. There's a VSCode extension, too! go/vale

@angelinalg angelinalg merged commit 97b6629 into ray-project:master Apr 4, 2024
5 checks passed
@hongchaodeng hongchaodeng deleted the doc-pyspy branch April 4, 2024 17:11
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 7, 2024
)

* [Doc] add notes on specialties on py-spy stack traces

Signed-off-by: Hongchao Deng <[email protected]>
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.

[dashboard] py-spy flamegraph failures should have better docs
4 participants