Article View: linux.debian.bugs.dist
Article #6890Bug#1148419: Bug#1152624: RFS: taskhealth/0.2.2-1 [ITP] -- Linux thread health monitoring daemon and client library
From: luhaoran1981
Date: Mon, 30 Nov 2026 16:50
Date: Mon, 30 Nov 2026 16:50
180 lines
11242 bytes
11242 bytes
Hi Tobias,
Thanks for the careful review. Point by point.
1. Maturity and release record
You are right that the project is young, and I won't overstate it: I am the
sole upstream maintainer, and my commitment is to keep it maintained to
Debian packaging standards. For the record, formal releases exist since
v0.1.0 (August 2026), and the latest v0.2.2 was published on 2026-11-01,
including the upstream tarball and four prebuilt Debian packages:
https://github.com/LuHaoran1981/taskhealth/releases/tag/v0.2.2
The package is lintian-clean: lintian --fail-on error,warning produces no
diagnostics. It builds with hardening=+all, ships debian/watch, a symbols
file, and Multi-Arch: same on the library packages. The client and daemon
test suites are included in the source package and run via dh_auto_test. I
have not added an autopkgtest yet; if that is the preferred route, I will.
2. What it adds beyond existing mechanisms
watchdog, systemd's WatchdogSec, and monit all supervise at process level:
they know whether the service is alive. TaskHealth works at thread level,
but it has two distinct deployment modes, which I should have separated in
my first reply:
- SDK-embedded mode: the client library registers threads and their
mutexes over a Unix socket, sends heartbeats, and reports lock waits.
This is the only mode that can classify a deadlock and name the mutex
involved.
- External mode, no relink: the daemon reads
/proc/<pid>/task/<tid>/{status,wchan,syscall} and /proc/<pid>/maps. It
can flag a thread blocked on a futex and resolve the futex word to its
mapping, but it cannot name the mutex, and deadlock classification
still requires a heartbeat.
The gap is the one described: a process can stay alive and pass every
process-level check while one thread silently stalls, and the fault
surfaces as intermittent degradation that is hard to trace.
On eBPF, which is the obvious comparison: bpftrace and bcc can trace off-CPU
time and futex_wait without touching the target either. I did not build on
that because it requires CAP_BPF or CAP_SYS_ADMIN plus a reasonably recent
kernel, and is frequently unavailable in hardened or containerised
production environments. TaskHealth stays in user space and works under
those constraints.
3. Read-only, and the privileges it actually needs
Confirmed read-only: the daemon does not attach with ptrace, loads no kernel
modules, sends no signals, and writes nothing into the monitored process. It
only records health state and raises alerts. The packaged unit runs with
NoNewPrivileges=yes, ProtectSystem=yes, and ProtectControlGroups=yes.
One clarification so it is not a surprise later: reading
/proc/<tid>/syscall is still subject to the ptrace access check
(PTRACE_MODE_ATTACH) even though we never attach. The daemon therefore needs
root or CAP_SYS_PTRACE, or the target must be same-uid and dumpable with
yama ptrace_scope <= 1. wchan also depends on CONFIG_KALLSYMS, and
hidepid=2 hides the status files entirely.
4. Downstream demand, and field evidence
You are right that no package can depend on a library that isn't in the
archive yet, and I won't argue that point. What I can add is why the gap is
worth closing:
- Commercial RTOSes already ship this capability. QNX has HAM, which
supervises at process and thread level and reports or restarts on
failure. Linux has no in-tree equivalent; watchdog, WatchdogSec, and
monit all stop at process level. The gap is not invented for this
submission.
- My own background is in safety-critical avionics (A380 and C919
programmes), where a worker thread stalling while the process stays
"up" is a known and expensive failure mode. This daemon is the tool I
wanted and did not have.
- I have heard this failure pattern described privately in the automotive
sector: a worker thread deadlocked on a mutex while the process stayed
up and passed every process-level check, presenting as intermittent
degradation and taking a long effort to trace. I can't identify the
organisation or take the account further than that, so I offer it as
background rather than evidence. The QNX comparison and the demo are
the substantive case.
This submission is not an attempt to find the project's first users. It is
that the gap is real, the daemon is cheap to keep, and the archive is the
right place for a system-level tool like this.
5. Verification
Requires root or CAP_SYS_PTRACE, and a kernel built with KALLSYMS. Tested on
6.x.
taskhealthd -i 1000 -l /tmp/taskhealth.log &
taskhealth-demo
The demo deliberately deadlocks two worker threads, each holding one mutex
and waiting on the other, while the process stays alive. In this
instrumented run the daemon reports the stuck TIDs and the mutex each is
blocked on. Pointed at a non-instrumented process, it reports the TID, the
futex word, and its mapping, but not the mutex name.
I'm happy to adjust the package or answer anything above.
Regards,
Lu Haoran
发自我的 iPhone
> 在 2026年11月30日,下午1:52,luhaoran1981@icloud.com 写道:
>
> Hi Tobias,
>
> Thanks for your review and feedback.
>
> TaskHealth is a specialized thread health monitoring daemon and client library for Linux, aimed at embedded, safety-critical and long-running service scenarios. It fills a niche that existing general-purpose monitoring tools do not cover: continuous tracking of thread liveness, blockage and scheduling health, rather than just process-level up/down status.
>
> It is currently early-stage, with no public release yet. I am the sole upstream maintainer and will keep maintaining it actively. I plan to tag the first formal release soon, and I will follow Debian packaging standards, keep the package updated, and handle bug reports.
>
> Even though the user community is small for now, I believe it is valuable for developers working on real-time and high-reliability Linux services. I will keep improving the documentation and test coverage.
>
> Best regards,
> Lu Haoran
>
>
>> 在 2026年11月29日,下午6:05,Tobias Frost <tobi@debian.org> 写道:
>>
>> Control: tags 1152624 moreinfo
>>
>> Hi,
>>
>> before considering sponsorship, I'd like to understand the relevance of
>> this project for Debian.
>>
>> The upstream project appears to be very young: the GitHub repository
>> currently has only 31 commits, no releases, and no visible user or
>> contributor community. This is not a criticism of the technical work,
>> but it does raise the question whether the project has reached a level
>> of maturity and adoption that would justify adding it to Debian.
>>
>> You describe TaskHealth as a Linux thread health monitoring daemon and
>> client library. Could you elaborate on the intended use cases in Debian?
>>
>> In particular:
>> - Are there any Debian packages or (prospective) applications that would
>> benefit from using this library?
>> - Is there an existing user base or demand for this functionality?
>> - What does TaskHealth provide that isn't already covered by existing
>> monitoring and watchdog mechanisms available in Debian?
>>
>> I think the order matters here: first establish that there is a relevant
>> use case and a reason for Debian users to have this software. Packaging
>> it for Debian should be a consequence of that, not a way of establishing
>> its relevance or attracting its first users.
>>
>> Introducing a new daemon and library also creates a long-term
>> maintenance burden for Debian. Without a convincing case for its
>> relevance, I don't see a reason to take that on.
>>
>> Thanks.
>> --
>> tobi
Technical Details
Message-ID:
<O5cJH-f9wf-11@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-can.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<O52Kl-f43d-1@gated-at.bofh.it> <O4K14-eR3C-5@gated-at.bofh.it> <O52Kl-f43d-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: luhaoran1981@icloud.com Newsgroups: linux.debian.bugs.dist Subject: Bug#1148419: Bug#1152624: RFS: taskhealth/0.2.2-1 [ITP] -- Linux thread health monitoring daemon and client library Date: Mon, 30 Nov 2026 17:50:01 +0100 Message-ID: <O5cJH-f9wf-11@gated-at.bofh.it> References: <O52Kl-f43d-1@gated-at.bofh.it> <O4K14-eR3C-5@gated-at.bofh.it> <O52Kl-f43d-1@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Mon Nov 30 16:49:08 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -0.399 Reply-To: luhaoran1981@icloud.com, 1148419@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: wnpp@debian.org X-Debian-Pr-Message: followup 1148419 X-Debian-Pr-Package: wnpp Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 (1.0) X-Mailer: iPhone Mail (23C55) X-Proofpoint-Orig-Guid: DYwBSRkHi0D33HCS2zkkQTDHhJ0qn91z X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDA0MyBTYWx0ZWRfX3miSuX5vXf2T qdUXvO0xRpVZ96bwWoKkgQ9X+I5beMX75F7lCxwHf3rxmXPF4KZ1Ox10FgDQeubwnvVvFLgshOZ BXn2LVkaC0ruh+PumZrdtqdE4d+IMGQ= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDA0MyBTYWx0ZWRfXzMZ9ngNsiy/a 3o9BLcbiS8bbDc+Rhmjd0olRh2dedetYfa/i+DoQXYLsvRM4l9wM0o/6rVFPttm8TlCEZt6ipec 2cj5PJ9bj+WRg7pS2aFK3OndG+EAo5T/MKHd8yIXD8jM7747Z1eD+L/yxMKaDm5zn7cDAkWaiFj oe6PSnJji3CBVYWkeotwF3pwYCMn4ytzEo1CseaNSvA1GIaq4KfD96xQDM8/dU9t5XB3qniX4mB 7OvAbyvsvwHZYsMeh71qaphEYaN4W7daSTU6jVhgq5pwAY+UrGGcLLT20ulxx97lAE9opA8a1ts 93Ua7COkhGEEclbH0GqbB/yJdTYonk5qrGSzp2Ehw== X-Proofpoint-Guid: DYwBSRkHi0D33HCS2zkkQTDHhJ0qn91z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-30_02,2026-11-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 suspectscore=0 adultscore=0 mlxscore=0 spamscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 clxscore=-2147483648 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2611300043 X-Greylist: delayed 377 seconds by postgrey-1.37 at buxtehude; Mon, 30 Nov 2026 16:47:18 UTC X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2006106 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 180 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: 1152624@bugs.debian.org, 1148419@bugs.debian.org X-Original-Date: Tue, 1 Dec 2026 00:40:42 +0800 X-Original-Message-ID: <493EDACC-1D9F-4645-88EC-2F2959DCCAFA@icloud.com> X-Original-References: <916899B3-BA35-484D-A4F3-C39B283496C1@icloud.com> <e2d6c78b18f17934aa60b7ff562b4724.luhaoran1981@icloud.com> <916899B3-BA35-484D-A4F3-C39B283496C1@icloud.com>