bugGNU RCS - Bugs: bug #46767, RCS log gets up to large numbers...

 
 

bug #46767: RCS log gets up to large numbers of revisions then RCS will core dump

Submitter:  haoming.chu <haoming>
Submitted:  Mon 28 Dec 2015 05:47:21 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  ttn
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 20 Oct 2020 03:04:33 PM UTC, comment #5: 

RCS 5.10.0 was released today.
Marking this Closed w/ status Fixed.

Thien-Thi Nguyen <ttn>
Group administrator
Tue 20 Oct 2020 02:06:23 PM UTC, comment #4: 

FYI, the next release of RCS will be 5.10.0, not 5.9.5.

Thien-Thi Nguyen <ttn>
Group administrator
Fri 01 Jun 2018 07:32:26 PM UTC, comment #3: 

Never mind trying to reproduce the problem w/ RCS 5.9.4.  I see that Paul Eggert installed "Fix stack crash for long branches" (commit 6868751).

Changing status to Ready For Test.  Will change to Fixed once RCS 5.9.5 is released.

Thien-Thi Nguyen <ttn>
Group administrator
Tue 29 May 2018 01:19:37 PM UTC, comment #2: 

Thanks for the patch.  I see that it is against RCS 5.7, which is quite old, and no longer maintained.  Can you reproduce the problem w/ RCS 5.9.4 (latest release)?

Thien-Thi Nguyen <ttn>
Group administrator
Mon 28 Dec 2015 05:55:38 AM UTC, comment #1: 

I can not upload attach.tar.gz (file size: 2,299KB)

haoming.chu <haoming>
Mon 28 Dec 2015 05:47:21 AM UTC, original submission:  

RCS has a known bug which when an RCS log gets up to large numbers of revisions then RCS will core dump. We have seen this when the RCS log gets upwards of 80-90,000 entries.  RCS will continue to core dump on any command(co,ci) until the log file is truncated, which is the only workaround for this issue. The only time we have seen this is in an error state from a program which is updating a file consistently over time due to a bug.

for example:

In rcs-5.7-37.el6.x86_64.rpm in CentOS 6.5

#  ci -l ./ifcfg-bond3
./RCS/ifcfg-bond3,v  <--  ./ifcfg-bond3
Segmentation fault (core dumped)

We found that root cause is:

Infinite recursion without cut-off conditions was used in function 'puttree' in 'rcsgen.c'(line: 553).

So stack collapsed when too many entries in rcs log file.
(ifcfg-bond3,v in attach.tar.gz).

void
puttree(root, fout)
struct hshentry const *root;
register FILE *fout;
/* Output the delta tree with base ROOT in preorder to FOUT.  */
{
struct branchhead const *nextbranch;

if (!root) return;

if (root->selector)
putdelta(root, fout);

puttree(root->next, fout);

nextbranch = root->branches;
while (nextbranch) {
     puttree(nextbranch->hsh, fout);
     nextbranch = nextbranch->nextbranch;
}
}

We make a patch (rcs-5.7-37.patch) to workround this problem in
rcs-5.7-37.el6.x86_64.

(Replace recursion with iteration of the loop.)


haoming.chu <haoming>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #35871:  rcs-5.7-37.patch added by haoming (6KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttn (Posted a comment)
  • -email is unavailable- added by haoming
  • -email is unavailable- added by haoming (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-20 ttn StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-06-01 ttn StatusNeed Info Ready For Test
    2018-05-29 ttn StatusNone Need Info
        Assigned toNone ttn
    2015-12-28 haoming Carbon-Copy- Added -email is unavailable-
    2015-12-28 haoming Attached File- Added rcs-5.7-37.patch, #35871

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code