This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need help with debugging git (Cygwin/MSYS2) on Wine


Hi Adam,

Thanks a lot for your reply.

On Fri, Jun 5, 2015 at 8:32 PM, Adam Dinwoodie <adam@dinwoodie.org> wrote:
>
> Hi,
>
> Cygwin and msys2 are sufficiently different that I wouldn't want to
> start debugging this from a Cygwin point of view. Further, the problem
> here may be something to do with the options that that version of Git
> was compiled with, which we have no idea about.
>

This is very understandable and very appreciated, I'll try to follow
anything required.

> If you can reproduce this behaviour using Cygwin and the version of
> Git distributed with Cygwin, we can start looking at that. If you do,
> please include all the details asked for in
> <https://cygwin.com/problems.html>.

Yes, I just download latest cygwin :
4885f4560a6c01ec6d94a322826cc656a63cd86c setup-x86.exe

I install setup-x86 on latest Wine Staging, which includes a couple of
fixes we made for Cygwin/MSYS2 in the past few months:
$ wine-1.7.44-83-g9ce9ba3 (Staging)

Before do anything I export STAGING_WRITECOPY=1 in Linux shell to
enable a Wine Staging patch set in order to be compatible with
Windows. This is normal required for a lot of Cygwin programs as my
tests in the pass months.

I start Wine Cygwin shell using the below command:
$ wine start Cygwin.bat

I installed latest packages from cygwin mirror, including the git package:
$ uname -a
CYGWIN_NT-5.1  2.0.3(0.287/5/3) 2015-06-03 13:55 i686 Cygwin

$ git --version
git version 2.1.4

Then I tried `$ mkdir testgit && cd testgit && git init`, which works
in Cygwin on Wine.

I tried clone a local repo, it works as well.

I tried `$ git clone https://github.com/Pash-Project/Pash.git` 10+
times, in different directories:
The first time, I get an "fatal: write error: Permission denied",
however, after that I always get "fatal: write error: Communication
error on send", I can't reproduce the first error anymore.

The console output is as below:

fracting@fracting-ThinkPad-Edge-E431 ~
$ git clone https://github.com/Pash-Project/Pash.git
Cloning into 'Pash'...
fatal: write error: Communication error on send

According to documenation, I collect the output of `cygcheck -s -v -r`
as attachment.
*Note*:
1. this is collect from Wine cmd console, not from Wine Cygwin shell.
When I run cygcheck in Wine Cygwin shell, it hangs immediately, even
with `cygcheck --help` or simply `cygcheck`.
Not sure if this is another Wine bug, not sure if it is related.
2. I have an error "/usr/bin/id: write error: Socket operation on
non-socket" when I run cygcheck in Wine cmd, haven't dig deep enough
yet.

I rerun the git clone command line with GIT_TRACE=1 and
GIT_TRACE_PACKET=1, the log is in the below gist:

https://gist.github.com/fracting/337f7c056de53c52aee2

I tried `$ /usr/libexec/git-core/git-remote-https origin
https://github.com/Pash-Project/Pash.git`, `list` command works, fetch
command fails, here is an example:
```
fetch 99eb8b53ae2820b977cdcf9074bfb34c2b90a206 refs/tags/merged/testhost

fatal: write error: Communication error on send

```

I generate a strace log, which shows:
  188 44057828 [main] git-remote-https 71
fhandler_base_overlapped::wait_overlapped: res 4, Win32 Error 233
  165 44057993 [main] git-remote-https 71 seterrno_from_win_error:
/home/corinna/src/cygwin/cygwin-2.0.3/cygwin-2.0.3-1.i686/src/newlib-cygwin/winsup/cygwin/fhandler.cc:2044
windows error 233
  211 44058204 [main] git-remote-https 71 geterrno_from_win_error:
windows error 233 == errno 70
  140 44058344 [main] git-remote-https 71 write: -1 = write(5,
0x20070DF7, 5), errno 70

The full log is here:
https://gist.githubusercontent.com/fracting/63b100abfc6054f013db/raw/git.strace.txt

*Note*:
Due to known Wine bug, child process is not able to trace yet:
$ strace -o git.strace.txt -p 71
strace.exe: Could not clear DEBUG_ONLY_THIS_PROCESS (c0000002), will
not trace child processes
Windows process 44 attached
Windows process 66 attached
Windows process 68 attached
Windows process 66 detached
Windows process 68 detached
Windows process 44 detached

Win32 error 233 is ERROR_PIPE_NOT_CONNECTED, in Wine log generated
from WINEDEBUG=+tid,+relay,+pipe, we can see

0032:Ret  ws2_32.WSARecv() retval=00000000 ret=61066371
0032:Call KERNEL32.WriteFile(00000190,20080e0c,0000055a,0070affc,612d716c)
ret=6103b1fc
0032:trace:file:WriteFile 0x190 0x20080e0c 1370 0x70affc 0x612d716c
0032:Ret  KERNEL32.WriteFile() retval=00000000 ret=6103b1fc
0032:Call KERNEL32.GetLastError() ret=6103ac2d
0032:Ret  KERNEL32.GetLastError() retval=000000e9 ret=6103ac2d

Here retval=000000e9 means GetLastError returns
ERROR_PIPE_NOT_CONNECTED ( == 233 == 0xe9 )

I've provided some basic information I have, any idea or advice is
great appreciated.

Thanks in advance!

-- 
Regards,
Qian Hong

-
http://www.winehq.org

Attachment: cygcheck.out
Description: Binary data

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]