Skip to content

kill_after_timeout watchdog is not able to kill the nested git processes #895

Description

@eekwong

I am using GitPython 2.0.2.

While having kill_after_timeout in the pull()
e.g. g.pull(kill_after_timeout=10)

Before the process killing, there were four processes running:

  1. git pull
  2. git fetch
  3. git-remote-http
  4. git fetch-pack

After the timeout, (3) and (4) remained.

Should _kill_process() be recursively called like the following?

                    if local_pid.isdigit():
                        _kill_process(local_pid) # is it necessary?
                        child_pids.append(int(local_pid))

Activity

  1. Byron commented on Jul 21, 2019

    @Byron
    Member

    Thanks a lot for sharing your findings!
    Indeed, the way it kills the process is SIGKILL, which as far as I know can/will(?) leave child processes detached. So killing the entire process tree seems to be the right thing to do right now. In theory, making recursive calls could work.

    Stray processes could be a real issue in long running processes :/.

  2. nandoabreu commented on Nov 20, 2024

    @nandoabreu

    Hello! Any news on this?
    I am using v3.1.43 and could reproduce when my network connection was down.
    I also could not treat the Exceptions (already catching 3).

  3. Byron commented on Nov 20, 2024

    @Byron
    Member

    From what I can tell, Eliah has collected a lot of probably related information, which may be leveraged into a fix. From what I know, nobody is specifically working on that though.

  4. added theissue type on Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions