inducer / inducer/pytools

Threads from _log_start_if_long might not be reaped

Open
#61 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
73
Forks
26
Avg merge
7h 3m
Merged PRs (30d)
2

Description

@benSepanski showed me a long with zillions of them live at one point.

Here's what that log looked like:
```
Thread 0x00007f6535c23700 (most recent call first):
File "/home/bensepan/firedrake/lib/python3.9/site-packages/pytools/__init__.py", line 2424 in _log_start_if_long
File "/usr/lib/python3.9/threading.py", line 892 in run
File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007f6331ffb700 (most recent call first):
File "/home/bensepan/firedrake/lib/python3.9/site-packages/pytools/__init__.py", line 2424 in _log_start_if_long
File "/usr/lib/python3.9/threading.py", line 892 in run
File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007f63327fc700 (most recent call first):
File "/home/bensepan/firedrake/lib/python3.9/site-packages/pytools/__init__.py", line 2424 in _log_start_if_long
File "/usr/lib/python3.9/threading.py", line 892 in run
File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007f6332ffd700 (most recent call first):
File "/home/bensepan/firedrake/lib/python3.9/site-packages/pytools/__init__.py", line 2424 in _log_start_if_long
File "/usr/lib/python3.9/threading.py", line 892 in run
File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007f63337fe700 (most recent call first):
File "/home/bensepan/firedrake/lib/python3.9/site-packages/pytools/__init__.py", line 2424 in _log_start_if_long
File "/usr/lib/python3.9/threading.py", line 892 in run
File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007f6537426700 (most recent call first):
File "/home/bensepan/firedrake/lib/python3.9/site-packages/pytools/__init__.py", line 2424 in _log_start_if_long
File "/usr/lib/python3.9/threading.py", line 892 in run
File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
```
(on a presumably unrelated crash in PETSc/Cython)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in pytools/__init__.py at _log_start_if_long, the function shown in every reported thread, and inspect how those threads are created and stopped. Reproduce the long-running logging scenario if possible, then verify that completed logging threads no longer accumulate; the unrelated PETSc/Cython crash may help provide a reproduction context.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.