Use of a signal handler along with DB_REGISTER/DB_FAILCHK to cleanup application specific objects if Berkeley DB environment files are left open when a process is killed unexpectedly. (Doc ID 1087446.1)

Last updated on SEPTEMBER 29, 2015

Applies to:

Berkeley DB XML - Version 2.4.16 and later
Berkeley DB - Version 4.6 to 5.0
Information in this document applies to any platform.

***Checked for relevance on 16-Jan-2014***

Symptoms

In a multiprocess system, with DB_REGISTER, after a processes dies unexpectedly, it can panic with something like the output below when restarted:

PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
File handles still open at environment close
Open file handle: <path to db home directory>/<dbfile name>.dbxml
Open file handle: <path to db home directory>/log.0000000001
PANIC: fatal region error detected; run recovery

lsof output shows open Berkeley DB environment files with the DEL REG attribute which look like:
write     13180   DEL       REG        8,1           35589793  __db.006
write     13180   DEL       REG        8,1           35589792  __db.005
...

indicating that the Linux map file has been deleted but it has not been released because the process that was unexpected killed exited without completely cleaning up its resources.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms