The partitioned file key search routine did not properly handle a case in which the logic unexpectedly returned a NULL, resulting in a server crash. The logic was modified to correctly handle this situation and log information to CTSTATUS.FCS. While modifications were made to correctly handle the NULL condition, this logging will help identify the underlying problem should it re-occur. Below is a sample of the information now logged in CTSTATUS.FCS:
Wed Feb 29 15:30:23 2012
- User# 00011 Failed reference to partition index file. Error# 26
Raw Partition# 13 Relative key# 2
Wed Feb 29 15:30:23 2012
- User# 00011 Partition data file# 4 Partition index file# 7
User file# high watermark 12
Wed Feb 29 15:30:23 2012
- User# 00011 Host data file# 0 Host index file# 3
Wed Feb 29 15:30:23 2012
- User# 00011 Partitioning index relative key#: 0
Partitioning index file#: 1
Wed Feb 29 15:30:23 2012
- User# 00011 vcusti
Wed Feb 29 15:30:23 2012
- User# 00011 vcusti.2
Wed Feb 29 15:30:23 2012
- User# 00011 vcusti.013
In addition, additional modifications were made to prevent unexpected internal FACS_ERR (26) errors. It is possible for a host file to stay physically opened while a partition file is deferred closed. A subsequent open of the host causes it to be logically opened, however, an internal state was not maintained as the file remained physically opened. The search routine detected the file was closed and returned a NULL file control block (FCB) and setting the error to FACS_ERR. This NULL FCB can then lead to an unhandled exception if dereferenced. This is now prevented by adding a check for deferred close states.