This discussion is archived
2 Replies Latest reply: Jul 10, 2012 6:04 PM by 947532 RSS

what are the causes of error DB_RUNRECOVERY

947532 Newbie
Currently Being Moderated
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


  • Correct Answers - 10 points
  • Helpful Answers - 5 points