-
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
fatal error on running "man" remotely #356
Comments
Render me absolutely confused. Ubuntu? What does that have to do with Git for Windows? Please clarify. In fact, you really want to volunteer information that allows others to understand the problem. If you expect others to ask for clarification, you will find that most people just don't. |
It is the ssh.exe bundled with Git4Win that raises the error. I connected to a Linux/Ubuntu machine using ssh.exe from within a Git Bash shell (Mingw). I assume the issues does not originate from Git itself rather than MinGW under particular* circumstances. If that is the case you may need to update your dependencies... hopefully the MinGW team is aware of this and you'd just pull in the proper fix. Best, *) After I reduced my screen buffer from 10k down to 1k lines the error wasn't raised any more. |
Unfortunately, this is wrong on at least three accounts:
|
Unfortunately I fail to understand what you are trying to tell me. MCVE is an abbreviation unknown to me. And whether ssh is a part of MinGW or MSys2 is not transparent to me. All I am able to see is MinGW's prompt. So there is no way for me to be any more precise than done already. You are the one who has the answers. I can only guess. In the end it is your package that breaks, and again, I can only tell you. Best |
An MCVE is a Minimal, Complete and Verifiable Example. You cannot seriously expect a maintainer of a highly popular software to spend three or more days to chase a bug for you. You really want to make it as easy as possible for others to reproduce your problem. You are asking other to spend time for you, after all. It should be self-evident that you are more likely helped if you respect the time and expertise of those you ask for help. Now, I gave you a very good hint how to make such an MCVE: by using Vagrant, you essentially install an Ubuntu Virtual Machine into which you can And just for fun, I did Of course, my account would be incomplete without the following information (which BTW should be provided with every bug report, as per our guidelines linked from our Contribute section on our home page): Git Bash 64-bit on Windows Server 2008 R2, connecting to an Ubuntu Trusty 64-bit machine. Works. |
@dscho seems like I'm getting the same errors while using newer builds of Git for Windows which has the bundled ssh:
The stackdump mentioned in the dump just has the same text. This happens usually when I have ssh'd into a server and try to Try downloading this file and Setup:
|
@kumarharsh is ConEmu important here? Or can you reproduce with Git Bash or Git CMD? I ask because I do not want to spend the time setting up ConEmu (which I personally do not prefer) just to reproduce this issue (and I do ssh into a Linux VM all the time, without any of the indicated problems, although I did hit the error message recently when calling |
@dscho - yes, it happens with vim too from time to time. As for you, it also goes away for me after some time. I'll try to reproduce it with git bash. Maddeningly enough, the |
Which file? |
The same one I shared with you above (onedrive link). I moved the file from my Downloads folder to the Onedrive folder for uploading it. Now, the
|
Ah. For the record, I tried to reproduce the issue with that file, and failed. I used a Hyper-V Ubuntu for my test, but it should not matter, should it. Now, I investigated a little where this issue comes from. Turns out that it is not altogether clear how this issue comes about, it could be a lot of things. First things first: this is where the error message is written: https://github.com/git-for-windows/msys2-runtime/blob/27e5516d7e7bb17c5c9c69462e1b5d5cebd4d2a0/winsup/cygwin/cygheap.cc#L407 Obviously, the call stack is very important. As the error message says And it triggers only when this function returns Now, the only caller of Sadly, there are many, many, many callers of It is not altogether clear that it is important which is the exact code path leading to this problem, either. It might be more important to know the size of the block that needs to be allocated. Another thing that may play a role is this sad issue with the DLL base address. See https://github.com/git-for-windows/git/wiki/32-bit-issues for details. As suggested in a post to the Cygwin mailing list (https://cygwin.com/ml/cygwin/2013-08/msg00514.html), there may be another |
@dscho This has been happening to me a lot with less and vim. It would probably happen with other things, it's just that's where I always see it. With respect to dlls preferred addresses, I thought that basically wasn't a thing anymore since Windows Vista and address space layout randomization (ASLR), or is ASLR probably disabled for cygwin/msys? This has been a relatively recent problem, but it takes a while to happen and so I can't reproduce it on-demand AFAIK. It would be nice to find the right people to get together to figure this out, it's a pretty disruptive annoyance when it happens! Do you think this is really some generic msys2 or cygwin bug? |
Are there any steps you can recommend to take or record logs or stuff in case of future occurences. I'll keep them in mind for the next time it happens. Also, its a little more heartening to see the bug affecting more than me 😋 |
It is not disabled for Cygwin/MSYS2 specifically. Instead, it is not enabled (because Cygwin's
Yeah, I only encountered it after updating the MSYS2 runtime to v2.10.0, but this bug has been reported a lot earlier. So maybe something made it more likely. Maybe there has been a change in the base address? no, that has not changed. Has always been 0x61000000 for 32-bit and 0x180040000 for 64-bit... |
@dscho Do you have any suggestions for trying to debug this? Because it always fails immediately in a forked process I can't think of a way to catch it in my debugger (tried an extension that's supposed to auto-attach to child processes but I don't think it works for however these are created). Do you think using the SDK to build everything in debug would get me any closer? I find that once it happens in a bash.exe, it will apparently always happen from that bash.exe (I've been killing them and making new ones usually, today I tried to see what I could do from a "bad" one for a while). |
@dakotahawkins does the ListDLLs tool show a different base address than usual in that case? |
@dscho Even not in that case they're all loaded at 0x0000000080040000, and I see the same preferred address you do. I can't find anything loaded at 0x0000000180040000, so it doesn't seem like a conflict. Could whatever loads that dll be truncating that address to its low half? Edit: ListDlls doesn't report anything with a base address starting with Edit2: Process Explorer reports the expected base address. I'll check with that the next time this happens. I kind-of expect it to still be loaded at the correct address though I don't think I'll be able to catch it if the spawned process that will fail tries to load it again at a different address or something like that. |
Yes, my take on the upper 32-bits of ListDLLs is the same: it probably truncates inappropriately. So the next thing is that we might really be out of heap space. That could happen if the memory fragmentation gets too large, if too many individual too-large blocks were allocated. I have no idea so far how to test this hypothesis, though... |
There's some back-and-forth in this email soup where they discuss raising the size of "cygheap" to 2 megs. They're also talking about upping Even if either of those helped because it's actually running out of heap space, I think the actual root cause would have to be some kind of recently exacerbated memory leak/mismanagement. |
I would agree. But I have nothing to back up that hunch. BTW the email thread you mentioned is from 2011... ;-) |
Can you set this issue as "open" again? |
@kumarharsh can you research how to debug these cygheap issues? |
@dscho Is the SDK installer in a decent state / recommended? Looks like it hasn't changed in a while so I figured I'd ask :) |
Modified .dll and .pdb are placed in windebug subfolder. Fixes git-for-windows/git#356 Signed-off-by: Dakota Hawkins <dakotahawkins@gmail.com>
Modified .dll and .pdb are placed in windebug subfolder. Fixes git-for-windows/git#356 Signed-off-by: Dakota Hawkins <dakotahawkins@gmail.com>
@dscho It's telling that dumpbin doesn't like
It doesn't have a problem when built with the old |
The 64-bit .dll should have an image base address of Further, I'm not sure how much work would be involved to fix all those types in cv2pdb, but another option might be to build with the windows-default base address and then set it after the fact. I'm not sure if there's a mingw equivalent to editbin which might let you do that. |
Update: I've tried using objcopy to change various addresses, but it doesn't have any apparent effect on the resulting DLL generated by cv2pdb. |
Epilogue: Even with my "fix" to restore msys-2.0.dll, this can still happen. With scrollback lines set really high and running the python snippet from above to 15000 lines instead of 8000: In mintty (so, the "default" way to run), nothing crashes. Of note:
Under ConEmu, all 3 crash. They'll do 8000 lines over and over if the scrollback max is 9999, but if you set something high for scrollback lines (ConEmu supports 32766, so I used that) everything has the same problem. Tasks are set up like so:
So, at least with my changes I can go back to 9999 and not have my terminal permanently die when I try to edit a commit message or Edit: @Maximus5 I assume the ConEmu behavior difference here can be explained by some way I've configured it... tagging you in case you happen to be interested and have any insight or have seen similar behavior before. |
Modified .dll and .pdb are placed in windebug subfolder. Fixes git-for-windows/git#356 Signed-off-by: Dakota Hawkins <dakotahawkins@gmail.com>
Modified .dll and .pdb are placed in windebug subfolder. Fixes git-for-windows/git#356 Signed-off-by: Dakota Hawkins <dakotahawkins@gmail.com>
@dakotahawkins thanks so much for your tenacity (and @elieux, too). I would never have dreamed that the |
Frankly I'm amazed it works to the extent that it does. I'd be kind-of interested to find a tool that dumps whatever sections are in the .dll to confirm exactly what's missing/wrong with it. |
Fixes git-for-windows/git#356 This reverts commit 27e5516, reversing changes made to a1a4754. Signed-off-by: Dakota Hawkins <dakotahawkins@gmail.com>
Fixes git-for-windows/git#356 This reverts commit c8e710e. Signed-off-by: Dakota Hawkins <dakotahawkins@gmail.com>
Out of curiosity, is this fix included in the v2.19.0-rc0.windows.2 release made 2 days ago? I read:
Those are my favourite 2 commands! :-) I'd be happy to beta test this if it also saves me from having to restart my console 3-4 times a day due to the (FYI: I run |
Yep.
Looking forward to it!
Please be advised that Cygwin and Git for Windows are considered incompatible. That is, if you run Cygwin, you should use Cygwin's Git. It might work for you if you run Git for Windows from inside Cygwin's Bash, but sooner or later you will run into trouble, and all I can say to help you, then, is that you had been warned. :-) |
@dakotahawkins thank you so much for your detailed analysis (and @elieux for joining in!). AFAICT |
@dscho Happy to help! I'm super-excited for the next release :) |
I downloaded the RC and tried it. It is a magnitude improvement, it no longer crashes at around buffer height of 2500 lines, which was very restrictive. However, it still crashes at higher buffer height in ConEmu. For me that is around 13106 (happen to be I am still excited to have 10000 buffer height, than the previous!!! |
@leonyu That's what I found.
I think I also found it was somewhere around 13k where it started happening. It might not be a ConEmu issue, it might just be ConEmu allows you to set more than msys can handle. @Maximus5 care to weigh in on this? Do you think it might be a ConEmu issue? |
Conhost supports up to 32K lines (short is used in console WinAPI). Properly written console applications should not crash on such buffers. |
That's kind-of what I suspected, thanks! |
Well I've been heavily rebasing for 2 days with the RC and so far so good! 9000-lines of history. Not conclusive yet, but I'd be guessing something like "2 sigma" significance c.f. the crashes I saw before. [Off-topic]
Consider me well-advised ;-) I've been happily running this way 5-6 years or something. The only thing I found that falls over really horribly is the cygwin's default terminal. I enjoy being able to update a few key tools (git, python) independently from cygwin - like this RC. (I've developed an unfortunate "if it ain't broke don't fix it" attitude with the rest of Cygwin so it might fall many years behind, but the rest of my tool-chain doesn't need bleeding edge updates anyway.) So using the slow Windows terminal to side-step the issues is not a big deal for me, I realise this might not be workable for others... But then again it, maybe it could be soon though? (interesting development) |
Wow, thanks for the link @lukeu. It seems Windows might get PTY support in the next build (October?). This is great news. |
…te-and-cache-server scalar: reorder `delete`, `help` and `version` to come before `cache-server`
Hi
I'm getting a fatal when calling man on a remote Ubuntu Trusty:
However, its fine to do the same on an Ubuntu Precise running in a Vagrant box.
Host: Windows 10 x64
Git4Win 2.5.0
The text was updated successfully, but these errors were encountered: