bug-cvs
[Top][All Lists]
Advanced

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

Re: assertion fault. on loggin


From: Paul Edwards
Subject: Re: assertion fault. on loggin
Date: Fri, 19 Sep 2003 10:07:25 GMT

"Pierre" <address@hidden> wrote in message news:address@hidden

> Then, one result (first try):

Ok, next one (TEST AAA) to try is by applying the patch at the
bottom of the message.  After you have tried this (TEST AAA),
and reported full output results (and confirm that it has the
failure the first time you run it), then try a different experiment.


/* COMPLETELY SEPARATE EXPERIMENT (CALLED TEST BBB) BEGINS */
Go to a clean directory (don't mess up the other testing we
have been doing, as this is a once-off experiment).

Get a fresh copy of cvs 1.11.6.
Set START_RSH_WITH_POPEN_RW to be true (1) in the
appropriate config files.
Recompile.
Do your cvs login again

What happens?
/* END OF COMPLETELY SEPARATE EXPERIMENT */


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 19 Sep 2003 10:01:29 -0000
***************
*** 1371,1376 ****
--- 1371,1377 ----
  }


+ extern struct stdio_buffer_closure *ugly_hack;

  static int
  stdio_buffer_shutdown (buf)
***************
*** 1464,1473 ****
--- 1465,1503 ----
   buf->output = NULL;
      }

+     if (ugly_hack != NULL)
+     {
+         printf("before close (%d) of %p, inspect %p\n",
+                closefp, bc->fp, ugly_hack->fp);
+         printf("fstat of %d is %d\n",
+                fileno(ugly_hack->fp),
+                fstat(fileno(ugly_hack->fp), &s));
+     }
+
      if (closefp && fclose (bc->fp) == EOF)
   error (1, errno,
          "closing down connection to %s",
          current_parsed_root->hostname);
+
+     /* FIXME: There appears to be a race condition
+        here.  After the above fclose is executed, it
+        would appear that the other side is able to
+        close their side down, so that when this function
+        is called for a second time, the previously
+        open file is no longer available, and the fstat
+        fails, and the assertion error fails.  You can
+        see this by uncommenting the following sleep.
+        At least this is the behaviour on one AIX
+        system where client and server are on same
+        machine and "cvs login" is executed. */
+     if (ugly_hack != NULL) sleep(5);
+
+     if (ugly_hack != NULL)
+     {
+         printf("after close, fstat of %d is %d\n",
+                fileno(ugly_hack->fp),
+                fstat(fileno(ugly_hack->fp), &s));
+     }

      /* If we were talking to a process, make sure it exited */
      if (bc->child_pid)




reply via email to

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