1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/test
Daniel Colson 39d16fadaf Add pumactl command to print thread backtraces (#2054)
* Add pumactl command to print thread backtraces

Completes 1 of 2 items from #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"
```

* 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.
2019-11-11 13:08:41 +08:00
..
config Update test_integration files per PR #1956 (#1965) 2019-09-19 19:37:53 +02:00
helpers Add SSL support for the control app (#2046) 2019-10-21 09:35:15 +08:00
rackup Add benchmarks for large request bodies and responses 2019-10-13 11:27:58 +02:00
shell Add status to pumactl with pidfile (#1824) 2019-06-23 19:36:06 -05:00
helper.rb CI -> Github actions (#1918) 2019-09-19 19:50:13 +02:00
test_app_status.rb Remove unused code in app status test (#2020) 2019-10-10 11:07:30 +02:00
test_binder.rb Add SSL support for the control app (#2046) 2019-10-21 09:35:15 +08:00
test_cli.rb Add pumactl command to print thread backtraces (#2054) 2019-11-11 13:08:41 +08:00
test_config.rb Update pumactl to remove development as default environment (#2035) 2019-10-18 13:49:05 +08:00
test_events.rb Revert "Avoid mutating global STDOUT & STDERR (#1837)" (#1946) 2019-09-02 16:05:48 +00:00
test_http10.rb make test_helper no longer be loaded as a test (#1283) 2017-05-12 12:16:55 -07:00
test_http11.rb Strip header whitespace. Fix #1890. Code by @matthewd (#2010) 2019-10-07 15:23:18 +02:00
test_integration_cluster.rb Add pumactl command to print thread backtraces (#2054) 2019-11-11 13:08:41 +08:00
test_integration_pumactl.rb Update test_integration files per PR #1956 (#1965) 2019-09-19 19:37:53 +02:00
test_integration_single.rb Add pumactl command to print thread backtraces (#2054) 2019-11-11 13:08:41 +08:00
test_iobuffer.rb make test_helper no longer be loaded as a test (#1283) 2017-05-12 12:16:55 -07:00
test_launcher.rb Add pumactl command to print thread backtraces (#2054) 2019-11-11 13:08:41 +08:00
test_minissl.rb make test_helper no longer be loaded as a test (#1283) 2017-05-12 12:16:55 -07:00
test_null_io.rb Cleanup tests, parallelize a few (#1850) 2019-07-27 09:47:19 -07:00
test_persistent.rb Add @MSP-Greg's changes to TestPersistent 2019-09-11 14:12:57 +00:00
test_plugin.rb PluginRegistry#fire_background - fix up per issue 1972 (#1973) 2019-09-18 15:53:29 +02:00
test_puma_server.rb Rubocop failures 2019-11-02 16:07:18 -04:00
test_puma_server_ssl.rb Parallelize a few more tests 2019-09-11 14:11:46 +00:00
test_pumactl.rb Add ssl support to the control_cli (#2052) 2019-11-02 14:51:46 -04:00
test_rack_handler.rb Remove unnecessary calls to abort_on_exception 2019-09-11 12:36:40 +00:00
test_rack_server.rb Cleanup tests, parallelize a few (#1850) 2019-07-27 09:47:19 -07:00
test_tcp_logger.rb Revert "Avoid mutating global STDOUT & STDERR (#1837)" (#1946) 2019-09-02 16:05:48 +00:00
test_tcp_rack.rb Avoid hardcoding ports 2018-03-20 11:25:26 -05:00
test_thread_pool.rb Address threadpool test TODOs 2019-10-16 21:17:19 -04:00
test_unix_socket.rb fix test/test_unix_socket.rb (#1870) 2019-07-29 18:16:09 -07:00
test_web_server.rb I really need a rubocop precommit hook 2019-09-11 14:34:24 +00:00