PLEASE TEST: New implementation of blocking socket I/O

Pierre A. Humblet Pierre.Humblet@ieee.org
Wed Mar 31 01:54:00 GMT 2004


On Tue, 30 Mar 2004 11:35:39 +0200, Corinna Vinschen wrote:

>> > I tried ssh, telnet, exim (client + server), all OK, but
>> > cvs update hangs after sending the files
>> 
>> I am also having difficulties with cvs using the latest snapshot. I tried
>> doing a cvs update, but I get the cvs error
>> "cvs [update aborted]: error writing to server: Bad address".
>
> Neither this, nor Pierre's problem happen for me.  I've called various
> cvs operations multiple times on different repositories and it's always
> working fine, on XP as well as on 98. 
>
> Any more debugging information? 

/src/winsup/cygwin: env | fgrep CVS
CVSROOT=:pserver:anoncvs@sources.redhat.com:/cvs/src

I did a "make clean" and rebuilt everything, and now I am also getting 

cvs [update aborted]: error writing to server: Bad address

The snapshot of yesterday gave the same results.

  196 2755602 [main] cvs 621789 writev: writev (3, 0x7DE810, 1)
 3678 2759280 [main] cvs 621789 writev: 310663 = write (3, 0x7DE810, 1),
errno 2
 2321 2761601 [main] cvs 621789 sig_dispatch_pending: exit_state 0, cur
thread id 0xFFF685DF, sigtid 0xFFF5D6F7, sigq.start.next 0x0
  593 2762194 [main] cvs 621789 __set_errno: int
__check_invalid_read_ptr_errno(const void*, unsigned int):214 val 14
  171 2762365 [main] cvs 621789 writev: -1 = write (3, 0x7DE810, 1), errno 14

Note the 310663 = write (3, 0x7DE810, 1). 

That's unlikely. Seeing that reminded me that compiler warnings had
flashed by, and I recompiled likely culprits.

/../../../src/winsup/cygwin/fhandler_socket.cc:719: warning: `int res'
might be used uninitialized in this function
../../../../src/winsup/cygwin/fhandler_socket.cc: In member function `int
fhandler_socket::recvmsg(msghdr*, int, int)':
../../../../src/winsup/cygwin/fhandler_socket.cc:791: warning: `int res'
might be used uninitialized in this function
../../../../src/winsup/cygwin/fhandler_socket.cc: In member function `int
fhandler_socket::sendto(const void*, unsigned int, int, const sockaddr*,
int)':
../../../../src/winsup/cygwin/fhandler_socket.cc:926: warning: `int res'
might be used uninitialized in this function
../../../../src/winsup/cygwin/fhandler_socket.cc: In member function `int
fhandler_socket::sendmsg(const msghdr*, int, int)':
../../../../src/winsup/cygwin/fhandler_socket.cc:1007: warning: `int res'
might be used uninitialized in this function

For example in recvfrom, it looks like res is left unset when
!wsock_evt.prepare().
I initialized them to SOCKET_ERROR, but still no luck.
 310679 = write (3, 0x7DE810, 1)
Please have a look. 

Pierre 



More information about the Cygwin-developers mailing list