PLEASE TEST: New implementation of blocking socket I/O

Matt Hargett matt@use.net
Tue Mar 30 03:09:00 GMT 2004


> >PLEASE give the new code a thorough test.  I checked operation with
> >ssh, scp, ftp and lynx so far but I'm of course not sure if I met
> >all border conditions.
>
> 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".

In my experience with async stuff in Windows and mapping that to UNIX-like
APIs, the order in which you send things via the API are not always the
order in which they end up on the wire. In a product I worked on, this
ordering problem resulted in very weird bugs that were only sometimes
reproducible on some machines --even on single CPU machines. I can't say for
sure if this is the case here or not, though.

Here is what appears to be the pertinent strace information from the CVS
failure. I'm just doing an update here -- not even a checkin. It appears to
fail on the first file while writing (presumably diff) information to the
cvs server.

   37 6437526 [main] cvs 2064 fhandler_base::set_flags: filemode set to
binary
   36 6437562 [main] cvs 2064 fhandler_base::open: 1 = fhandler_base::open
(c:\src\glutton\freesci\src\gfx\operations.c, 0x100000)
   37 6437599 [main] cvs 2064 fhandler_base::open_fs: 1 =
fhandler_disk_file::open (c:\src\glutton\freesci\src\gfx\operations.c, 0x0)
   37 6437636 [main] cvs 2064 open: 8 = open (operations.c, 0x0)
   47 6437683 [main] cvs 2064 readv: readv (8, 0x22E810, 1) blocking,
sigcatchers 6
   37 6437720 [main] cvs 2064 readv: no need to call ready_for_read
  186 6437906 [main] cvs 2064 fhandler_base::read: returning 59122, binary
mode
   40 6437946 [main] cvs 2064 readv: 59122 = readv (8, 0x22E810, 1), errno 2
   38 6437984 [main] cvs 2064 readv: 0 = readv (8, 0x22E810, 1), errno 2
   37 6438021 [main] cvs 2064 close: close (8)
   36 6438057 [main] cvs 2064 fhandler_base::close: closing
'/cygdrive/c/src/glutton/freesci/src/gfx/operations.c' handle 0x63C
   43 6438100 [main] cvs 2064 close: 0 = close (8)
 3127 6441227 [main] cvs 2064 writev: writev (3, 0x22D610, 1)
  193 6441420 [main] cvs 2064 writev: 1024 = write (3, 0x22D610, 1), errno 2
   42 6441462 [main] cvs 2064 writev: writev (3, 0x22D640, 1)
   84 6441546 [main] cvs 2064 writev: 1024 = write (3, 0x22D640, 1), errno 2
   39 6441585 [main] cvs 2064 writev: writev (3, 0x22D640, 1)
  104 6441689 [main] cvs 2064 writev: 1024 = write (3, 0x22D640, 1), errno 2
   92 6441781 [main] cvs 2064 writev: writev (3, 0x22D640, 1)
   86 6441867 [main] cvs 2064 writev: 1024 = write (3, 0x22D640, 1), errno 2
  319 6442186 [main] cvs 2064 writev: writev (3, 0x22D610, 1)
   93 6442279 [main] cvs 2064 writev: 1024 = write (3, 0x22D610, 1), errno 2
   69 6442348 [main] cvs 2064 writev: writev (3, 0x22D640, 1)
   88 6442436 [main] cvs 2064 writev: 1024 = write (3, 0x22D640, 1), errno 2
   38 6442474 [main] cvs 2064 writev: writev (3, 0x22D640, 1)
   84 6442558 [main] cvs 2064 writev: 1024 = write (3, 0x22D640, 1), errno 2
   39 6442597 [main] cvs 2064 writev: writev (3, 0x22D640, 1)
   84 6442681 [main] cvs 2064 writev: 1024 = write (3, 0x22D640, 1), errno 2
   41 6442722 [main] cvs 2064 writev: writev (3, 0x22D610, 1)
   83 6442805 [main] cvs 2064 writev: 1024 = write (3, 0x22D610, 1), errno 2
   39 6442844 [main] cvs 2064 writev: writev (3, 0x22D640, 1)
   79 6442923 [main] cvs 2064 writev: 288303 = write (3, 0x22D640, 1), errno
2
   39 6442962 [main] cvs 2064 writev: writev (3, 0x22D640, 1)
   79 6443041 [main] cvs 2064 writev: 288303 = write (3, 0x22D640, 1), errno
2
   75 6443116 [main] cvs 2064 writev: -1 = write (3, 0x22D640, 1), errno 14
   46 6443162 [main] cvs 2064 writev: writev (2, 0x22E640, 1)
   42 6443204 [main] cvs 2064 fhandler_console::write: 22F02C, 3
   37 6443241 [main] cvs 2064 fhandler_console::write: at 99(c) state is 0
  171 6443412 [main] cvs 2064 fhandler_console::write: 3 = write_console
(,..3)
   42 6443454 [main] cvs 2064 writev: 3 = write (2, 0x22E640, 1), errno 14
   40 6443494 [main] cvs 2064 writev: writev (2, 0x22E640, 1)
   36 6443530 [main] cvs 2064 fhandler_console::write: 4209C8, 1
   36 6443566 [main] cvs 2064 fhandler_console::write: at 32(0x20) state is
0
   64 6443630 [main] cvs 2064 fhandler_console::write: 1 = write_console
(,..1)
   38 6443668 [main] cvs 2064 writev: 1 = write (2, 0x22E640, 1), errno 14
   39 6443707 [main] cvs 2064 writev: writev (2, 0x22E640, 1)
   36 6443743 [main] cvs 2064 fhandler_console::write: 4209D4, 1
   35 6443778 [main] cvs 2064 fhandler_console::write: at 91([) state is 0
   65 6443843 [main] cvs 2064 fhandler_console::write: 1 = write_console
(,..1)
   38 6443881 [main] cvs 2064 writev: 1 = write (2, 0x22E640, 1), errno 14
   39 6443920 [main] cvs 2064 writev: writev (2, 0x22E640, 1)
   36 6443956 [main] cvs 2064 fhandler_console::write: 4362F9, 6
   36 6443992 [main] cvs 2064 fhandler_console::write: at 117(u) state is 0
   63 6444055 [main] cvs 2064 fhandler_console::write: 6 = write_console
(,..6)
   39 6444094 [main] cvs 2064 writev: 6 = write (2, 0x22E640, 1), errno 14
   39 6444133 [main] cvs 2064 writev: writev (2, 0x22E640, 1)
   36 6444169 [main] cvs 2064 fhandler_console::write: 4209CA, 9
   35 6444204 [main] cvs 2064 fhandler_console::write: at 32(0x20) state is
0
.
.
.
   39 6445302 [main] cvs 2064 writev: 11 = write (2, 0x22E640, 1), errno 14
   39 6445341 [main] cvs 2064 writev: writev (2, 0x22E640, 1)
   36 6445377 [main] cvs 2064 fhandler_console::write: 4209B8, 1
   36 6445413 [main] cvs 2064 fhandler_console::write: at 10(0x20) state is
0
   77 6445490 [main] cvs 2064 fhandler_console::write: 1 = write_console
(,..1)
   39 6445529 [main] cvs 2064 writev: 1 = write (2, 0x22E640, 1), errno 14
   63 6445592 [main] cvs 2064 do_exit: do_exit (1), exit_state 0
   38 6445630 [main] cvs 2064 void: 0x0 = signal (20, 0x1)
   36 6445666 [main] cvs 2064 void: 0x47FCC0 = signal (1, 0x1)
   36 6445702 [main] cvs 2064 void: 0x47FCC0 = signal (2, 0x1)
   36 6445738 [main] cvs 2064 void: 0x47FCC0 = signal (3, 0x1)
   57 6445795 [main] cvs 2064 fhandler_console::close: decremented open_fhs,
now 2
   56 6445851 [main] cvs 2064 fhandler_console::close: decremented open_fhs,
now 1
   54 6445905 [main] cvs 2064 fhandler_console::close: decremented open_fhs,
now 0
1651609 8097514 [main] cvs 2064 fhandler_socket::close: 0 =
fhandler_socket::close()
  229 8097743 [main] cvs 2064 fhandler_socket::close: 0 =
fhandler_socket::close()
   45 8097788 [main] cvs 2064 fhandler_base::close: closing
'/cygdrive/c/src/glutton' handle 0x64C



More information about the Cygwin-developers mailing list