1 Reply Latest reply: Nov 19, 2010 7:47 AM by 524722 RSS

    Log file corrupt and can't open the database.

    812732
      I use Replication Manager to manage my Replication; and there is only one site currently in my application.
      I killed the App process with signal -9. (ie. $ kill -9 appID).
      Then I try to restart the App, but the event_callback function got a PANIC event when to open the envirment.

      The open flag is:
      flags = DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL |
      DB_INIT_REP | DB_INIT_TXN | DB_RECOVER | DB_THREAD;

      ret = dbenv->open(dbenv, path, flags | DB_SYSTEM_MEM, 0);

      What's the reason cause this problem?
      How can recover it ?

      The logs list as below:

      [D 11/19 09:44] dbpf using shm key: 977431433
      [E 11/19 09:44] [src/io/dbpf-mgmt.c, 400]
      [E 11/19 09:44] yuga: DB_LOGC->get: LSN 1/9776: invalid log record header
      [E 11/19 09:44] yuga: Log file corrupt at LSN: [1][9906]
      [E 11/19 09:44] yuga: PANIC: Invalid argument
      [E 11/19 09:44] [src/io/dbpf-mgmt.c] Rep EventGot a panic: Invalid argument (22)

      Edited by: dbnicker on Nov 18, 2010 6:08 PM
        • 1. Re: Log file corrupt and can't open the database.
          524722
          First, what version of Berkeley DB are you running and on what system?

          The error indicates something amiss in the log. The LSN values are quite
          small. Can you run 'db_printlog -N -h <env path>' and post the log
          contents?

          If you are using BDB 5.0 or later, can you also post the contents of
          the __db.rep.diag00 file in the environment home directory? Thanks.

          Sue LoVerso
          Oracle