Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bad File Descriptor ERROR

1023326Sep 26 2013 — edited Oct 7 2013

Hi Friends,

Here is my scenario:

while (INFINITE_LOOP) {

     1. Create eraser.db DB with enabling environment & no transaction in dir: /DB_DIR

     2. Create expire.db DB without enabling environment & no transaction in same dir: /DB_DIR

     3. Perform add - remove record operations on both dbs.

     3. Close both dbs & environment

     4. Remove entire directory : /DB_DIR (using posix rmdir & unlink apis)

     5. sleep for 2 mins. (This is for stress testing... actual sleep value is 24 hrs)

}

This while loop works for few iterations. But after few iterations I start getting below errors:

seek: 0: (0 * 4096) + 0: Bad file descriptor

eraser.db: write failed for page 0

eraser.db: unable to flush page: 0

seek: 4096: (1 * 4096) + 0: Bad file descriptor

eraser.db: write failed for page 1

eraser.db: unable to flush page: 1

seek: 8192: (2 * 4096) + 0: Bad file descriptor

eraser.db: write failed for page 2

eraser.db: unable to flush page: 2

Once these errors start occuring. All the db operations start failing for all the following iterations.

Now I have to stop my program & restart, then only db starts working as expected.

Kindly suggest the root cause of the problem.

Regards,
~ Ashish K.

This post has been answered by 1023326 on Oct 7 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2013
Added on Sep 26 2013
1 comment
2,990 views