Salesforce

PROUTIL HOLDER returns incorrect values when multiple proutil sessions are active

« Go Back

Information

 
TitlePROUTIL HOLDER returns incorrect values when multiple proutil sessions are active
URL Name000025641
Article Number000145552
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
Running proutil with holder command to find out the status of a database sometimes will return wrong or unexpected return codes against a database that is offline.

PROUTIL -C HOLDER return codes should be: 
  • 16 when the database is in multi-user mode and
  • 0 if the database is not in use.
Instead PROUTIL HOLDER shows a return code of 2 (an error has occurred)
Instead PROUTIL HOLDER shows a return code of 14 (Database locked by single user)

Two scripts query the database status at the same time.
Steps to Reproduce
Clarifying Information
Two scripts are querying the state of the database with the proutil -C holder command (sometimes at the same moment in time).

Steps to duplicate the issue:

1. Create a sample database for testing purposes:
$ prodb sports2000 sports2000

2. Then put the following code into a file that will be used as a script. Example: checksh

#!/bin/sh
while :
do
proutil sports2000 -C holder 2>/dev/null
x=$?
echo $x >> prohold.out
done


3.  Make the script executable:
$  chmod 777 checksh

4. From two different terminal sessions, run the checksh script.
Error MessageWhen the scripts are redirecting standard output to the terminal, the following errors will be seen during these same periods:

** The database dbname is in use in single-user mode. (263)

or

** Cannot find or open file dbname.lk, errno = 17. (43)
Errno 17 means the file exists.
Defect Number
Enhancement Number
Cause
When running more than one proutil command against a database at the same time false positives are returned, even if the database is truly shutdown. 

This is because the PROUTIL -C HOLDER command itself locks the database .lk file in order to query the database status.  Therefore depending upon the timing of the proutil commands being ran simultaneously on the database, they can and will detect when one command is locking the database to query its status.
Resolution
Change scripts so that no two PROUTIL -C HOLDER commands access the database simultaneously.
  • While this Article was created for a specific use-case, the same applies to PROUTIL -C BUSY or RFUTIL commands that for example run at scheduled intervals after a database is not running multi-user.
Neither PROUTIL HOLDER/BUSY will report on a database that has been quiesced (PROQUIET).  

An enhancement request has been submitted as an Idea on the Progress Community. To promote the Idea, click on this link: OPENEDGE-I-729. Customer feedback is valuable and Idea submissions are monitored by our Product Management team. Enhancement requests are reviewed during the planning phase of each new product release and a list of the enhancements chosen for implementation can be found in the Release Notes documents that accompany each release. Once an Idea is submitted the Progress Software Community will have the opportunity to comment on and vote for the Idea. It's priority will be evaluated as customer demand weighs in through Article Feedback and through vote count in the Ideas Portal

For detailed information on how to submit an Idea, please refer to Knowledge Article: How to submit an enhancement request for a Progress product?  
Workaround
Notes
Keyword Phrase
Last Modified Date5/31/2021 9:33 AM

Powered by