• Bug#1106776: ITP: python-manhole -- Debugging manhole for python applic

    From Antoine Beaupre@21:1/5 to All on Thu May 29 18:20:02 2025
    XPost: linux.debian.devel, linux.debian.maint.python

    Package: wnpp
    Severity: wishlist
    Owner: Antoine Beaupre <anarcat@debian.org>
    X-Debbugs-Cc: debian-devel@lists.debian.org, debian-python@lists.debian.org

    * Package name : python-manhole
    Version : 1.8.1
    Upstream Contact: https://github.com/ionelmc
    * URL : https://github.com/ionelmc/python-manhole
    * License : MIT
    Programming Lang: Python
    Description : Debugging manhole for python applications

    Manhole is in-process service that will accept unix domain socket
    connections and present the stacktraces for all threads and an
    interactive prompt. It can either work as a python daemon thread
    waiting for connections at all times or a signal handler (stopping
    your application and waiting for a connection).
    .
    Access to the socket is restricted to the application's effective
    user id or root.
    .
    This is just like Twisted's manhole. It's simpler (no dependencies),
    it only runs on Unix domain sockets (in contrast to Twisted's manhole
    which can run on telnet or ssh) and it integrates well with various
    types of applications.
    .
    Features:
    * Uses unix domain sockets, only root or same effective user can connect.
    * Can run the connection in a thread or in a signal handler.
    * Compatible with apps that fork, reinstalls the Manhole thread after fork.
    * Compatible with gevent and eventlet with some limitations
    * The thread is compatible with apps that use signalfd

    ----

    I'm surprised to not see this packaged in Debian. There's so many uses
    for this! There's a couple of instances of manhole.py i can find in
    apt-file, but the first i looked at (in synapse) actually uses
    twisted's manhole, which i guess this is somewhat a copy of, but
    standalone (so you don't need twisted).

    I first found out about this project in archivebot's implementation
    (which is not packaged in Debian), and now i need it in asncounter.

    Let me know if it *is* packaged or was rejected or something.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?utf-8?Q?Antoine_Beaupr=C3=A9?=@21:1/5 to All on Thu May 29 19:20:01 2025
    I have a package ready for this:

    https://salsa.debian.org/python-team/packages/manhole

    I haven't fully audited the code, but relied on checksums from Arch and
    NixOS for some supply chain security.

    I sent a patch upstream to fix a weird crash I was seeing locally, see:

    https://github.com/ionelmc/python-manhole/pull/71

    A.

    --
    The steel horse fills a gap in modern life, it is an answer not only to
    its needs, but also to its aspirations. It's quite certainly here to
    stay.
    - Le Vélocipède Illustré, 1869

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)