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

Add pumactl command to print thread backtraces #2054

Merged

Commits on Nov 8, 2019

  1. Add pumactl command to print thread backtraces

    Completes 1 of 2 items from puma#1964
    
    This commit adds an endpoint to the status app to print thread
    backtraces, and control cli command to call that endpoint.
    
    I tried this locally by starting a server with:
    
    ```sh
    bundle exec bin/puma test/rackup/hello.ru \
      --control-url="unix://test.sock" \
      --control-token="token"
    ```
    
    and then printing the backtraces with:
    
    ```sh
    bundle exec bin/pumactl thread-backtraces \
      --control-url="unix://test.sock" \
      --control-token="token"
    ```
    composerinteralia committed Nov 8, 2019
    Copy the full SHA
    cd91405 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2019

  1. Log threads as JSON in control app

    With this commit the status app sends the thread backtraces as an array
    of objects with `name` and `backtrace` keys, rather than as a string
    matching the SIGINFO output.
    
    While working on this I noticed that we logged the thread TID twice.
    This commit simplifies that so we only log the thread TID once, with
    both the label (I don't know when the label would get set) and name if
    they are available.
    composerinteralia committed Nov 11, 2019
    Copy the full SHA
    a344d75 View commit details
    Browse the repository at this point in the history