bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TEST GGG


From: Paul Edwards
Subject: Re: TEST GGG
Date: Mon, 13 Oct 2003 13:28:46 GMT

"Pierre" <pceteaudatmacif.fr@netcourrier.com> wrote in message 
b86193eb.0310130443.53ecd431@posting.google.com">news:b86193eb.0310130443.53ecd431@posting.google.com...
> I compiled and the answer is :
>
> client sleeping 5 seconds
> client has woken up
>
> So, no assert.
> I tested 50 times with the same result

Hmmm.  This result surprised me.

On an unmodified CVS 1.11.9, can you apply the following
patch.  You only need to run it once.  It should fail on the first
attempt.

BFN.  Paul.


Index: buffer.c
===================================================================
RCS file: /cvs/ccvs/src/buffer.c,v
retrieving revision 1.21.4.1
diff -c -r1.21.4.1 buffer.c
*** buffer.c 17 Feb 2003 21:19:12 -0000 1.21.4.1
--- buffer.c 13 Oct 2003 13:23:18 -0000
***************
*** 1453,1458 ****
--- 1453,1469 ----
   /* shutdown() sockets */
   if (S_ISSOCK(s.st_mode))
       shutdown ( fileno (bc->fp), 1);
+         /* FIXME:  On at least some AIX systems, there is
+            a race condition.  If you activate this sleep
+            command, you will find that you get an
+            assertion failure on the next call to this
+            function, on the fstat, in the situation where
+            you have client and server running on the same
+            machine, and you are running "cvs login".  This
+            is because the server exits, and the fileno is
+            no longer accessible to the client.  I expect
+            that this is an AIX bug, it probably has no
+            right to invalidate filenos. */
  # else
   {
   /* I'm not sure I like this empty block, but the alternative
***************
*** 1468,1473 ****
--- 1479,1487 ----
   error (1, errno,
          "closing down connection to %s",
          current_parsed_root->hostname);
+     printf("client2 sleeping 5 seconds\n");
+     sleep(5);
+     printf("client2 has woken up\n");

      /* If we were talking to a process, make sure it exited */
      if (bc->child_pid)
Index: server.c
===================================================================
RCS file: /cvs/ccvs/src/server.c,v
retrieving revision 1.284.2.9
diff -c -r1.284.2.9 server.c
*** server.c 3 Oct 2003 19:15:32 -0000 1.284.2.9
--- server.c 13 Oct 2003 13:23:30 -0000
***************
*** 5719,5724 ****
--- 5719,5730 ----
      {
   printf ("I LOVE YOU\n");
   fflush (stdout);
+
+         /* FIXME:  On AIX at least, in some circumstances,
+            there is a race condition in CVS which can be
+            circumvented with a pause here.  The race is
+            triggered by the shutdown(,1) call in buffer.c */
+         sleep(2);

  #ifdef SYSTEM_CLEANUP
   /* Hook for OS-specific behavior, for example socket subsystems on




reply via email to

[Prev in Thread] Current Thread [Next in Thread]