🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
4 messages
4 total messages Started by Tobias Frost Sun, 29 Nov 2026 10:10
Bug#1148419: RFS: taskhealth/0.2.2-1 [ITP] -- Linux thread health monitoring daemon and client library
#6678
Author: Tobias Frost
Date: Sun, 29 Nov 2026 10:10
35 lines
3526 bytes
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
Bug#1152624: RFS: taskhealth/0.2.2-1 [ITP] -- Linux thread health monitoring daemon and client library
#6833
Author: luhaoran1981
Date: Mon, 30 Nov 2026 06:10
61 lines
5633 bytes
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
Bug#1148419: Bug#1152624: RFS: taskhealth/0.2.2-1 [ITP] -- Linux thread health monitoring daemon and client library
#6890
Author: luhaoran1981
Date: Mon, 30 Nov 2026 16:50
180 lines
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
Bug#1148419: Bug#1152624: RFS: taskhealth/0.2.2-1 [ITP] -- Linux thread health monitoring daemon and client library
#6913
Author: Tobias Frost
Date: Mon, 30 Nov 2026 20:20
23 lines
2845 bytes
Hi Lu,

Thanks for taking the time to write such a detailed response. I appreciate
your enthusiasm for the project and the additional background. The use case
is certainly interesting, and I now have a much better understanding of
what you are trying to achieve and where you see the gap in the Linux
ecosystem.

There are still some aspects of the implementation that I think need to
mature. For example, using /tmp as the default socket location is not a
good choice for a system service, and even a brief look at the code raised
some potential security concerns. I don't want to turn this review into a
lengthy exchange about individual findings, though.

In my view, a library should ideally have some independent users and
practical experience behind it before being introduced into Debian.
Once the implementation has matured further and a user base has been
established, a new submission would certainly be welcome.

I'll therefore close this RFS for now.

Regards,
Tobias
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads