2 Replies Latest reply on Jul 11, 2012 1:04 AM by 947532

    what are the causes of error DB_RUNRECOVERY

      I have created an application on linux(CentOS 5.6) , the version of BDB is 5.1, The way I used it AS:
      1) I used the db enviornments, multithreads, transaction,cursors, secondary database, and, every db file contain only one database(table);
      2) set the flags as DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_TXN | DB_INIT_MPOOL | DB_THREAD when call DBEnv->open(), set flag DB_REGION_INIT on use DBEnv->set_flags(), and set DB_LOG_AUTO_REMOVE on by call DBEnv->log_set_config();
      3)there mutithreads read the dabases and ONLY one thread write the databases;
      4)In my daemon process, I create a single pthread( the main thread was exit when the application have started) to handle the signal SIGINT, and in the signal handler I close all the DB handlers and DBEnv handle;
      But the trouble is when I kill -s SIGINT to stop the application, it randomly return -30973 errno on some API calls, likely be Db::pget, dbc::get or db::get. and some time it also lead to a dbexception in transation.
      which one can tell me how can this happen?

      Edited by: user11047125 on 2012-7-10 上午9:08