Consultor Eletrônico



Kbase P92473: Clients hang when creating, updating, or deleting any record within the database
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/15/2010
Status: Verified

SYMPTOM(s):

Creating a record within the database causes the client to hang.

Updating a record within the database causes the client to hang.

Deleting a record within the database causes the client to hang.

Promon Latch Counts screen shows that a user is continually holding a latch

FACT(s) (Environment):

Querying records in the database works fine.
UNIX
Progress 9.x
OpenEdge 10.x

CAUSE:

There is a process holding a latch that is not releasing it. A process should only hold a latch for a very short period of time (milliseconds). If a user is holding it for longer then a support call should be opened with Progress Technical Support.

FIX:

To determine whether a process is holding a database latch, do the following:

Type "promon -NL dbname | tee promon.txt" -> Type "R&D" -> Type "debghb" -> Choose "6" (hidden menu) -> Choose "11" (Latch Counts).

Note that there are two pages of latches to check, press <Enter> to view the second page.

Check the "Owner" column (which is the UserID) to see if any users are holding a latch. If there is, Choose "U" to update the latch screen again to confirm whether it's holding it for longer than a millisecond because you may have just caught a user holding a latch at that millisecond.

If there is indeed a user holding a latch for a long period of time (more than a millisecond) then you should open a support call with Progress Technical Support. However, you may be in a hurry to get the database usable again so you should first try to get some basic data for when you log a call later with Progress Technical Support. Note that you WILL need to shutdown and restart your database, but you only have one opportunity to gather the information below so please take the time:


1. Get the Process ID of the user (owner) holding the latch. You would have obtained the user number of the user via the latch counts screen and now you need to obtain the PID of that user via the Promon User Control screen:

From a command prompt type "promon -NL dbname | tee -a promon.txt" -> Choose "1" (User Control) -> Choose "2" (Match User Number) -> Type in the UserID.

You will see a column titled PID, get the PID value for step 2 below and exit Promon.

2. Check using "ps -ef | grep PID | tee -a promon.txt" whether the process is still using CPU resources.


3. Try to obtain a stacktrace from the hung process. The commands available will depend upon what operating system you are using:

kill -16 PID >> pid.txt (most UNIX's)
or
pstack PID >> pid.txt (on Solaris)
or
procstack PID >> pid.txt (on AIX)

Once you have determined whether or not a stacktrace is able to be produced, if one is being generated then please run the command a few times so that we can capture if the process state is changing.

NOTE: Because a latch is held, when you kill that user (with a signal other than -16) it will crash the database. This is expected behavior if a process dies holding a latch.

If the above stacktrace commands don't generate a stacktrace or is hanging, you can try to generate a core file by using "kill -8 pid". Note that this will also kill the process and crash the database but it should produce a core file and possibly a stacktrace.


4. Please find out what the last thing was that the user was doing. It may be that they turned off their machine or exited their telnet session without first exiting the Progress session.


5. Retain the log file from the database startup prior to the issue and up to and including the database shutdown.