# BUG: git log dies to SIGPIPE

5 messages from 2021-08-02 to 2021-09-27. Participants: Joseph Jenne, Jeff King, ZheNing Hu, Ævar Arnfjörð Bjarmason.
Thread: https://gitlist.dev/t/56200

## Joseph Jenne, 2021-08-02 17:46

Subject: BUG: git log dies to SIGPIPE
Message-ID: <CAB5AetcMK6=yZh4OY-0A6x6vs7X+0_1APfp4cCP_MSK_TO46ow@mail.gmail.com>
URL: https://gitlist.dev/e/CAB5AetcMK6%3DyZh4OY-0A6x6vs7X%2B0_1APfp4cCP_MSK_TO46ow%40mail.gmail.com

```
What did you do before the bug happened? (Steps to reproduce your issue)
used `git log`, exiting the viewer (`less`) before reading the entire
commit history of the project
What did you expect to happen? (Expected behavior)
normal exit with status code 0
What happened instead? (Actual behavior)
git log dies to SIGPIPE after `less` exits
What's different between what you expected and what actually happened?
git does not exit normally as would be expected
Anything else you want to add:



[System Info]
git version:
git version 2.30.2
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.10.0-8-amd64 #1 SMP Debian 5.10.46-2 (2021-07-20) x86_64
compiler info: gnuc: 10.2
libc info: glibc: 2.31
$SHELL (typically, interactive shell): /bin/zsh

```

## Jeff King, 2021-08-02 18:08

Subject: Re: BUG: git log dies to SIGPIPE
Message-ID: <YQg0t2bzqwBJ02yL@coredump.intra.peff.net>
URL: https://gitlist.dev/e/YQg0t2bzqwBJ02yL%40coredump.intra.peff.net
In-Reply-To: <CAB5AetcMK6=yZh4OY-0A6x6vs7X+0_1APfp4cCP_MSK_TO46ow@mail.gmail.com>

```
On Mon, Aug 02, 2021 at 10:46:53AM -0700, Joseph Jenne wrote:

> What did you do before the bug happened? (Steps to reproduce your issue)
> used `git log`, exiting the viewer (`less`) before reading the entire
> commit history of the project
> What did you expect to happen? (Expected behavior)
> normal exit with status code 0
> What happened instead? (Actual behavior)
> git log dies to SIGPIPE after `less` exits
> What's different between what you expected and what actually happened?
> git does not exit normally as would be expected

FWIW, there was a discussion about this a few months ago:

  https://lore.kernel.org/git/YAG%2FvzctP4JwSp5x@zira.vinc17.org/

-Peff

```

## Joseph Jenne, 2021-08-02 18:16

Subject: Re: BUG: git log dies to SIGPIPE
Message-ID: <CAB5Aetcr4KWpyv13DtmxxfUBwEN4fgWHgmbN7YcJ9Lgs2viAVg@mail.gmail.com>
URL: https://gitlist.dev/e/CAB5Aetcr4KWpyv13DtmxxfUBwEN4fgWHgmbN7YcJ9Lgs2viAVg%40mail.gmail.com
In-Reply-To: <YQg0t2bzqwBJ02yL@coredump.intra.peff.net>

```
Thanks, I'll check it out.

On Mon, Aug 2, 2021 at 11:08 AM Jeff King <peff@peff.net> wrote:
>
> On Mon, Aug 02, 2021 at 10:46:53AM -0700, Joseph Jenne wrote:
>
> > What did you do before the bug happened? (Steps to reproduce your issue)
> > used `git log`, exiting the viewer (`less`) before reading the entire
> > commit history of the project
> > What did you expect to happen? (Expected behavior)
> > normal exit with status code 0
> > What happened instead? (Actual behavior)
> > git log dies to SIGPIPE after `less` exits
> > What's different between what you expected and what actually happened?
> > git does not exit normally as would be expected
>
> FWIW, there was a discussion about this a few months ago:
>
>   https://lore.kernel.org/git/YAG%2FvzctP4JwSp5x@zira.vinc17.org/
>
> -Peff

```

## ZheNing Hu, 2021-09-26 13:17

Subject: Re: BUG: git log dies to SIGPIPE
Message-ID: <CAOLTT8QqF-4rRiuWwntA3TfauCfc-MKingPQmyuKw3r5zf7O3A@mail.gmail.com>
URL: https://gitlist.dev/e/CAOLTT8QqF-4rRiuWwntA3TfauCfc-MKingPQmyuKw3r5zf7O3A%40mail.gmail.com
In-Reply-To: <CAB5AetcMK6=yZh4OY-0A6x6vs7X+0_1APfp4cCP_MSK_TO46ow@mail.gmail.com>

```
Joseph Jenne <joseph.jenne15@gmail.com> 于2021年8月3日周二 上午1:47写道：
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> used `git log`, exiting the viewer (`less`) before reading the entire
> commit history of the project
> What did you expect to happen? (Expected behavior)
> normal exit with status code 0
> What happened instead? (Actual behavior)
> git log dies to SIGPIPE after `less` exits
> What's different between what you expected and what actually happened?
> git does not exit normally as would be expected
> Anything else you want to add:
>
>
>
> [System Info]
> git version:
> git version 2.30.2
> cpu: x86_64
> no commit associated with this build
> sizeof-long: 8
> sizeof-size_t: 8
> shell-path: /bin/sh
> uname: Linux 5.10.0-8-amd64 #1 SMP Debian 5.10.46-2 (2021-07-20) x86_64
> compiler info: gnuc: 10.2
> libc info: glibc: 2.31
> $SHELL (typically, interactive shell): /bin/zsh

I may be a little unresponsive, I also saw this bug today, and there
is no such bug
in a small repository, it only appears in a large repository.

I now know that it comes from outside git, this is really bad.

--
ZheNing Hu

```

## Ævar Arnfjörð Bjarmason, 2021-09-27 00:29

Subject: Re: BUG: git log dies to SIGPIPE
Message-ID: <87y27i273e.fsf@evledraar.gmail.com>
URL: https://gitlist.dev/e/87y27i273e.fsf%40evledraar.gmail.com
In-Reply-To: <CAOLTT8QqF-4rRiuWwntA3TfauCfc-MKingPQmyuKw3r5zf7O3A@mail.gmail.com>

```

On Sun, Sep 26 2021, ZheNing Hu wrote:

> Joseph Jenne <joseph.jenne15@gmail.com> 于2021年8月3日周二 上午1:47写道：
>>
>> What did you do before the bug happened? (Steps to reproduce your issue)
>> used `git log`, exiting the viewer (`less`) before reading the entire
>> commit history of the project
>> What did you expect to happen? (Expected behavior)
>> normal exit with status code 0
>> What happened instead? (Actual behavior)
>> git log dies to SIGPIPE after `less` exits
>> What's different between what you expected and what actually happened?
>> git does not exit normally as would be expected
>> Anything else you want to add:
>>
>>
>>
>> [System Info]
>> git version:
>> git version 2.30.2
>> cpu: x86_64
>> no commit associated with this build
>> sizeof-long: 8
>> sizeof-size_t: 8
>> shell-path: /bin/sh
>> uname: Linux 5.10.0-8-amd64 #1 SMP Debian 5.10.46-2 (2021-07-20) x86_64
>> compiler info: gnuc: 10.2
>> libc info: glibc: 2.31
>> $SHELL (typically, interactive shell): /bin/zsh
>
> I may be a little unresponsive, I also saw this bug today, and there
> is no such bug
> in a small repository, it only appears in a large repository.
>
> I now know that it comes from outside git, this is really bad.

Please see the discussion starting at
https://lore.kernel.org/git/YAG%2FvzctP4JwSp5x@zira.vinc17.org/ about
whether this is even considered a bug, but in any case the causes are
well understood.

```
