Uploaded image for project: 'Persistence Admin Service'
  1. Persistence Admin Service
  2. PAS-13

Corrupted database after "restore all" call

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • High
    • PAS
    • None

    Description

      We have suspicion that there’s a connection between corrupted databases and calling “restore all” during runtime.
      And that’s also the reason why we have global reset freeze/crash mentioned in PAS-12.

      The steps to reproduce are simple.

      1) call PAS tool restore function:

      persadmin_tool restore FactoryDefault 0 "" -1 -1
      

      Normally you should see return error code = 0 which means SUCCESS.

      2) After few attempts (sometimes it can happen after first call, sometimes after 10th)
      3) If you will notice that procedure has been frozen before reaching any return error code – you can be sure that one of cached.itz db files is corrupted. And restore feature doesn’t work even after system restart.

      So the first conclusion is that there’s something wrong with calling restore when applications use PCL.

      I have also checked the structure of those corrupted databases. After “restore all” crash/freeze I have completed existing database files and checked those with my tool.

      Below you see the details. I’m sorry for that bad looking output, but I hope it will be readable enough.
      Please pay close attention to those strange looking block offsets and delimiters.

      Case1: DBFilesA/Media/cached.itz

      Slots Nr: 0 
      	offsetA: 0 
      	offsetB: 0 
      	current: 0 
      	block.delimStart: -1431655766 
      	DATA_BLOCK_A_START_DELIMITER: 715827882 
      	block.crc: 2126547712 
       Key: /user/3/winner 
       Value:  
      	block.delimEnd: -715827883 
      	DATA_BLOCK_A_END_DELIMITER: 1431655765 
      Slots Nr: 54 
      	offsetA: -65536 
      	offsetB: -73728 
      	current: 0 
      Segmentation fault (core dumped)
      

      Case2: DBFilesB/NodeStateManager/cached.itz

      Slots Count 511 
      Slots Nr: 0 
      	offsetA: 0 
      	offsetB: 0 
      	current: 0 
      	block.delimStart: -1431655766 
      	DATA_BLOCK_A_START_DELIMITER: 715827882 
      	block.crc: 1315824384 
       Key: /node/ERG_OIP_NSM_NODE_APPMODE 
       Value:  
      	block.delimEnd: -715827883 
      	DATA_BLOCK_A_END_DELIMITER: 1431655765 
      Slots Nr: 437 
      	offsetA: -16384 
      	offsetB: -24576 
      	current: 0 
      	block.delimStart: 37905483 
      	DATA_BLOCK_A_START_DELIMITER: 715827882 
      	block.crc: 0 
       Key:  
       Value:  
      	block.delimEnd: 0 
      	DATA_BLOCK_A_END_DELIMITER: 1431655765
      

      Case3: DBFilesC/DriverInformation/cached.itz

      Slots Count 511 
      Slots Nr: 0 
      	offsetA: 0 
      	offsetB: 0 
      	current: 0 
      	block.delimStart: -1431655766 
      	DATA_BLOCK_A_START_DELIMITER: 715827882 
      	block.crc: 2091123200 
       Key: /user/1/UnitSettings.pressureUnits 
       Value:  
      	block.delimEnd: -715827883 
      	DATA_BLOCK_A_END_DELIMITER: 1431655765 
      Slots Nr: 17 
      	offsetA: -65536 
      	offsetB: -73728 
      	current: 0 
      Segmentation fault (core dumped)
      

      Attachments

        Issue Links

          Activity

            People

              ingo.huerner Ingo Huerner (Inactive)
              Lewandowski Tomasz [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: