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.