public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Wow, just hit RCS bug
@ 2014-04-16 16:41 tednolan
  2014-04-16 17:20 ` Achim Gratz
  2014-04-17  1:04 ` Wow, just hit RCS bug (attn: Dr Volker Zell) Warren Young
  0 siblings, 2 replies; 10+ messages in thread
From: tednolan @ 2014-04-16 16:41 UTC (permalink / raw)
  To: cygwin

I just hit the worst Cygwin bug I've encountered, the RCS bug which
silently corrupts text files > 256K.  That's the last thing I expect
from a version control system!

After some moments of panic, I was able to retrieve a good copy from
backups, but have lost my revision history.

Anyway, I immediately did a list search and found this is a known bug.

Shouldn't this package be pulled?

Just for the record, the suggested env var fix

RCS_MEM_LIMIT=0

to "force stdio" does not work for me, but the

RCS_MEM_LIMIT=10240

to allow 10megs of diffs does..

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Wow, just hit RCS bug
  2014-04-16 16:41 Wow, just hit RCS bug tednolan
@ 2014-04-16 17:20 ` Achim Gratz
  2014-04-16 17:38   ` tednolan
  2014-04-17  1:04 ` Wow, just hit RCS bug (attn: Dr Volker Zell) Warren Young
  1 sibling, 1 reply; 10+ messages in thread
From: Achim Gratz @ 2014-04-16 17:20 UTC (permalink / raw)
  To: cygwin

tednolan@bellsouth.net writes:
> Just for the record, the suggested env var fix
>
> RCS_MEM_LIMIT=0
>
> to "force stdio" does not work for me, but the

That was never suggested as a fix, but to show that the problem occurs
with files much less than 256kiB size when forcing the code path through
stdio (which is what the "0" setting does).  The RCS test suite passes
on Cygwin since it never actively tests this code path.

http://thread.gmane.org/gmane.os.cygwin/142346

> RCS_MEM_LIMIT=10240
>
> to allow 10megs of diffs does..

Which will fail once you happen upon a diff that gets that large.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Wow, just hit RCS bug
  2014-04-16 17:20 ` Achim Gratz
@ 2014-04-16 17:38   ` tednolan
  2014-04-16 22:20     ` Keith Christian
  0 siblings, 1 reply; 10+ messages in thread
From: tednolan @ 2014-04-16 17:38 UTC (permalink / raw)
  To: cygwin

In message <87bnw12nuu.fsf@Rainer.invalid>you write:
>tednolan@bellsouth.net writes:
>> Just for the record, the suggested env var fix
>>
>> RCS_MEM_LIMIT=0
>>
>> to "force stdio" does not work for me, but the
>
>That was never suggested as a fix, but to show that the problem occurs
>with files much less than 256kiB size when forcing the code path through
>stdio (which is what the "0" setting does).  The RCS test suite passes
>on Cygwin since it never actively tests this code path.
>
>http://thread.gmane.org/gmane.os.cygwin/142346
>
>> RCS_MEM_LIMIT=10240
>>
>> to allow 10megs of diffs does..
>
>Which will fail once you happen upon a diff that gets that large.
>

Ah, OK -- I was just looking for a fix or workaround and didn't read
what the "=0" was supposed to do closely enough.

I can't see ever getting up to 10M of diffs, but still I consider
it an "existential" level bug for a version control system and think
the package should be removed.  It's almost as bad as if "ls -l foo"
unlinked "foo".

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Wow, just hit RCS bug
  2014-04-16 17:38   ` tednolan
@ 2014-04-16 22:20     ` Keith Christian
  2014-04-16 22:25       ` tednolan
  0 siblings, 1 reply; 10+ messages in thread
From: Keith Christian @ 2014-04-16 22:20 UTC (permalink / raw)
  To: cygwin

RCS does a great job for smaller projects when I don't need the
overhead of any of the popular larger systems.  It has saved me many
times when I'm working on a short document or a set of scripts on my
desktop machine.

I'd miss it if it were removed simply due to the lack of handling
10Meg of diffs or similar.  Wonder if this bug could be fixed some
way?

On Wed, Apr 16, 2014 at 11:05 AM,  <tednolan@bellsouth.net> wrote:
> In message <87bnw12nuu.fsf@Rainer.invalid>you write:
>>tednolan@bellsouth.net writes:
>>> Just for the record, the suggested env var fix
>>>
>>> RCS_MEM_LIMIT=0
>>>
>>> to "force stdio" does not work for me, but the
>>
>>That was never suggested as a fix, but to show that the problem occurs
>>with files much less than 256kiB size when forcing the code path through
>>stdio (which is what the "0" setting does).  The RCS test suite passes
>>on Cygwin since it never actively tests this code path.
>>
>>http://thread.gmane.org/gmane.os.cygwin/142346
>>
>>> RCS_MEM_LIMIT=10240
>>>
>>> to allow 10megs of diffs does..
>>
>>Which will fail once you happen upon a diff that gets that large.
>>
>
> Ah, OK -- I was just looking for a fix or workaround and didn't read
> what the "=0" was supposed to do closely enough.
>
> I can't see ever getting up to 10M of diffs, but still I consider
> it an "existential" level bug for a version control system and think
> the package should be removed.  It's almost as bad as if "ls -l foo"
> unlinked "foo".
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Wow, just hit RCS bug
  2014-04-16 22:20     ` Keith Christian
@ 2014-04-16 22:25       ` tednolan
  0 siblings, 0 replies; 10+ messages in thread
From: tednolan @ 2014-04-16 22:25 UTC (permalink / raw)
  To: cygwin

In message <CAFWoy7HdXgKXnPKNTsEUo38ttbj=fCR4kRRoLnSyxdvFuoffTA@mail.gmail.com>
you write:
>RCS does a great job for smaller projects when I don't need the
>overhead of any of the popular larger systems.  It has saved me many
>times when I'm working on a short document or a set of scripts on my
>desktop machine.
>
>I'd miss it if it were removed simply due to the lack of handling
>10Meg of diffs or similar.  Wonder if this bug could be fixed some
>way?
>

Well, I agree, or I wouldn't be using RCS in the first place.
But even though I'm the only coder on the project, I've managed to work
the main library file up to 256+ K, and I suspect it's not at all
rare for RCS projects to have files in that range.

256K is the key number, not 10M.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Wow, just hit RCS bug (attn: Dr Volker Zell)
  2014-04-16 16:41 Wow, just hit RCS bug tednolan
  2014-04-16 17:20 ` Achim Gratz
@ 2014-04-17  1:04 ` Warren Young
  2014-04-17  8:21   ` Achim Gratz
  2014-04-18  9:14   ` peter.wagemans
  1 sibling, 2 replies; 10+ messages in thread
From: Warren Young @ 2014-04-17  1:04 UTC (permalink / raw)
  To: Cygwin-L

On 4/16/2014 10:09, tednolan@bellsouth.net wrote:
> I just hit the worst Cygwin bug I've encountered, the RCS bug which
> silently corrupts text files > 256K.

It's not a bug, it's a buffer size choice made with the rcs 5.8 release, 
which affects Cygwin for reasons unknown.

GNU rcs 5.9.2 changed this functionality again in a way which may fix 
the problem:

2013-10-20  Thien-Thi Nguyen  <XXX@XXX.org>

     Relax RCS_MEM_LIMIT default; fall back if unspecified.

     * doc/rcs.texi (Environment): Update ‘RCS_MEM_LIMIT’ description;
     add a willful ignorance hint and speculation on its removal.

I built 5.9.2 under Cygwin with default build options, and it 
successfully runs a test script that fails under the current Cygwin rcs, 
which was posted by Don Hatch when this problem came up here 6 months 
ago: http://cygwin.com/ml/cygwin/2013-10/msg00086.html

Dr Volker Zell, the maintainer of the Cygwin rcs package, did not 
respond to that thread.  A search shows only two emails from him to this 
list since that time.

As far as I know, no one has investigated the reason why this change 
causes a problem on Cygwin, but it would seem that replacing 5.8.2 with 
5.9.2 would help.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Wow, just hit RCS bug (attn: Dr Volker Zell)
  2014-04-17  1:04 ` Wow, just hit RCS bug (attn: Dr Volker Zell) Warren Young
@ 2014-04-17  8:21   ` Achim Gratz
  2014-04-17 14:01     ` Achim Gratz
  2014-04-18  9:14   ` peter.wagemans
  1 sibling, 1 reply; 10+ messages in thread
From: Achim Gratz @ 2014-04-17  8:21 UTC (permalink / raw)
  To: cygwin

Warren Young <warren <at> etr-usa.com> writes:
> It's not a bug, it's a buffer size choice made with the rcs 5.8 release, 
> which affects Cygwin for reasons unknown.

It is a bug in the "stdio" code path, independently of buffer size.  That
bug doesn't trigger on GNU/Linux, btw.

> I built 5.9.2 under Cygwin with default build options, and it 
> successfully runs a test script that fails under the current Cygwin rcs, 
> which was posted by Don Hatch when this problem came up here 6 months 
> ago: http://cygwin.com/ml/cygwin/2013-10/msg00086.html

Make sure you test the stdio code path, if they changed the sematics of
RCS_MEM_LIMIT again, then you may need a different demonstrator to switch to
stdio from the usual mmap code path.


Regards,
Achim.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Wow, just hit RCS bug (attn: Dr Volker Zell)
  2014-04-17  8:21   ` Achim Gratz
@ 2014-04-17 14:01     ` Achim Gratz
  0 siblings, 0 replies; 10+ messages in thread
From: Achim Gratz @ 2014-04-17 14:01 UTC (permalink / raw)
  To: cygwin

Achim Gratz <Stromeko <at> NexGo.DE> writes:
> Make sure you test the stdio code path, if they changed the sematics of
> RCS_MEM_LIMIT again, then you may need a different demonstrator to switch to
> stdio from the usual mmap code path.

For grins I just built RCS 5.9.2, fixed a bug in the btdt program so it
wouldn't infloop and ran the test suite.  It still passes with all code
paths.  The demonstrator from Don Hatch still fails if I force the stdio
code path, as it did with the 5.8.x versions.  So the only way to have RCS
not mangle those files still is to make sure it never falls back to RM_STDIO.


Regards,
Achim.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Wow, just hit RCS bug (attn: Dr Volker Zell)
  2014-04-17  1:04 ` Wow, just hit RCS bug (attn: Dr Volker Zell) Warren Young
  2014-04-17  8:21   ` Achim Gratz
@ 2014-04-18  9:14   ` peter.wagemans
  2014-04-18 12:07     ` peter.wagemans
  1 sibling, 1 reply; 10+ messages in thread
From: peter.wagemans @ 2014-04-18  9:14 UTC (permalink / raw)
  To: cygwin


As previously mentioned in

    http://cygwin.com/ml/cygwin/2014-02/msg00678.html       

the failure mechanism in RCS 5.8 is described in

    http://cygwin.com/ml/cygwin/2012-09/msg00331.html

No response from Dr. Zell.

RCS bug report:

    http://savannah.gnu.org/bugs/index.php?41707

So far no visible activity.

Regards,

Peter Wagemans



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Wow, just hit RCS bug (attn: Dr Volker Zell)
  2014-04-18  9:14   ` peter.wagemans
@ 2014-04-18 12:07     ` peter.wagemans
  0 siblings, 0 replies; 10+ messages in thread
From: peter.wagemans @ 2014-04-18 12:07 UTC (permalink / raw)
  To: cygwin


Had a quick look at some old notes. If someone is looking for a
possible code fix in RCS 5.8: try adding an fflush of the "stream" of
the "fro" struct to the macro "fro_bob" in b-fro.h. Something like
this perhaps:

    #define fro_bob(f)  do { if (STDIO_P(f)) fflush((f)->stream); fro_move (f, 0) } while (0)

Idea: whenever the file is reset to the beginning, the stream is
"cleaned". See also

    https://www.gnu.org/software/libc/manual/html_node/Linked-Channels.html
    https://www.gnu.org/software/libc/manual/html_node/Cleaning-Streams.html

The code in ci.c uses the fro_bob macro to reset the file to the
start.

Untested, don't have time for testing myself now.

Regards,

Peter Wagemans


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-04-18 12:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16 16:41 Wow, just hit RCS bug tednolan
2014-04-16 17:20 ` Achim Gratz
2014-04-16 17:38   ` tednolan
2014-04-16 22:20     ` Keith Christian
2014-04-16 22:25       ` tednolan
2014-04-17  1:04 ` Wow, just hit RCS bug (attn: Dr Volker Zell) Warren Young
2014-04-17  8:21   ` Achim Gratz
2014-04-17 14:01     ` Achim Gratz
2014-04-18  9:14   ` peter.wagemans
2014-04-18 12:07     ` peter.wagemans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).