Problem
Linux limits thread names set through PR_SET_NAME to 15 usable characters:
The name can be up to 16 bytes long, including the terminating null byte.
Longer names are silently truncated. Bitcoin Core prefixes system thread names with b-, leaving only 13 bytes for readable names.
This makes longer names less useful in system tools, for example b-coinstatsindex and b-txospenderindex, and makes verbose suffixes like b-http_pool_N spend much of the available space.
The same limit is documented in the existing thread-name helper: https://github.com/bitcoin/bitcoin/blob/8b49e2dd4eed93d08a3d9681d444aaf441ab0037/src/util/threadnames.cpp#L25
This was noticed during review of #31132 (review)
Fix
Shorten the affected OS thread names while keeping them recognizable.
ThreadPool workers now use a dotted numeric suffix, so HTTP workers are named like b-http.0.
Indexer thread names are shortened to fit within the Linux limit after the b- prefix:
basic block filter index -> basicfltridx
coinstatsindex -> coinstatsidx
txospenderindex -> txospenderidx
Indexer display names, getindexinfo keys, command-line options, and on-disk index paths are unchanged.
Testing
See https://godbolt.org/z/GhEsKehh9 for a simple reproducer.
Alternatively you can start bitcoind on Linux with the affected indexes enabled and read the kernel-visible thread names.
Before this change, the affected names are truncated or unnecessarily long:
b-basic block f
b-coinstatsinde
b-http_pool_15
b-txospenderind
After this change, the same check shows compact, untruncated names:
b-basicfltridx
b-coinstatsidx
b-http.15
b-txospenderidx