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: Problem with rsync 3.0.6-1 [and 3.0.5] under 1.7.0-62 and 63 [and 64]


Corinna Vinschen wrote:
On Nov 12 17:23, Eliot Moss wrote:
I went ahead and wrote a little program that narrows
down the rsync problem to a dup2 call. The program:
creates two pipes (for talking to a child process),
forks the child, and the child tries to dup2 the
pipe fds to its stdin and stdout. If it wins (which
it doesn't), it will then run sleep for 5 seconds
and quit. The parent closes some fds it doesn't need
and waits for the child, then quits. I attach the
program in question, and strace output.

Cheers -- Eliot Moss

Thanks for the testcase. However, the problem is that I can't reproduce any problem using your testcase. I ran it on Windows XP SP3, Server 2008 SP1, and Windows 7. The result is this, just with changing PIDs:

$ ./a_test
pid = 3272, fin = 5, fout = 4
wait got 0

I assume you see some error, but you didn't explicitely write what error
you see.  The strace output shows an error when closing a socket, which
is that dreaded Winsock error 10038, "socket operation on non-socket".

The reason why this operation fails must be something on your machine.
I'm just not sure how we can find out what that is, and how to avoid the
error then.  Simply ignoring error 10038 in close() doesn't sound like
a terribly good idea...

Thank you for looking more closely!


The actual failure is earlier in the strace output, I think. If you
look for dup2 you see that the first dup2 call fails on my machine.
Can this fail because of some permissions thing? I have UAC set to
"Never notify". I am logged in as me (Eliot), and I have Administrator
rights. I get the same result from a_test if I run bash as Administrator
and run a_test.

Here is sample program output for me:

pid = 9064, fin = 5, fout = 4
error: first dup2 -1 9
wait got 65280

If I understand correctly, the wait code says the child terminated
with result -1, which corresponds with what the code does when that
dup2 fails.

Any suggestions for the next step in debugging this? I can certainly
accept that it's something about my machine, but I am rather at a loss
of where to look ...

Regards -- Eliot

--
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]