Kbase 19221: Different Behavior Of DataServer Brokers On Unix
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
Status: Verified
FACT(s) (Environment):
Progress 8.3x
Oracle DataServer
UNIX
ODBC DataServer
SYMPTOM(s):
This issue pertains to ODBC & ORACLE DataServer Brokers on Unix Platforms
FIX:
First some naming convention:
Broker: a simple process that spawns a sub process.
For example - _prooibk
- _probrkr
Driver / Server : A simple process that is spawned by a Broker
For example - _prooidv (spawned by _prooibk)
- _orasv (spawned by _probrkr)
- _odbsv (spawned by _probrkr)
Once you have Progress installed on any supported UNIX machine and the Broker is up and running, you can connect then connect it with your specific application.
The Broker will spawn the Driver / Server process and ensure that its parent process ID is one. This means that the process is owned by the operating system, namely by the init process. As a result, this induces that there is no existing link between the Broker and the Driver / Server.
This is what happens behind the scenes:
The Driver / Server process is not directly spawned by the Broker. It is spawned by an intermediate process (started by the Broker when you establish the connection) who becomes the parent process of the Driver / Server.
This intermediate process dies, killed by the Driver / Server it just spawned, which allows the Driver / Server process to become a daemon process.
This is done for various reasons mostly due to driver undesired dependencies on the parent for visibility to standard IO functions.
This also explains why the shutdown of the Broker will not shutdown the driver / server processes spawned by the Broker as it would be expected. To shutdown them down, you have to correctly disconnect and close the connection from the application. In this case, the process will receive a 'shutdown' message, free it's resources and die.
In the real world, for ODBC driver connections, it can happen that the connection is not properly shutdown and the driver (seen mainly through ODBC driver connections) remains running on the system and therefore stays connected to the database. This can be dangerous, because when the driver accesses the database it can open a transaction which stays uncommited from the client software resulting in undesired before image growth. The watchdog can help to solve this as the driver is considered to be a Progress client from the database point of view.