[VFS] upload-pack: fix race condition in error messages#188
Merged
derrickstolee merged 1 commit intomicrosoft:vfs-2.23.0from Aug 28, 2019
Merged
[VFS] upload-pack: fix race condition in error messages#188derrickstolee merged 1 commit intomicrosoft:vfs-2.23.0from
derrickstolee merged 1 commit intomicrosoft:vfs-2.23.0from
Conversation
Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement. Since both signals are being output to the same file descriptor (but from parent and child processes), the output we are matching with grep gets split. To reduce the risk of this failure, follow this process instead: 1. Write an error message to stderr. 2. Write an error message across the connection. 3. exit(1). This reorders the events so the error is written entirely before the client receives a message from the remote, removing the race condition. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
garimasi514
approved these changes
Aug 27, 2019
derrickstolee
added a commit
that referenced
this pull request
Oct 25, 2019
…sages Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement. Since both signals are being output to the same file descriptor (but from parent and child processes), the output we are matching with grep gets split. To reduce the risk of this failure, follow this process instead: 1. Write an error message to stderr. 2. Write an error message across the connection. 3. exit(1). This reorders the events so the error is written entirely before the client receives a message from the remote, removing the race condition.
derrickstolee
added a commit
that referenced
this pull request
Nov 4, 2019
…sages Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement. Since both signals are being output to the same file descriptor (but from parent and child processes), the output we are matching with grep gets split. To reduce the risk of this failure, follow this process instead: 1. Write an error message to stderr. 2. Write an error message across the connection. 3. exit(1). This reorders the events so the error is written entirely before the client receives a message from the remote, removing the race condition.
derrickstolee
added a commit
that referenced
this pull request
Jan 14, 2020
…sages Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement. Since both signals are being output to the same file descriptor (but from parent and child processes), the output we are matching with grep gets split. To reduce the risk of this failure, follow this process instead: 1. Write an error message to stderr. 2. Write an error message across the connection. 3. exit(1). This reorders the events so the error is written entirely before the client receives a message from the remote, removing the race condition.
derrickstolee
added a commit
that referenced
this pull request
Feb 21, 2020
…sages Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement. Since both signals are being output to the same file descriptor (but from parent and child processes), the output we are matching with grep gets split. To reduce the risk of this failure, follow this process instead: 1. Write an error message to stderr. 2. Write an error message across the connection. 3. exit(1). This reorders the events so the error is written entirely before the client receives a message from the remote, removing the race condition.
derrickstolee
added a commit
that referenced
this pull request
Mar 17, 2020
…sages Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement. Since both signals are being output to the same file descriptor (but from parent and child processes), the output we are matching with grep gets split. To reduce the risk of this failure, follow this process instead: 1. Write an error message to stderr. 2. Write an error message across the connection. 3. exit(1). This reorders the events so the error is written entirely before the client receives a message from the remote, removing the race condition.
derrickstolee
added a commit
that referenced
this pull request
Mar 23, 2020
…sages Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement. Since both signals are being output to the same file descriptor (but from parent and child processes), the output we are matching with grep gets split. To reduce the risk of this failure, follow this process instead: 1. Write an error message to stderr. 2. Write an error message across the connection. 3. exit(1). This reorders the events so the error is written entirely before the client receives a message from the remote, removing the race condition.
dscho
pushed a commit
that referenced
this pull request
May 20, 2020
…sages Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement. Since both signals are being output to the same file descriptor (but from parent and child processes), the output we are matching with grep gets split. To reduce the risk of this failure, follow this process instead: 1. Write an error message to stderr. 2. Write an error message across the connection. 3. exit(1). This reorders the events so the error is written entirely before the client receives a message from the remote, removing the race condition.
dscho
pushed a commit
that referenced
this pull request
May 20, 2020
…sages Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement. Since both signals are being output to the same file descriptor (but from parent and child processes), the output we are matching with grep gets split. To reduce the risk of this failure, follow this process instead: 1. Write an error message to stderr. 2. Write an error message across the connection. 3. exit(1). This reorders the events so the error is written entirely before the client receives a message from the remote, removing the race condition.
derrickstolee
pushed a commit
that referenced
this pull request
Jun 1, 2020
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
Jul 20, 2020
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
Jul 27, 2020
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
mjcheetham
pushed a commit
that referenced
this pull request
Dec 15, 2020
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
mjcheetham
pushed a commit
that referenced
this pull request
Dec 15, 2020
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Dec 18, 2020
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Dec 24, 2020
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Dec 28, 2020
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Mar 4, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Mar 4, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Mar 4, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Mar 5, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Mar 8, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
jeffhostetler
pushed a commit
that referenced
this pull request
Mar 15, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
jeffhostetler
pushed a commit
that referenced
this pull request
Mar 16, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
May 17, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
May 17, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
May 17, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
May 21, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
May 22, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
May 22, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
May 28, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Jun 2, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Jun 7, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
Aug 3, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
Aug 3, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Aug 5, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
Aug 9, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
Aug 12, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
Aug 17, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho
added a commit
that referenced
this pull request
Oct 30, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
Oct 30, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
pushed a commit
that referenced
this pull request
Oct 31, 2021
Includes commits from these pull requests: #188 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1,
allowtipsha1inwant=true' that checks stderr for a specific error
string from the remote. In some build environments the error sent
over the remote connection gets mingled with the error from the
die() statement. Since both signals are being output to the same
file descriptor (but from parent and child processes), the output
we are matching with grep gets split.
To reduce the risk of this failure, follow this process instead:
This reorders the events so the error is written entirely before
the client receives a message from the remote, removing the race
condition.