Skip to content

Lazygit terminating unrelated processes #3008

@Jim-with-a-J

Description

@Jim-with-a-J

Describe the bug
Processes occasionally exit for no apparent reason while using lazygit. Usually after it has been running in the background for a while. It does not seem predictable or reliably reproducible. After failing to find an explanation for randomly exiting programs, I enabled Process Exit Monitoring and now I have events saying lazygit.exe was the killing process. Microsoft Teams, Outlook and Opera are common victims, but I've seen other programs exit unexpectedly as well. I cannot say for sure lazygit was responsible in all cases though.

An example event message from the exit monitor just says:
The process 'C:\Path\To\Teams.exe' was terminated by the process 'C:\Path\To\lazygit.exe' with termination code 1. The creation time for the exiting process was [hex timestamp].

It's not clear how often this happens, I only have three events mentioning lazygit since I enabled the monitor a few weeks ago. I'm sorry this is such a nebulous report, but I wanted to submit it in case people more familiar with the code might have better explanations or suggestions of things to investigate.

To Reproduce
Steps to reproduce the behavior:

  1. [Enable Process Exit Monitoring] (https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/setting-and-clearing-flags-for-silent-process-exit)
  2. Run lazygit
  3. Don't exit for a fairly long time (it seems to happen within a couple of days, but might depend on other activity as well)
  4. Watch for events where lazygit has terminated an unrelated process.

Expected behavior
Non-git processes are never terminated.

Version info:
commit=5e388e21c8ca6aa883dbcbe45c47f6fdd5116815, build date=2023-08-07T14:05:48Z, build source=binaryRelease, version=0.40.2, os=windows, arch=amd64, git version=2.41.0.windows.3

git version 2.41.0.windows.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions