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: Mon, 15 Sep 2003 11:37:59 GMT

"Pierre" <pceteaudatmacif.fr@netcourrier.com> wrote in message 
b86193eb.0309150036.204c36ae@posting.google.com">news:b86193eb.0309150036.204c36ae@posting.google.com...
> >What I'm worried about
> >is that the slight rearrangement of code has simply made the
> >timing different, and turned a 1 in 2 error into a 1 in 2000
> >error.
>
> You where right, with a loop, I haved reproduce the bug (a hundred of
> calls without the bug, then about twenty with it)

Been there, done that.  :-)

Ok, I previously sent you a patch for client.c.  Keep operating with
that patch.  The only file I am changing now is buffer.c.  Whenever
I give you a patch, you should get the original cvs1.11.6 buffer.c
and then apply the provide patch.

Hopefully this time you will get an assertion error the first time
you run the command, let's see.

If you don't, run your script 1000 times, until you get an assertion
error, and show me the output just before that.  Cut and paste if
you will, I prefer that to an English description.

If it lasts 1000 times, ie maybe 4 hours, without getting an
assertion error, let me know that too.

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 15 Sep 2003 11:28:12 -0000
***************
*** 1371,1376 ****
--- 1371,1377 ----
  }


+ extern struct stdio_buffer_closure *ugly_hack;

  static int
  stdio_buffer_shutdown (buf)
***************
*** 1380,1385 ****
--- 1381,1387 ----
      struct stat s;
      int closefp = 1;

+     sleep(5);
      /* Must be a pipe or a socket.  What could go wrong? */
      assert (fstat ( fileno (bc->fp), &s ) != -1);

***************
*** 1388,1393 ****
--- 1390,1403 ----
      {
   buf_flush (buf, 1);
   buf->flush = NULL;
+     }
+
+     if (ugly_hack != NULL)
+     {
+         printf("early fstat of %d\n", fileno(ugly_hack->fp));
+         sleep(5);
+         assert (fstat ( fileno (ugly_hack->fp), &s ) != -1);
+         printf("survived early fstat\n");
      }

      if (buf->input)




reply via email to

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