Technical Notes, Zetafax

PRB: Files such as MSGDIR.CTL are randomly locked while using Zetafax

ZTN1411

ID: ZTN1411

This Zetafax technical note applies to:

  • Zetafax 8.0 and later
  • Terminal Services

Symptom

In a Terminal Services/Citrix environment (and in theory, any scenario where Windows clients are using SMB (Server Message Block) to access files on a server over a network) essential Zetafax files which are frequently accessed, such as MSGDIR.CTL and others may appear to become locked by another process. This may manifest as error messages saying "unable to open file", "unable to read file", "unable to create new file" or similar, in the Zetafax server or client.

Cause

This has been identified as a problem with the Windows implementation of opportunistic locking, a property of Windows' remote file access. Opportunistic locking allows clients to lock files and locally cache information without the risk of another user changing the file. This increases performance for many file operations but may decrease performance in other operations because the server that grants the opportunistic lock must manage the breaking of that lock when another user requests access to the file. For further information, consult the Microsoft Support site (support.microsoft.com).

Resolution

  1. In the first case, ensure that you have the latest Service Pack for the client Operating System, as certain issues with opportunistic locking have been resolved by Microsoft.
  2. Should the issue remain, or updating the Service Pack is not applicable, opportunistic locking should be disabled. To do this, some registry keys need to be added, and then the machine must be rebooted.

In the case of Windows 2000/XP, the registry key that must be added is

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters

OpLocksDisabled (REG_DWORD) Value 1

For further information, see http://support.microsoft.com/default.aspx?scid=kb;en-us;296264

In the case of Windows NT, the registry key that must be added is

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters

UseOpportunisticLocking (REG_DWORD) Value 0

For further information, see http://support.microsoft.com/default.aspx?scid=kb;en-us;129202

Status

This has been identified by Equisys as a problem with the software versions given above.

Last updated 02 November 2005 (LD/EB)

Date published 07 October 2004 (DS/SV)

Keywords: < Zetafax file access> < Citrix> < Terminal Services> < file lock> < opportunistic locking>