Closed strohm-a closed 7 years ago
Thanks for this very thorough bug report.
Could you install 2.7.0(2) again, then run a cmd
as administrator, and run these commands:
cd C:\Program Files\Git\usr\bin
dash -c 'rebaseall -p'
This is of course only a shot in the dark, but your report reminded me of the 32-bit issues we had. Maybe they now affect 64-bit as well.
Thanks for the help. The response to the dash command is:
dash: 1: rebaseall: not found
This is strange though because rebaseall is in that directory.
Edit:
After reading the linked article, I tried the following command:
C:\Program Files\Git\usr\bin> dash -c '/usr/bin/rebaseall -p'
dash: 1: /usr/bin/rebaseall: Permission denied
This was run from an administrator command prompt.
Actually, you were so close: dash -c './rebaseall -p'
should get you somewhere.
I have the same issue - unfortunately, I still get the Permission denied
error when running from /usr/bin.
FWIW, I was able to solve this by repeatedly running git-bash.exe --no-needs-console --no-cd --command=post-install.cmd
in C:\Program Files\Git
. The setup routine got stuck when I reinstalled Git for Windows, I unfortunately don't remeber if that has been the case the first time as well.
I still get the Permission denied error when running from /usr/bin.
If you installed to C:\Program Files\Git
(the default), then you have to run the command as administrator.
@dscho, I got the "Permission denied" error running the command as administrator (yes, I triple-checked ;-) ). Nonwithstanding, I could solve that using the commands in my previous post.
@mhils ah, well, you were a bit sparse with your info. You mentioned only that there are Permission denied errors. There are permission denied errors that are 1) legitimate and 2) harmless: chown
will have problems because it assumes POSIX permissions and cannot handle Windows ACLs.
Take-home lesson: be generous in the information you provide and the output you copy & paste.
I was also getting the permission denied error while running the rebaseall command as an administrator.
I have noticed that 2.7.0(0) works, while 2.7.0(1) and later does not. I'm wondering if the ASLR support has something to do with this problem. I did a little research and https://en.wikipedia.org/wiki/Address_space_layout_randomization#Microsoft_Windows states that HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\MoveImages must be enabled for ASLR to work. Both my and my co-workers' machines are IT controlled and neither has this registry entry.
Another thought is that our IT-supplied anti-virus (Cylance) is preventing the rebase from working.
I was also getting the permission denied error while running the rebaseall command as an administrator.
Aaaargh! Again no context? Just mentioning that there was some permission denied error?
I'll bow out of this ticket.
All of the context is in my previous comment from four days ago, but I will copy it here for you:
After reading the linked article, I tried the following command:
C:\Program Files\Git\usr\bin> dash -c '/usr/bin/rebaseall -p'
dash: 1: /usr/bin/rebaseall: Permission denied
This was run from an administrator command prompt.
The linked aticle is the 32-bit issues articly you mentioned. I can't offer any additinoal context because the rebase command isn't returning any.
After reading the linked article, I tried the following command:
C:\Program Files\Git\usr\bin> dash -c '/usr/bin/rebaseall -p' dash: 1: /usr/bin/rebaseall: Permission denied
If you read your initial report, you will see plenty of "Permission denied" errors there. So simply referring to "permission denied errors" later (and not mentioning at all that the dash invocation produced them) was prone to be confusing. You will have to admit so much.
As it is, I think dash -c './rebaseall -p'
is more likely to work, but I am still hoping that somebody else is willing to help out in this ticket.
Thank you for the help. With Git for Windows version 2.7.1, I ran the following command from an administrator command prompt:
C:\Program Files\Git\usr\bin> dash -c './rebaseall -p'
dash: 1: ./rebaseall: Permission denied
I'm sorry I cannot provide any additional context. This is all that is returned by the command. I appreciate the help you have provided so far.
Okay, next try. Can you run an interactive dash:
C:\Program Files\Git\usr\bin> dash
It should print a $
prompt after a second or so. You should then be able to run
./cat rebaseall
and see the content. If that works,
./dash -x rebaseall -p
should print a list of commands as they are executed, together with some output, if any.
I'm getting similar (but not identical errors) to @strohm-a. I just upgraded from 2.7.0 to 2.7.1.2 (32-bit) and the first time I ran git bash, I got these errors...
mkdir: cannot change permissions of ‘/dev/shm’: Permission denied
mkdir: cannot change permissions of ‘/dev/mqueue’: Permission denied
ln: failed to create symbolic link ‘/etc/mtab’: Permission denied
‘C:\\WINDOWS\\System32\\drivers\\etc\\hosts’ -> ‘/etc/hosts’
/usr/bin/cp: cannot create regular file ‘/etc/hosts’: Permission denied
‘C:\\WINDOWS\\System32\\drivers\\etc\\protocol’ -> ‘/etc/protocols’
/usr/bin/cp: cannot create regular file ‘/etc/protocols’: Permission denied
‘C:\\WINDOWS\\System32\\drivers\\etc\\services’ -> ‘/etc/services’
/usr/bin/cp: cannot create regular file ‘/etc/services’: Permission denied
‘C:\\WINDOWS\\System32\\drivers\\etc\\networks’ -> ‘/etc/networks’
/usr/bin/cp: cannot create regular file ‘/etc/networks’: Permission denied
rm: cannot remove ‘/etc/post-install/01-devices.post’: Permission denied
rm: cannot remove ‘/etc/post-install/03-mtab.post’: Permission denied
rm: cannot remove ‘/etc/post-install/06-windows-files.post’: Permission denied
rm: cannot remove ‘/etc/post-install/99-post-install-cleanup.post’: Permission denied
Subsequent runs of git bash now always show this...
ln: failed to create symbolic link ‘/etc/mtab’: Permission denied
‘C:\\WINDOWS\\System32\\drivers\\etc\\hosts’ -> ‘/etc/hosts’
/usr/bin/cp: cannot create regular file ‘/etc/hosts’: Permission denied
‘C:\\WINDOWS\\System32\\drivers\\etc\\protocol’ -> ‘/etc/protocols’
/usr/bin/cp: cannot create regular file ‘/etc/protocols’: Permission denied
‘C:\\WINDOWS\\System32\\drivers\\etc\\services’ -> ‘/etc/services’
/usr/bin/cp: cannot create regular file ‘/etc/services’: Permission denied
‘C:\\WINDOWS\\System32\\drivers\\etc\\networks’ -> ‘/etc/networks’
/usr/bin/cp: cannot create regular file ‘/etc/networks’: Permission denied
rm: cannot remove ‘/etc/post-install/01-devices.post’: Permission denied
rm: cannot remove ‘/etc/post-install/03-mtab.post’: Permission denied
rm: cannot remove ‘/etc/post-install/06-windows-files.post’: Permission denied
rm: cannot remove ‘/etc/post-install/99-post-install-cleanup.post’: Permission denied
The 32-bit version of 2.7.0 was working fine.
@cs96and ... and probably you are not running this Git Bash as administrator, correct? Already @strohm-a's initial report pointed out the need to run Git Bash as admin to correct the Permission denied
errors you pointed out (they will still occur once, but then they will be gone).
Anyway, let's not distract from @strohm-a's problem with an almost unrelated issue. @strohm-a did you have a chance to run dash
interactively?
Sorry I missed the part that mentioned running as administrator fixed it. I have done this now and the errors have gone. Shall I create a separate bug report for this?
@cs96and if the problem persists, yes.
Anyway, let's not distract from @strohm-a's problem with an almost unrelated issue. @strohm-a did you have a chance to run dash
interactively?
I tried running the dash shell from an administrator command prompt. The two dash commands I tried resulted in a "died waiting for dll loading" error.
C:\Program Files\Git\usr\bin> dash
$ ./cat rebaseall
759 [main] dash 5556 fork: child 4112 - died waiting for dll loading, errno 11
dash: 1: Cannot fork
$ ./dash -x rebaseall -p
51422250 [main] dash 5556 fork: child 8892 - died waiting for dll loading, errno 11
dash: 2: Cannot fork
$
@strohm-a are you positively certain that no MSYS2 process is running in the background? Could be the ssh-agent, for example, or any other Git Bash (or even a sh.exe that was not properly terminated)?
Just to make sure, I installed 2.7.1.2 and rebooted my machine. I then logged in and tried running the dash terminal commands from an administrator command prompt and received the same "died waiting for dll loading" errors as before.
Here is the output from the Windows tasklist command:
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
System Idle Process 0 Services 0 4 K
System 4 Services 0 2,496 K
smss.exe 340 Services 0 1,036 K
csrss.exe 488 Services 0 4,132 K
wininit.exe 568 Services 0 3,892 K
csrss.exe 576 Console 1 75,492 K
services.exe 620 Services 0 7,728 K
lsass.exe 632 Services 0 18,120 K
winlogon.exe 704 Console 1 26,908 K
svchost.exe 760 Services 0 12,880 K
svchost.exe 808 Services 0 8,628 K
ibmpmsvc.exe 900 Services 0 3,536 K
MsMpEng.exe 956 Services 0 133,668 K
dwm.exe 964 Console 1 24,484 K
svchost.exe 1000 Services 0 25,140 K
svchost.exe 376 Services 0 19,456 K
svchost.exe 436 Services 0 29,140 K
svchost.exe 636 Services 0 140,556 K
svchost.exe 976 Services 0 14,628 K
igfxCUIService.exe 1108 Services 0 5,672 K
svchost.exe 1192 Services 0 6,308 K
DisplayLinkManager.exe 1264 Services 0 13,784 K
WUDFHost.exe 1384 Services 0 13,832 K
DisplayLinkUserAgent.exe 1408 Console 1 5,656 K
WUDFHost.exe 1440 Services 0 4,204 K
WUDFHost.exe 1480 Services 0 9,304 K
vpnagent.exe 1576 Services 0 14,292 K
wlanext.exe 1684 Services 0 13,568 K
conhost.exe 1704 Services 0 2,760 K
spoolsv.exe 1780 Services 0 12,496 K
svchost.exe 1820 Services 0 7,848 K
svchost.exe 1900 Services 0 26,840 K
armsvc.exe 1208 Services 0 4,156 K
mDNSResponder.exe 1592 Services 0 4,800 K
ciscod.exe 1840 Services 0 4,560 K
CylanceSvc.exe 2052 Services 0 52,476 K
svchost.exe 2232 Services 0 13,612 K
EvtEng.exe 2276 Services 0 10,752 K
ibtsiva.exe 2328 Services 0 4,028 K
IntelTechnologyAccessServ 2372 Services 0 18,652 K
IpOverUsbSvc.exe 2456 Services 0 10,040 K
quarantined.exe 2608 Services 0 57,640 K
RegSrvc.exe 2692 Services 0 6,508 K
SACSRV.exe 2724 Services 0 5,952 K
sqlwriter.exe 2788 Services 0 5,640 K
TaniumClient.exe 2164 Services 0 7,588 K
TaniumClient.exe 3088 Services 0 23,480 K
conhost.exe 3096 Services 0 2,980 K
UploaderService.exe 3140 Services 0 7,484 K
valWBFPolicyService.exe 3180 Services 0 3,300 K
valWbioSyncSvc.exe 3212 Services 0 6,712 K
ZeroConfigService.exe 3300 Services 0 13,708 K
CcmExec.exe 3324 Services 0 30,280 K
micmute.exe 3360 Services 0 6,296 K
tphkload.exe 3484 Services 0 8,112 K
unsecapp.exe 3656 Services 0 4,744 K
WmiPrvSE.exe 3680 Services 0 17,224 K
WmiPrvSE.exe 3688 Services 0 32,452 K
NisSrv.exe 4196 Services 0 3,352 K
svchost.exe 4300 Services 0 4,784 K
WUDFHost.exe 4344 Services 0 5,612 K
WmiPrvSE.exe 4820 Services 0 7,768 K
WmiPrvSE.exe 4936 Services 0 31,056 K
WmiPrvSE.exe 4104 Services 0 8,228 K
WmiPrvSE.exe 4064 Services 0 6,116 K
WmiPrvSE.exe 5244 Services 0 7,160 K
jhi_service.exe 5524 Services 0 4,820 K
GoogleCrashHandler.exe 5516 Services 0 900 K
GoogleCrashHandler64.exe 5588 Services 0 720 K
LMS.exe 5468 Services 0 15,368 K
MFACUpdate.exe 5676 Services 0 1,508 K
MFACUpdate.exe 5488 Services 0 7,240 K
MFACUpdate.exe 1332 Services 0 9,536 K
SearchIndexer.exe 5464 Services 0 32,328 K
WmiApSrv.exe 3844 Services 0 5,712 K
taskhostex.exe 4664 Console 1 14,956 K
taskeng.exe 2756 Services 0 4,944 K
tpnumlkd.exe 4704 Console 1 4,672 K
tposd.exe 4928 Console 1 4,496 K
SensorDBSynch.exe 2712 Console 1 3,020 K
shtctky.exe 3816 Console 1 4,916 K
conhost.exe 1076 Console 1 3,568 K
SynTPEnh.exe 2604 Console 1 6,484 K
PresentationFontCache.exe 1996 Services 0 20,504 K
explorer.exe 5728 Console 1 124,376 K
TabTip.exe 1468 Console 1 10,112 K
TabTip32.exe 1184 Console 1 3,420 K
igfxEM.exe 4564 Console 1 9,012 K
igfxHK.exe 5020 Console 1 6,800 K
SynTPHelper.exe 5052 Console 1 1,192 K
SynTPLpr.exe 3116 Console 1 1,884 K
ACME-WPF.exe 5348 Console 1 90,920 K
RtsCM64.exe 3008 Console 1 8,360 K
mfac.exe 3468 Console 1 14,824 K
msseces.exe 4944 Console 1 13,840 K
CylanceUI.exe 5900 Console 1 2,432 K
SACMonitor.exe 6436 Console 1 8,800 K
googledrivesync.exe 6940 Console 1 3,756 K
sppsvc.exe 7092 Services 0 13,676 K
googledrivesync.exe 7152 Console 1 146,168 K
lync.exe 5608 Console 1 113,180 K
audiodg.exe 6920 Services 0 13,992 K
Amazon Music Helper.exe 6508 Console 1 13,992 K
iCloudServices.exe 6452 Console 1 46,388 K
ConEmu64.exe 7160 Console 1 13,820 K
RAVBg64.exe 2336 Console 1 6,108 K
RAVBg64.exe 1236 Console 1 6,000 K
RAVCpl64.exe 6352 Console 1 6,132 K
vpnui.exe 2556 Console 1 19,000 K
acrotray.exe 7056 Console 1 6,452 K
CorsairHID.exe 7400 Console 1 75,148 K
FMAPP.exe 7432 Console 1 3,820 K
ActivityIndicator.exe 7680 Console 1 42,380 K
ONENOTEM.EXE 7808 Console 1 1,196 K
Xming.exe 7864 Console 1 26,968 K
UcMapi.exe 5596 Console 1 23,916 K
chrome.exe 1140 Console 1 111,388 K
chrome.exe 7312 Console 1 20,476 K
chrome.exe 3672 Console 1 56,472 K
chrome.exe 3332 Console 1 31,620 K
chrome.exe 7176 Console 1 35,660 K
chrome.exe 7044 Console 1 58,076 K
chrome.exe 7180 Console 1 28,124 K
chrome.exe 7172 Console 1 21,612 K
chrome.exe 4740 Console 1 22,236 K
cmd.exe 7652 Console 1 3,700 K
conhost.exe 7644 Console 1 4,548 K
nacl64.exe 7944 Console 1 5,588 K
nacl64.exe 972 Console 1 17,420 K
nplastpass.exe 7568 Console 1 8,068 K
cmd.exe 5760 Console 1 3,128 K
conhost.exe 3888 Console 1 6,088 K
tasklist.exe 6408 Console 1 6,020 K
@dscho
I'm unsure if you've figured it out yet.. but the "permission denied" error with dash -c './rebaseall -p'
is more about:
#!/usr/bin/ash
because there is no file called "ash"
@White-Tiger no, there was not enough information to figure this out.
If that really was the issue, then dash -c 'dash rebaseall -p'
should fix it, no?
No.. that command returns: dash: 1: dash: not found
This works though: dash rebaseall -p
And returns this for me: rebaseall: 29: cd: can't cd to rebaseall
This would fix the "cd" error: dash /usr/bin/rebaseall -p
but I guess it won't help much with this issue... yet someone has to fix the rebaseall script so it can be run directly ;) I've just found out that someone actually reported it a while back... issue #371
yet someone has to fix the rebaseall script so it can be run directly
This being Open Source, it is reasonable to expect this someone to be yourself. ;-)
I am having the same issue with the latest version of Git-2.7.2-64-bit. When I run the commands dash -x rebaseall -p, I get it executed with Exit Code 0. However, I still get the error when I run the Git-Bash ("C:\Program Files\Git\git-bash.exe" --cd-to-home). I don't get errors when I run Git-CMD ("C:\Program Files\Git\git-cmd.exe" --cd-to-home)
@psrin7 do you get the same error messages? If so, maybe you can shed some light into the problem by starting up Process Monitor and figuring out which .dll
is the problem?
I'm getting this issue as well, even with git version 2.7.2.windows.1
, rebaseall has had no effect in alleviating the issue. Which process should I monitor with ProcMon?
Edit: Also FWIW, if I install msys2-x86_64-20160205 and run the commands from one of it's shell windows, all the normally breaking git commands run fine. So if that helps you narrow down the differences in msys2.
Which process should I monitor with ProcMon?
@OverlordQ bash.exe
and/or the process that launches it.
It seems that I analyzed a similar problem in a different ticket. If there is anybody out there who experiences the issue reported in this ticket and who could follow the indicated steps to rebuild and test the MSYS2 runtime with the indicated debug messages enabled, that would be totally awesome!
I would but trying to get the SDK installed throws the same error.
:: Proceed with installation? [Y/n]
:: Retrieving packages...
bash-4.3.046-1-x86_64 1876.6 KiB 197K/s 00:10 [###############################################] 100% (1/1) checking keys in keyring [###############################################] 100%
1 [main] pacman 220224 fork: child 225220 - died waiting for dll loading, errno 11---------------------------------------------] 0% (1/1) checking package integrity [###############################################] 100% error: GPGME error: Invalid crypto engine
:: File /var/cache/pacman/pkg/bash-4.3.046-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.
Could you give https://github.com/git-for-windows/git/releases/tag/prerelease-v2.10.0.windows.1.11.geda474c a try?
@OverlordQ that looks as if the same problem occurs inthe SDK itself, bummer. If the prerelease fixes the problem, I will release a new SDK version with the fix (but I won't have time before October to do that).
No go.
$ git --version --build-options
git version 2.10.0.windows.1.11.geda474c
sizeof-long: 4
machine: x86_64
$ cmd.exe /c ver
Microsoft Windows [Version 6.1.7601]
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt
Path Option: Cmd
Plink Path: C:\Program Files (x86)\PuTTY\plink.exe
SSH Option: Plink
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
PowerBroker
$ git help pull
0 [main] sh 220004 fork: child 120916 - died waiting for dll loading, errno 11
/mingw64/libexec/git-core/git-sh-i18n: fork: retry: No child processes
1081876 [main] sh 220004 fork: child 54356 - died waiting for dll loading, errno 11
/mingw64/libexec/git-core/git-sh-i18n: fork: retry: No child processes
3202756 [main] sh 220004 fork: child 171672 - died waiting for dll loading, errno 11
/mingw64/libexec/git-core/git-sh-i18n: fork: retry: No child processes
8111513 [main] sh 220004 fork: child 23440 - died waiting for dll loading, errno 11
/mingw64/libexec/git-core/git-sh-i18n: fork: retry: No child processes
Basically if it uses git.exe directly it works, if it has to use the bash shell (sh.exe) it'll give the above error.
PowerBroker
What's that?
Sorry, thought I updated my response again. It does look like PowerBroker is the culprit, it's some horrible enterprise software that injects itself everywhere. Rename one of it's dll's, which I think, prevents injection, and everything runs fine, so I'm pretty sure this isn't a git4win issue.
Thank you for confirming!
I installed Git 2.7.0 for Windows over 2.6.0 on 64-bit Windows 8 and I get the following output when I run bash.exe or sh.exe:
Running git-bash.exe gives the following output:
I can correct the second issue by running git-bash.exe as administrator once.
If I replace 2.7.0 with 2.6.0, the problems go away.
A co-worker is having the same problem on a new 64-bit Windows 7 computer as well.