diff --git a/pip_package/CHANGELOG.md b/pip_package/CHANGELOG.md index 5b55d08..99a56a1 100644 --- a/pip_package/CHANGELOG.md +++ b/pip_package/CHANGELOG.md @@ -34,6 +34,9 @@ To release a new version (e.g. from `1.0.0` -> `2.0.0`): --> +## [0.1.3] - 2023-11-01 +* Fixing issue with using signals and threads together in a program + ## [0.1.2] - 2023-09-20 * Improved stack trace readability and clarity by adding a message for more information @@ -46,6 +49,7 @@ To release a new version (e.g. from `1.0.0` -> `2.0.0`): * Initial release of cloud-tpu-diagnostics PyPI package * FEATURE: Contains debug module to collect stack traces on faults +[0.1.3]: https://github.com/google/cloud-tpu-monitoring-debugging/compare/v0.1.2...v0.1.3 [0.1.2]: https://github.com/google/cloud-tpu-monitoring-debugging/compare/v0.1.1...v0.1.2 [0.1.1]: https://github.com/google/cloud-tpu-monitoring-debugging/compare/v0.1.0...v0.1.1 [0.1.0]: https://github.com/google/cloud-tpu-monitoring-debugging/releases/tag/v0.1.0 diff --git a/pip_package/cloud_tpu_diagnostics/src/debug.py b/pip_package/cloud_tpu_diagnostics/src/debug.py index 2f2a8e3..671919d 100644 --- a/pip_package/cloud_tpu_diagnostics/src/debug.py +++ b/pip_package/cloud_tpu_diagnostics/src/debug.py @@ -45,9 +45,7 @@ def stop_debugging(debug_config): def send_user_signal(stack_trace_interval_seconds): - """Send SIGUSR1 signal to non-daemon threads after every stack_trace_interval_seconds seconds.""" + """Send SIGUSR1 signal to main thread after every stack_trace_interval_seconds seconds.""" while True: time.sleep(stack_trace_interval_seconds) - for thread in threading.enumerate(): - if not thread.daemon: - signal.pthread_kill(thread.ident, signal.SIGUSR1) + signal.pthread_kill(threading.main_thread().ident, signal.SIGUSR1) diff --git a/pip_package/pyproject.toml b/pip_package/pyproject.toml index b307ace..2489d0c 100644 --- a/pip_package/pyproject.toml +++ b/pip_package/pyproject.toml @@ -14,7 +14,7 @@ [project] name = "cloud-tpu-diagnostics" -version = "0.1.2" +version = "0.1.3" authors = [ { name="Cloud TPU Team", email="cloud-tpu-eng@google.com" }, ]