Opened 11 years ago

Closed 11 years ago

#499 closed defect (fixed)

arb sometimes produces corrupt quick-save files

Reported by: westram Owned by: westram
Priority: critical Milestone: arb6
Component: Library (DB) Version: SVN
Keywords: Cc:

Description

The case encountered was most likely caused by defect described in #86

The quick-save file was corrupted at a db-entry saved as GB_STRING_SHRT. Such an entry does NOT store it's size/memsize, instead it has to be strictly zero-terminated.

Somehow this got violated and reading the quick-save file lost sync and bailed out later on with some random error.

That problem has occurred with full-saved DBs in the past. [5274] attempted to fix that.

Possible causes:

  • string-entries containing zero-bytes (in the "middle" of the entry)
  • completely corrupted entries pointing to volatile data

Try to

  • provoke the misbehavior described above using a unit-test

Change History (4)

comment:1 Changed 11 years ago by westram

  • Owner changed from devel to westram
  • Status changed from new to assigned

comment:2 Changed 11 years ago by westram

Reproduce:

  • load demo.arb
  • destroy group 'inner' and undo (see also #86)
  • save quick
  • quit & restart demo.arb results in
    arb_ntree: Error: ARB ERROR: I cannot load your quick file '/home/ralf/ARB-bilbo/ARB.trunk.test/demo.a00'
    Reason: Loading failed (file corrupt?)
    [Fail-Reason: 'ARB ERROR: Aborting recovery (because recovery mode is disabled)
    Error causing recovery: 'Unknown func=0'
    Part of data may be recovered using 'arb_repair yourDB.arb newName.arb'
    (Note: Recovery doesn't work if the error occurs while loading a quick save file)']
    
    
    Note: you MAY restore an older version by running arb with:
          arb <name of quicksave-file>
    

Doing the same, but with full- instead of quick-save, leads to corrupted DB failing on open

arb_ntree: Error: ARB ERROR: ARB ERROR: Aborting recovery (because recovery mode is disabled)
Error causing recovery: 'Unknown DB type 0 (DB version=1)'
Part of data may be recovered using 'arb_repair yourDB.arb newName.arb'
(Note: Recovery doesn't work if the error occurs while loading a quick save file)

Running arb_repair fails to restore anything useful.

comment:3 Changed 11 years ago by westram

Another way:

  • start demo.arb
  • select 'MOVE MODE'
  • either
    • move groupinfo of 'inner' to unused branch or
    • exchange groupinfo with 'test'
  • undo
    • groupname 'inner' disappears (groupname 'test' does not)
  • save → corrupt

comment:4 Changed 11 years ago by westram

  • Resolution set to fixed
  • Status changed from assigned to closed

by [11902]

  • corrupted entries are still written into DB, but DB remains loadable
  • followup ticket:501
Note: See TracTickets for help on using tickets.