Kbase P15081: Error when connecting -RO to multi-user database
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/1/2008 |
|
Status: Verified
SYMPTOM(s):
Error generated for self-service client connecting with -RO (Read-only)
SYSTEM ERROR: <function>: Bad file descriptor was used during <system call>, fd <file descriptor>, len <bytes>, offset <bytes>, file <file-name>. (9446)
SYSTEM ERROR: bkioWrite: Bad file descriptor was used during write, fd 40, len 8192, offset 2,file /../../file-name_num.d1. (9446)
Unable to write object block to /../../file-name_num.d1. -1 (6855)
Unable to write object block for file <filename>. (6855)
bkwrite: write to disk failed errno <num>. (3645)
database in multi-user environment
SYSTEM ERROR: bksteal: Attempt to read block <block-num> above high water mark <block-num2>. (3636)
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
CAUSE:
Error 9446 occurs when trying to access a database after it has been corrupted It is usually accompanied by other messages, specifically (3645) which may highlight where the corruption originated from the OS number returned.
The -RO (read-only) parameter should only be used for Single-user database access. This error will be generated when the -RO is used to connect to a database started in Multi-user mode. The -RO is NOT designed to be used on databases that are being updated at the same time and is not a supported configuration.
FIX:
Never use -RO with a multi-user environment.
Accessing with -RO fails because multi-user sessions are using a shared buffer pool, and all database changes go into that buffer pool. These changes are not written to disk immediately. If at the same time, a client connects as a read-only session, the process does not consider the buffer activity of the other sessions and only sees what is on disk.
One of many things that might go wrong is this:
In a multi-user session, the database can be extended. Some records or index blocks can be stored in the newly acquired blocks. The high water mark, which indicates the last database block that contains data, is kept in the master block (area information block in V9). The master block gets updated when the database is extended. So, now the single-user session has an old copy of the master block in its memory.
Progress checks whether a block that is about to be read is legitimate. The buffer manager finds that according to the old, stale copy of the master block, the requested block is above the high water mark. Thus, it thinks the database is corrupt and 3636 error is generated. In fact, there is nothing wrong with the database. It just looks that way because of the stale data in the single-user sessions buffer.
A business decision needs to be made to either switch from -RO to a full connect, or use the -RO connection with SINGLE-USER database access.