-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
warning: failed to restrict file handles (5) #2353
Comments
There was some hearsay that SourceTree internally used an older version. But I'm not sure if that is just a scurrilous rumour (I don't use SourceTree). Was the git version generated from a command issued inside SourceTree (and what version of SourceTree is it?) |
No that can't be the issue.
|
According to https://github.com/git-for-windows/git-sdk-64/blob/f146d8c11c82ba1e976752df10ea9f92ab914141/mingw64/x86_64-w64-mingw32/include/winerror.h#L50, this means "Access denied".
the As far as I remember, pipes are inheritable anyways, so it does not make sense to include them in the "restrict file handles" code path. @LeonardGC since your example is not exactly minimal (I don't have Maven, and as far as I remember, the first Maven run always downloads half the internet), can you try the following:
|
Hi Johannes,
thanks for this nice explanation, but at this moment, the issue is not
reproducible...
I saw the error message and did as instructed. If this is a recurring
issue, I'll come back to you. Is this ok for you?
Op di 8 okt. 2019 om 22:49 schreef Johannes Schindelin <
notifications@github.com>:
… failed to restrict file handles (5)
According to
https://github.com/git-for-windows/git-sdk-64/blob/f146d8c11c82ba1e976752df10ea9f92ab914141/mingw64/x86_64-w64-mingw32/include/winerror.h#L50,
this means "Access denied".
handle #0: 0000000000000440 (type 3, handle info (1) 0
the 3 means
<https://github.com/git-for-windows/git/blob/v2.23.0.windows.1/compat/mingw.c#L1885>
that the file type is that it is a pipe
<https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfiletype>
.
As far as I remember, pipes are inheritable anyways, so it does not make
sense to include them in the "restrict file handles" code path.
@LeonardGC <https://github.com/LeonardGC> since your example is not
exactly minimal (I don't have Maven, and as far as I remember, the first
Maven run always downloads half the internet), can you try the following:
1.
install the Git for Windows SDK
<https://gitforwindows.org/#download-sdk>,
2.
sdk cd git
3.
insert something like this before
https://github.com/git-for-windows/git/blob/v2.23.0.windows.1/compat/mingw.c#L1830
:
if (stdhandles_count > 0) {
/* skip pipe handles; they are inheritable by default, anyway */
DWORD i, j;
for (i = j = 0; i < stdhandles_count; i++)
if (GetFileType(stdhandles[i]) != FILE_TYPE_PIPE)
stdhandles[j++] = stdhandles[i];
stdhandles_count = j;
}
(Note: I wrote this on the web, it might need adjusting before it
compiles.)
4.
make -j$(nproc) install
5.
test by inserting the SDK's mingw64\bin and usr\bin into the PATH, at
the beginning
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2353?email_source=notifications&email_token=ACBZUO36OG4T4XRWHHU2RBTQNTW7BA5CNFSM4I6S5PFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAVSINQ#issuecomment-539698230>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACBZUO7OIIQ7AVDRENQP5P3QNTW7BANCNFSM4I6S5PFA>
.
|
thanks for this nice explanation, but at this moment, the issue is not
reproducible...
Okay.
I saw the error message and did as instructed. If this is a recurring
issue, I'll come back to you. Is this ok for you?
Sure. How about closing the ticket in the meantime?
|
ISSUE: from a script
Log:
...
(mvn build)
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.419 s
[INFO] Finished at: 2019-10-08T16:33:35+02:00
[INFO] ------------------------------------------------------------------------
[master 8269297] Release v5.16.3
5 files changed, 5 insertions(+), 5 deletions(-)
warning: failed to restrict file handles (5)
handle #0: 0000000000000440 (type 3, handle info (1) 0
handle #1: 0000000000000444 (type 3, handle info (1) 1
This is a bug; please report it at
https://github.com/git-for-windows/git/issues/new
To suppress this warning, please set the environment variable
Already up to date.
...
Setup
git version 2.23.0.windows.1
cpu: x86_64
built from commit: 4db2e5c
sizeof-long: 4
sizeof-size_t: 8
Microsoft Windows [Version 10.0.18362.356]
defaults?
Editor Option: Notepad++
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Disabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Disabled
to the issue you're seeing?
Command window was started from inside SourceTree (Clicked on Terminal)
Details
MingW64?
Minimal, Complete, and Verifiable example
this will help us understand the issue.
I ran a script.
This were the last commands of that script:
********** START **************
git merge develop
mvn org.codehaus.mojo:versions-maven-plugin:set -DnewVersion=${NEW_VERSION} versions:commit
find . -name 'pom.xml' | xargs git add
git commit -m "Release v${NEW_VERSION}"
git pull
git push
*********** END ***************
So it seems that it appeared at the end of the commit, or at the start of the pull
** insert here **
everything seems to be allright?!?
URL to that repository to help us with testing?
no
The text was updated successfully, but these errors were encountered: