All of lore.kernel.org
 help / color / mirror / Atom feed
* Git fork process infinitely and never stop
@ 2022-07-04  9:44 程洋
  2022-07-05 12:32 ` Bagas Sanjaya
  0 siblings, 1 reply; 14+ messages in thread
From: 程洋 @ 2022-07-04  9:44 UTC (permalink / raw)
  To: git; +Cc: 何浩, Xin7 Ma 马鑫

Git Version: 2.36.1

In some circumstance, Git will fork child process forever until my PC crash.
I don’t understand why and I don’t know what log or information I should provide
Details are showed in this Youtube video. Please feel free to ask if I can provide anything.

https://www.youtube.com/watch?v=DTXvgKYjy5k
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Git fork process infinitely and never stop
  2022-07-04  9:44 Git fork process infinitely and never stop 程洋
@ 2022-07-05 12:32 ` Bagas Sanjaya
  2022-07-05 15:25   ` [External Mail]Re: " 程洋
  0 siblings, 1 reply; 14+ messages in thread
From: Bagas Sanjaya @ 2022-07-05 12:32 UTC (permalink / raw)
  To: 程洋, git; +Cc: 何浩, Xin7 Ma 马鑫

On 7/4/22 16:44, 程洋 wrote:
> Git Version: 2.36.1
> 
> In some circumstance, Git will fork child process forever until my PC crash.
> I don’t understand why and I don’t know what log or information I should provide
> Details are showed in this Youtube video. Please feel free to ask if I can provide anything.
> 

Hi and welcome to Git mailing list!

For this bug report to be useful, please include following information,
inline in your email:
- git version
- steps to reproduce the bug
- what you expect and actual behavior, as well as the differences
- system info
- miscellaneous

And don't forget to send as plaintext email.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [External Mail]Re: Git fork process infinitely and never stop
  2022-07-05 12:32 ` Bagas Sanjaya
@ 2022-07-05 15:25   ` 程洋
  2022-07-05 22:50     ` Ævar Arnfjörð Bjarmason
  2022-07-06  7:21     ` lilinchao
  0 siblings, 2 replies; 14+ messages in thread
From: 程洋 @ 2022-07-05 15:25 UTC (permalink / raw)
  To: Bagas Sanjaya, git; +Cc: 何浩, Xin7 Ma 马鑫

- git version:
2.36.1
- steps to reproduce the bug
: We have no idea actually. We're maintainer of our internal git/gerrit. We found sometimes some user will invoke 100+ threads to clone the same repository. And when we ask those guy, they say they only executed the "git fetch" once. And just like the youtube videio, you will find git fork a child git, and then grandson child git, and loop like this forever until the server down.
If we copy their local repository to our own PC, and then execute `git fetch`, we can also reproduce it. It seems that some broken local git files cause this bug
- what you expect and actual behavior, as well as the differences
Mentioned above
- system info
             Ubuntu  18.04
- miscellaneous
N/A

-----Original Message-----
From: Bagas Sanjaya <bagasdotme@gmail.com>
Sent: Tuesday, July 5, 2022 8:33 PM
To: 程洋 <chengyang@xiaomi.com>; git@vger.kernel.org
Cc: 何浩 <hehao@xiaomi.com>; Xin7 Ma 马鑫 <maxin7@xiaomi.com>
Subject: [External Mail]Re: Git fork process infinitely and never stop

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。

On 7/4/22 16:44, 程洋 wrote:
> Git Version: 2.36.1
>
> In some circumstance, Git will fork child process forever until my PC crash.
> I don’t understand why and I don’t know what log or information I
> should provide Details are showed in this Youtube video. Please feel free to ask if I can provide anything.
>

Hi and welcome to Git mailing list!

For this bug report to be useful, please include following information, inline in your email:
- git version
- steps to reproduce the bug
- what you expect and actual behavior, as well as the differences
- system info
- miscellaneous

And don't forget to send as plaintext email.

Thanks.

--
An old man doll... just what I always wanted! - Clara
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [External Mail]Re: Git fork process infinitely and never stop
  2022-07-05 15:25   ` [External Mail]Re: " 程洋
@ 2022-07-05 22:50     ` Ævar Arnfjörð Bjarmason
  2022-07-06  5:34       ` Johannes Sixt
  2022-07-06  7:21     ` lilinchao
  1 sibling, 1 reply; 14+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2022-07-05 22:50 UTC (permalink / raw)
  To: 程洋
  Cc: Bagas Sanjaya, git, 何浩, Xin7 Ma 马鑫


On Tue, Jul 05 2022, 程洋 wrote:

> - git version:
> 2.36.1
> - steps to reproduce the bug
> : We have no idea actually. We're maintainer of our internal
> git/gerrit. We found sometimes some user will invoke 100+ threads to
> clone the same repository. And when we ask those guy, they say they
> only executed the "git fetch" once. And just like the youtube videio,
> you will find git fork a child git, and then grandson child git, and
> loop like this forever until the server down.
> If we copy their local repository to our own PC, and then execute `git fetch`, we can also reproduce it. It seems that some broken local git files cause this bug
> - what you expect and actual behavior, as well as the differences
> Mentioned above
> - system info
>              Ubuntu  18.04
> - miscellaneous

I assume you can't share the repo, but perhaps try if you can reproduce
it with a "git fast-export --anonymize" version of it, and if so whether
you'd be willing to share that. It will publish the "shape of the
history" of the repo, but not any meaningful data (all commits, trees,
blobs etc. are replaced).

Alternatively myself & probably some other regular contributors to git
would be willing to look at that repo + reproduction recipe off the
public ML, to see if we could reproduce the issue, if that sounds good
to you contact me off-list.

Or perhaps we can still figure out a reproduction for this...

The YouTube video shows that you're using various options to git-fetch,
including filters, refspecs etc. Does a plain "git fetch" reproduce
this, and if not what's the option (try adding them one at a time &
experiment) that needs to be added to trigger this?

I somewhat suspect some --filter funny business, but that's just a
hunch...


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [External Mail]Re: Git fork process infinitely and never stop
  2022-07-05 22:50     ` Ævar Arnfjörð Bjarmason
@ 2022-07-06  5:34       ` Johannes Sixt
  0 siblings, 0 replies; 14+ messages in thread
From: Johannes Sixt @ 2022-07-06  5:34 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason, 程洋
  Cc: Bagas Sanjaya, git, 何浩, Xin7 Ma 马鑫

Am 06.07.22 um 00:50 schrieb Ævar Arnfjörð Bjarmason:
> The YouTube video shows that you're using various options to git-fetch,
> including filters, refspecs etc. Does a plain "git fetch" reproduce
> this, and if not what's the option (try adding them one at a time &
> experiment) that needs to be added to trigger this?
> 
> I somewhat suspect some --filter funny business, but that's just a
> hunch...

Hooks may also play a role.

-- Hannes

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: RE: [External Mail]Re: Git fork process infinitely and never stop
  2022-07-05 15:25   ` [External Mail]Re: " 程洋
  2022-07-05 22:50     ` Ævar Arnfjörð Bjarmason
@ 2022-07-06  7:21     ` lilinchao
  2022-07-06 14:03       ` 回复: " 程洋
  1 sibling, 1 reply; 14+ messages in thread
From: lilinchao @ 2022-07-06  7:21 UTC (permalink / raw)
  To: 程洋, Bagas Sanjaya, git
  Cc: 何浩, Xin7 Ma 马鑫

>- git version:
>2.36.1
>- steps to reproduce the bug
>: We have no idea actually. We're maintainer of our internal git/gerrit. We found sometimes some user will invoke 100+ threads to clone the same repository. And when we ask those guy, they say they only executed the "git fetch" once. And just like the youtube videio, you will find git fork a child git, and then grandson child git, and loop like this forever until the server down.
>If we copy their local repository to our own PC, and then execute `git fetch`, we can also reproduce it. It seems that some broken local git files cause this bug 
So the repo "git/gerrit" is hosted in your local? and how you "copy" it to your own PC? 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* 回复: RE: [External Mail]Re: Git fork process infinitely and never stop
  2022-07-06  7:21     ` lilinchao
@ 2022-07-06 14:03       ` 程洋
       [not found]         ` <11f76b2382934edcb97eb201f0a78a67@xiaomi.com>
  0 siblings, 1 reply; 14+ messages in thread
From: 程洋 @ 2022-07-06 14:03 UTC (permalink / raw)
  To: lilinchao, Bagas Sanjaya, git; +Cc: 何浩, Xin7 Ma 马鑫

To lilinchao:
>So the repo "git/gerrit" is hosted in your local? and how you "copy" it to your own PC?
1. git/gerrit is hosted on remote server
               2. I just scp the whole repository of the user who reproduce the problem to our own PC. And then we can reproduce it on our own PC.

To Johannes:
> Hooks may also play a role.
We do have some hooks. But I don't think they're related. Because even I delete those hooks, the problem stands still

To Ævar Arnfjörð:
>I assume you can't share the repo, but perhaps try if you can reproduce it with a "git fast-export --anonymize" version of it, and if so whether you'd be willing to share that. It will publish the "shape of the history" of the repo, but not any meaningful data (all commits, trees, blobs etc. are replaced).
`git fast-export --anonymize` just output is empty. If I try `git fast-export --anonymize --all`, it seems to fetch first, which goes into the infinite loop again

>The YouTube video shows that you're using various options to git-fetch, including filters, refspecs etc. Does a plain "git fetch" reproduce this, and if not what's the option (try adding them one at a time &
>experiment) that needs to be added to trigger this?

`git fetch` also has this problem.

I somewhat suspect some --filter funny business, but that's just a hunch...
It seems to happen after I told my team to use "partial-clone" AND "git v2.36.1".  I'm not sure which one is the cause or both of them cause this.
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: RE: [External Mail]Re: Git fork process infinitely and never stop
       [not found]         ` <11f76b2382934edcb97eb201f0a78a67@xiaomi.com>
@ 2022-07-07 17:54           ` 程洋
  2022-07-08 10:45           ` 程洋
  1 sibling, 0 replies; 14+ messages in thread
From: 程洋 @ 2022-07-07 17:54 UTC (permalink / raw)
  To: lilinchao, Bagas Sanjaya, git
  Cc: 何浩, Xin7 Ma 马鑫,
	凡军辉, 石奉兵

To be a supplement.
If I delete .git/objects/info/commit-graph,  everything works well
As well as fetch with `-c core.commitGraph=false`

-----Original Message-----
From: 程洋
Sent: Thursday, July 7, 2022 10:20 PM
To: 'lilinchao@oschina.cn' <lilinchao@oschina.cn>; 'Bagas Sanjaya' <bagasdotme@gmail.com>; 'git' <git@vger.kernel.org>
Cc: 何浩 <hehao@xiaomi.com>; Xin7 Ma 马鑫 <maxin7@xiaomi.com>; 凡军辉 <fanjunhui@xiaomi.com>; 石奉兵 <shifengbing@xiaomi.com>
Subject: RE: RE: [External Mail]Re: Git fork process infinitely and never stop

I found another thing.

1. if I execute `git fetch --filter=blob:none --quiet --progress miui --prune --tags +refs/heads/*:refs/remotes/miui/* +refs/heads/miui13-s-thor-vendor-stable:refs/remotes/miui/miui13-s-thor-vendor-stable`  on version 2.25.1. It just throw error rather than infinite loop, like this youtube video "https://www.youtube.com/watch?v=qvYTvVRE0FU&feature=youtu.be"

2. I found if I delete .git/objects, everything goes fine. And there are only 20 files inside it. So I delete them one by one to see which cause the problem. It's `.git/objects/info/commit-graph`. So I upload the file as attachment


Tree before I do second experiment
.
├── 20
│   └── 740928c988ed93daf943869621290d68f62b47
├── 25
│   └── cbb5f02bbcde2effebba84bbc866a29e68afdf
├── 36
│   └── 3aa2d25b71c5aff9d0d8ad8207bc27b4492e8b
├── 5b
│   └── 7b5cb8dd63be48e1466c9d957420a9765a805e
├── 65
│   └── e272c21f28fa8e28dd904f3576f5f23cdb8214
├── 8b
│   └── 148aa56b7c559e217bd31a16e886b16e21cde1
├── 97
│   └── faebca644ae8bfebcbdc8a1dd8e179e9b657de
├── a3
│   └── 852cda2af632dcc7dfbe466d6d8608c2e06520
├── a4
│   └── aa8ae78300217b0da0ab7c4b8ea22b5b74b958
├── a9
│   ├── 04e09d1ee0e0b89acd5196326399d89de70742
│   └── 7d1ffa5c4dad081469b356d0571d0b6166d00e
├── b3
│   └── 2b750166e2d54b8bd3ac62d7aeaf732e14f20d
├── b8
│   └── 957799c3a460ba2e0d26ce0081a4d092dcfb17
├── c5
│   └── be026b3b87a1ae4321700ee45ffcb5eee3ca48
├── d1
│   └── e65d268d5a2230d1d869d55497e0c1eb59b9a5
├── dd
│   └── 483c3c475117275bbf7768a940962842bd5aeb
├── e2
│   └── 6899458dc6cf2c3749c0732ac5b04ccd4c7765
├── e3
│   └── 06b12e22c7914ff80374b7857ee67864a61ba5
├── e7
│   └── a0cc17f9939b80b135c0ec389cbcc98aea70c7
├── eb
│   └── 9169a0d2124594e92720fc6ac1ce3fb29c7d87
├── ed
│   └── 6a815060f960032ecaf70fefdbdae4ac466314
├── f8
│   └── 4401972a0a7020aef85b83561d70af41962a6f
├── info
│   ├── commit-graph
│   └── packs
└── pack
    ├── pack-029d08823bd8a8eab510ad6ac75c823cfd3ed31e.idx
    ├── pack-029d08823bd8a8eab510ad6ac75c823cfd3ed31e.pack
    ├── pack-029d08823bd8a8eab510ad6ac75c823cfd3ed31e.promisor
    ├── pack-c931093ae6c9df5d36b773f94efc38d9d4b39108.idx
    ├── pack-c931093ae6c9df5d36b773f94efc38d9d4b39108.pack
    ├── pack-c931093ae6c9df5d36b773f94efc38d9d4b39108.promisor
    ├── tmp_idx_RRo8oo
    └── tmp_pack_1hgueq



-----------------------------------------------------------------------------------Original Message---------------------------------------------------------------------------------------------------------------------------------------
From: 程洋
Sent: Wednesday, July 6, 2022 10:03 PM
To: lilinchao@oschina.cn; Bagas Sanjaya <bagasdotme@gmail.com>; git <git@vger.kernel.org>
Cc: 何浩 <hehao@xiaomi.com>; Xin7 Ma 马鑫 <maxin7@xiaomi.com>
Subject: 回复: RE: [External Mail]Re: Git fork process infinitely and never stop

To lilinchao:
>So the repo "git/gerrit" is hosted in your local? and how you "copy" it to your own PC?
1. git/gerrit is hosted on remote server
               2. I just scp the whole repository of the user who reproduce the problem to our own PC. And then we can reproduce it on our own PC.

To Johannes:
> Hooks may also play a role.
We do have some hooks. But I don't think they're related. Because even I delete those hooks, the problem stands still

To Ævar Arnfjörð:
>I assume you can't share the repo, but perhaps try if you can reproduce it with a "git fast-export --anonymize" version of it, and if so whether you'd be willing to share that. It will publish the "shape of the history" of the repo, but not any meaningful data (all commits, trees, blobs etc. are replaced).
`git fast-export --anonymize` just output is empty. If I try `git fast-export --anonymize --all`, it seems to fetch first, which goes into the infinite loop again

>The YouTube video shows that you're using various options to git-fetch, including filters, refspecs etc. Does a plain "git fetch" reproduce this, and if not what's the option (try adding them one at a time &
>experiment) that needs to be added to trigger this?

`git fetch` also has this problem.

I somewhat suspect some --filter funny business, but that's just a hunch...
It seems to happen after I told my team to use "partial-clone" AND "git v2.36.1".  I'm not sure which one is the cause or both of them cause this.
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: RE: [External Mail]Re: Git fork process infinitely and never stop
       [not found]         ` <11f76b2382934edcb97eb201f0a78a67@xiaomi.com>
  2022-07-07 17:54           ` 程洋
@ 2022-07-08 10:45           ` 程洋
  2022-07-09  0:26             ` possible bug with commit-graph causing git to fork bomb (was Re: [External Mail]Re: Git fork process infinitely and never stop) Carlo Marcelo Arenas Belón
  1 sibling, 1 reply; 14+ messages in thread
From: 程洋 @ 2022-07-08 10:45 UTC (permalink / raw)
  To: lilinchao, Bagas Sanjaya, git
  Cc: 何浩, Xin7 Ma 马鑫,
	凡军辉, 石奉兵

Any feedback on this?

-----Original Message-----
From: 程洋
Sent: Friday, July 8, 2022 1:54 AM
To: 'lilinchao@oschina.cn' <lilinchao@oschina.cn>; 'Bagas Sanjaya' <bagasdotme@gmail.com>; 'git' <git@vger.kernel.org>
Cc: 何浩 <hehao@xiaomi.com>; Xin7 Ma 马鑫 <maxin7@xiaomi.com>; 凡军辉 <fanjunhui@xiaomi.com>; 石奉兵 <shifengbing@xiaomi.com>
Subject: RE: RE: [External Mail]Re: Git fork process infinitely and never stop

To be a supplement.
If I delete .git/objects/info/commit-graph,  everything works well As well as fetch with `-c core.commitGraph=false`

-----Original Message-----
From: 程洋
Sent: Thursday, July 7, 2022 10:20 PM
To: 'lilinchao@oschina.cn' <lilinchao@oschina.cn>; 'Bagas Sanjaya' <bagasdotme@gmail.com>; 'git' <git@vger.kernel.org>
Cc: 何浩 <hehao@xiaomi.com>; Xin7 Ma 马鑫 <maxin7@xiaomi.com>; 凡军辉 <fanjunhui@xiaomi.com>; 石奉兵 <shifengbing@xiaomi.com>
Subject: RE: RE: [External Mail]Re: Git fork process infinitely and never stop

I found another thing.

1. if I execute `git fetch --filter=blob:none --quiet --progress miui --prune --tags +refs/heads/*:refs/remotes/miui/* +refs/heads/miui13-s-thor-vendor-stable:refs/remotes/miui/miui13-s-thor-vendor-stable`  on version 2.25.1. It just throw error rather than infinite loop, like this youtube video "https://www.youtube.com/watch?v=qvYTvVRE0FU&feature=youtu.be"

2. I found if I delete .git/objects, everything goes fine. And there are only 20 files inside it. So I delete them one by one to see which cause the problem. It's `.git/objects/info/commit-graph`. So I upload the file as attachment


Tree before I do second experiment
.
├── 20
│   └── 740928c988ed93daf943869621290d68f62b47
├── 25
│   └── cbb5f02bbcde2effebba84bbc866a29e68afdf
├── 36
│   └── 3aa2d25b71c5aff9d0d8ad8207bc27b4492e8b
├── 5b
│   └── 7b5cb8dd63be48e1466c9d957420a9765a805e
├── 65
│   └── e272c21f28fa8e28dd904f3576f5f23cdb8214
├── 8b
│   └── 148aa56b7c559e217bd31a16e886b16e21cde1
├── 97
│   └── faebca644ae8bfebcbdc8a1dd8e179e9b657de
├── a3
│   └── 852cda2af632dcc7dfbe466d6d8608c2e06520
├── a4
│   └── aa8ae78300217b0da0ab7c4b8ea22b5b74b958
├── a9
│   ├── 04e09d1ee0e0b89acd5196326399d89de70742
│   └── 7d1ffa5c4dad081469b356d0571d0b6166d00e
├── b3
│   └── 2b750166e2d54b8bd3ac62d7aeaf732e14f20d
├── b8
│   └── 957799c3a460ba2e0d26ce0081a4d092dcfb17
├── c5
│   └── be026b3b87a1ae4321700ee45ffcb5eee3ca48
├── d1
│   └── e65d268d5a2230d1d869d55497e0c1eb59b9a5
├── dd
│   └── 483c3c475117275bbf7768a940962842bd5aeb
├── e2
│   └── 6899458dc6cf2c3749c0732ac5b04ccd4c7765
├── e3
│   └── 06b12e22c7914ff80374b7857ee67864a61ba5
├── e7
│   └── a0cc17f9939b80b135c0ec389cbcc98aea70c7
├── eb
│   └── 9169a0d2124594e92720fc6ac1ce3fb29c7d87
├── ed
│   └── 6a815060f960032ecaf70fefdbdae4ac466314
├── f8
│   └── 4401972a0a7020aef85b83561d70af41962a6f
├── info
│   ├── commit-graph
│   └── packs
└── pack
    ├── pack-029d08823bd8a8eab510ad6ac75c823cfd3ed31e.idx
    ├── pack-029d08823bd8a8eab510ad6ac75c823cfd3ed31e.pack
    ├── pack-029d08823bd8a8eab510ad6ac75c823cfd3ed31e.promisor
    ├── pack-c931093ae6c9df5d36b773f94efc38d9d4b39108.idx
    ├── pack-c931093ae6c9df5d36b773f94efc38d9d4b39108.pack
    ├── pack-c931093ae6c9df5d36b773f94efc38d9d4b39108.promisor
    ├── tmp_idx_RRo8oo
    └── tmp_pack_1hgueq



-----------------------------------------------------------------------------------Original Message---------------------------------------------------------------------------------------------------------------------------------------
From: 程洋
Sent: Wednesday, July 6, 2022 10:03 PM
To: lilinchao@oschina.cn; Bagas Sanjaya <bagasdotme@gmail.com>; git <git@vger.kernel.org>
Cc: 何浩 <hehao@xiaomi.com>; Xin7 Ma 马鑫 <maxin7@xiaomi.com>
Subject: 回复: RE: [External Mail]Re: Git fork process infinitely and never stop

To lilinchao:
>So the repo "git/gerrit" is hosted in your local? and how you "copy" it to your own PC?
1. git/gerrit is hosted on remote server
               2. I just scp the whole repository of the user who reproduce the problem to our own PC. And then we can reproduce it on our own PC.

To Johannes:
> Hooks may also play a role.
We do have some hooks. But I don't think they're related. Because even I delete those hooks, the problem stands still

To Ævar Arnfjörð:
>I assume you can't share the repo, but perhaps try if you can reproduce it with a "git fast-export --anonymize" version of it, and if so whether you'd be willing to share that. It will publish the "shape of the history" of the repo, but not any meaningful data (all commits, trees, blobs etc. are replaced).
`git fast-export --anonymize` just output is empty. If I try `git fast-export --anonymize --all`, it seems to fetch first, which goes into the infinite loop again

>The YouTube video shows that you're using various options to git-fetch,
>including filters, refspecs etc. Does a plain "git fetch" reproduce
>this, and if not what's the option (try adding them one at a time &
>experiment) that needs to be added to trigger this?

`git fetch` also has this problem.

I somewhat suspect some --filter funny business, but that's just a hunch...
It seems to happen after I told my team to use "partial-clone" AND "git v2.36.1".  I'm not sure which one is the cause or both of them cause this.
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

^ permalink raw reply	[flat|nested] 14+ messages in thread

* possible bug with commit-graph causing git to fork bomb (was Re: [External Mail]Re: Git fork process infinitely and never stop)
  2022-07-08 10:45           ` 程洋
@ 2022-07-09  0:26             ` Carlo Marcelo Arenas Belón
  2022-07-09  0:52               ` Han Xin
  0 siblings, 1 reply; 14+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2022-07-09  0:26 UTC (permalink / raw)
  To: 程洋
  Cc: lilinchao, Bagas Sanjaya, git, 何浩,
	Xin7 Ma 马鑫, 凡军辉,
	石奉兵,
	Derrick Stolee

On Fri, Jul 08, 2022 at 10:45:08AM +0000, 程洋 wrote:
> Any feedback on this?

My guess is that the problem has been difficult enough to reproduce with
the instructions you provided and because of the top posting that the
people most likely to come up with a solution are not even aware yet of
the issue.

I changed the subject and I am including some of your discovery below
and copying someone that might know better, but trying to find a way
to provide a repository where this could be replicated locally (maybe
using the --anonymize option mentioned in the thread) or a copy of the
repository (not in an attachment) if it is not sensitive would be of a
lot of help.

Also, I heard rumours that most of the people working with that feature
that you might have identified as problematic might be off this week, so
might need to wait a little longer.

Carlo

PS. also, try to post your responses inline like this one.

------ CUT BELOW FOR PROBABLY RELEVANT INFORMATION FROM THREAD ------

Stolee

> To be a supplement.
> If I delete .git/objects/info/commit-graph,  everything works well As well as fetch with `-c core.commitGraph=false`

This would seem to indicate that something in the repository might be
triggered by the commit-graph code.

> if I execute `git fetch --filter=blob:none --quiet --progress miui --prune --tags +refs/heads/*:refs/remotes/miui/* +refs/heads/miui13-s-thor-vendor-stable:refs/remotes/miui/miui13-s-thor-vendor-stable`  on version 2.25.1. It just throw error rather than infinite loop, like this youtube video "https://www.youtube.com/watch?v=qvYTvVRE0FU&feature=youtu.be"

maybe a regression?

Carlo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: possible bug with commit-graph causing git to fork bomb (was Re: [External Mail]Re: Git fork process infinitely and never stop)
  2022-07-09  0:26             ` possible bug with commit-graph causing git to fork bomb (was Re: [External Mail]Re: Git fork process infinitely and never stop) Carlo Marcelo Arenas Belón
@ 2022-07-09  0:52               ` Han Xin
  2022-07-09  6:39                 ` Carlo Arenas
  0 siblings, 1 reply; 14+ messages in thread
From: Han Xin @ 2022-07-09  0:52 UTC (permalink / raw)
  To: carenas
  Cc: bagasdotme, chengyang, derrickstolee, fanjunhui, git, hehao,
	lilinchao, maxin7, shifengbing

> > To be a supplement.
> > If I delete .git/objects/info/commit-graph,  everything works well As well as fetch with `-c core.commitGraph=false`
> 
> This would seem to indicate that something in the repository might be
> triggered by the commit-graph code.
> 
> > if I execute `git fetch --filter=blob:none --quiet --progress miui --prune --tags +refs/heads/*:refs/remotes/miui/* +refs/heads/miui13-s-thor-vendor-stable:refs/remotes/miui/miui13-s-thor-vendor-stable`  on version 2.25.1. It just throw error rather than infinite loop, like this youtube video "https://www.youtube.com/watch?v=qvYTvVRE0FU&feature=youtu.be"
> 
> maybe a regression?
> 
> Carlo

I looks like the same issue I reported in [1], and we can see the fixup
in [2].

1. https://lore.kernel.org/git/20220612161707.21807-1-chiyutianyi@gmail.com/
2. https://lore.kernel.org/git/cover.1656593279.git.hanxin.hx@bytedance.com/

-Han Xin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: possible bug with commit-graph causing git to fork bomb (was Re: [External Mail]Re: Git fork process infinitely and never stop)
  2022-07-09  0:52               ` Han Xin
@ 2022-07-09  6:39                 ` Carlo Arenas
  2022-07-11  4:11                   ` 程洋
  2022-09-27 14:25                   ` 程洋
  0 siblings, 2 replies; 14+ messages in thread
From: Carlo Arenas @ 2022-07-09  6:39 UTC (permalink / raw)
  To: Han Xin
  Cc: bagasdotme, chengyang, derrickstolee, fanjunhui, git, hehao,
	lilinchao, maxin7, shifengbing

On Fri, Jul 8, 2022 at 5:52 PM Han Xin <hanxin.hx@bytedance.com> wrote:
>
> > > To be a supplement.
> > > If I delete .git/objects/info/commit-graph,  everything works well As well as fetch with `-c core.commitGraph=false`
> >
> > This would seem to indicate that something in the repository might be
> > triggered by the commit-graph code.
> >
> > > if I execute `git fetch --filter=blob:none --quiet --progress miui --prune --tags +refs/heads/*:refs/remotes/miui/* +refs/heads/miui13-s-thor-vendor-stable:refs/remotes/miui/miui13-s-thor-vendor-stable`  on version 2.25.1. It just throw error rather than infinite loop, like this youtube video "https://www.youtube.com/watch?v=qvYTvVRE0FU&feature=youtu.be"
> >
> > maybe a regression?
> >
> > Carlo
>
> I looks like the same issue I reported in [1], and we can see the fixup
> in [2].
>
> 1. https://lore.kernel.org/git/20220612161707.21807-1-chiyutianyi@gmail.com/
> 2. https://lore.kernel.org/git/cover.1656593279.git.hanxin.hx@bytedance.com/

Indeed; and it is already integrated through
hx/lookup-commit-in-graph-fix and merged all the way to "next", which
would likely become 2.38 sometime soon.

程洋,

if you could build a new git version based on next and confirm it
solves your problem, it would help us all.

Alternative can get that single "one line" patch[1] and integrate it
on top of the git version you are using.

Carlo

[1] https://lore.kernel.org/git/96d4bb71505d87ed501c058bbd89bfc13d08b24a.1656593279.git.hanxin.hx@bytedance.com/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: possible bug with commit-graph causing git to fork bomb (was Re: [External Mail]Re: Git fork process infinitely and never stop)
  2022-07-09  6:39                 ` Carlo Arenas
@ 2022-07-11  4:11                   ` 程洋
  2022-09-27 14:25                   ` 程洋
  1 sibling, 0 replies; 14+ messages in thread
From: 程洋 @ 2022-07-11  4:11 UTC (permalink / raw)
  To: Carlo Arenas, Han Xin
  Cc: bagasdotme, derrickstolee, 凡军辉,
	git, 何浩, lilinchao, Xin7 Ma 马鑫,
	石奉兵

> if you could build a new git version based on next and confirm it solves your
> problem, it would help us all.
>
> Alternative can get that single "one line" patch[1] and integrate it on top of
> the git version you are using.
>
> Carlo
>
> [1]
> https://lore.kernel.org/git/96d4bb71505d87ed501c058bbd89bfc13d08b24a.1
> 656593279.git.hanxin.hx@bytedance.com/

Yes. This patch works. I think it is the root cause of my problem
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: possible bug with commit-graph causing git to fork bomb (was Re: [External Mail]Re: Git fork process infinitely and never stop)
  2022-07-09  6:39                 ` Carlo Arenas
  2022-07-11  4:11                   ` 程洋
@ 2022-09-27 14:25                   ` 程洋
  1 sibling, 0 replies; 14+ messages in thread
From: 程洋 @ 2022-09-27 14:25 UTC (permalink / raw)
  To: Carlo Arenas, Han Xin
  Cc: bagasdotme, derrickstolee, 凡军辉,
	git, 何浩, lilinchao, Xin7 Ma 马鑫,
	石奉兵

I found another fork bomb with partial-clone but not related to commitGraph

Here is the video: https://youtu.be/3Xun4PQNQC4

And here is the tree command, GIT_TREACE2 and GIT_TRACE_PACKET log
https://drive.google.com/file/d/1mJ4-UcA8ytdjrYL7K6XxCtxys-DRRTqd/view?usp=sharing
https://drive.google.com/file/d/1rOlskap5l2Z1N6LnaBgLhW-G_UF8zx3Z/view?usp=sharing
https://drive.google.com/file/d/1zjI7Cm4aXv3fhPN3F_cwY15Ua-p4ncFl/view?usp=sharing

I still have the scene which can reproduce this bug. If there is something else I can provide, feel free to ask

>
> On Fri, Jul 8, 2022 at 5:52 PM Han Xin <hanxin.hx@bytedance.com> wrote:
> >
> > > > To be a supplement.
> > > > If I delete .git/objects/info/commit-graph,  everything works well
> > > > As well as fetch with `-c core.commitGraph=false`
> > >
> > > This would seem to indicate that something in the repository might
> > > be triggered by the commit-graph code.
> > >
> > > > if I execute `git fetch --filter=blob:none --quiet --progress miui --prune -
> -tags +refs/heads/*:refs/remotes/miui/* +refs/heads/miui13-s-thor-
> vendor-stable:refs/remotes/miui/miui13-s-thor-vendor-stable`  on version
> 2.25.1. It just throw error rather than infinite loop, like this youtube video
> "https://www.youtube.com/watch?v=qvYTvVRE0FU&feature=youtu.be"
> > >
> > > maybe a regression?
> > >
> > > Carlo
> >
> > I looks like the same issue I reported in [1], and we can see the
> > fixup in [2].
> >
> > 1.
> > https://lore.kernel.org/git/20220612161707.21807-1-chiyutianyi@gmail.c
> > om/ 2.
> > https://lore.kernel.org/git/cover.1656593279.git.hanxin.hx@bytedance.c
> > om/
>
> Indeed; and it is already integrated through hx/lookup-commit-in-graph-fix
> and merged all the way to "next", which would likely become 2.38 sometime
> soon.
>
> 程洋,
>
> if you could build a new git version based on next and confirm it solves your
> problem, it would help us all.
>
> Alternative can get that single "one line" patch[1] and integrate it on top of
> the git version you are using.
>
> Carlo
>
> [1]
> https://lore.kernel.org/git/96d4bb71505d87ed501c058bbd89bfc13d08b24a.1
> 656593279.git.hanxin.hx@bytedance.com/
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-09-27 14:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04  9:44 Git fork process infinitely and never stop 程洋
2022-07-05 12:32 ` Bagas Sanjaya
2022-07-05 15:25   ` [External Mail]Re: " 程洋
2022-07-05 22:50     ` Ævar Arnfjörð Bjarmason
2022-07-06  5:34       ` Johannes Sixt
2022-07-06  7:21     ` lilinchao
2022-07-06 14:03       ` 回复: " 程洋
     [not found]         ` <11f76b2382934edcb97eb201f0a78a67@xiaomi.com>
2022-07-07 17:54           ` 程洋
2022-07-08 10:45           ` 程洋
2022-07-09  0:26             ` possible bug with commit-graph causing git to fork bomb (was Re: [External Mail]Re: Git fork process infinitely and never stop) Carlo Marcelo Arenas Belón
2022-07-09  0:52               ` Han Xin
2022-07-09  6:39                 ` Carlo Arenas
2022-07-11  4:11                   ` 程洋
2022-09-27 14:25                   ` 程洋

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.