Niakwa, Inc.

    

 



swiggle_small.gif (991 bytes)

 

On-Line News

swiggle_small.gif (991 bytes)

April 5, 2000 No. 95

Eliminating I90 Errors

The I90-I99 series of NPL errors relate to disk I/O and are often accompanied by a native operating system error code.  The errors indicate some type of disk access failure and their cause is often difficult to determine.  Developers occasionally report the occurrence of I90 errors regarding customers running NPL on a Windows NT server with Windows NT, Windows 95 or Windows 98 workstations.  Previous Technical Notes and other Niakwa documentation have addressed various causes of I90 errors in this and other types of network environments.  The following summarizes the most current information regarding sources of I90 errors and recommended solutions to them.

One cause of I90 errors regarding file locking and unlocking related to how earlier versions of Release V of the runtime handled locking and unlocking files in a Windows NT environment.  Beginning with revision 5.01.03, modifications were made to the runtime to eliminate I90 errors that occurred because of this issue.  Therefore, if a customer is running a revision of the runtime prior to 5.01.03 in a Windows NT environment, and encountering I90 errors, it is first recommended that they install the current maintenance release to attempt to eliminate the errors. 

Another source of I90 errors has been associated with certain network interface cards.  Some cards appear to deactivate under heavy network loads, while others have built-in diagnostic circuitry that temporarily halts traffic at brief intervals.  In either case, these periods of "network deafness" generally cause Windows network activity to appear to slow or halt. If an NPL disk operation occurs during this period, the Windows network request may fail and return an error to NPL, resulting in an I90 error.  Check with the card manufacturer if a hardware problem is suspected.

If a customer is running NPL on a Windows NT server, and upgrading the runtime does not eliminate I90 errors, and the network cards have been eliminated as a potential cause of the errors, a final suggestion is to disable the Oplocks setting in Windows NT. The Oplocks setting relates to the process called "Opportunistic File Locking, a performance enhancement under Windows NT.  Some developers have previously reported spurious I90 errors with an associated DOS error code of 21 "Lock Violation".  Although the cause of the errors was never conclusively determined, changing the Oplocks setting in Windows NT appeared to eliminate the problem.

In Windows NT, if Opportunistic File Locking is enabled, the following occurs when a file is opened.  If the file is opened in a non-exclusive (deny none) mode, the redirector requests an opportunistic lock of the entire file.  As long as no other process has the file open, the server will grant this Oplock, giving the redirector exclusive access to the specified file, or Exclusive Oplock.  This will allow the redirector to perform read-ahead, write-behind, and lock caching, as long as no other process tries to open the file.

If a second process attempts to open the file, the original owner will be asked to Break Oplock or Break to Level II Oplock.  The redirector must subsequently invalidate cached data, flush writes and locks, and release the Oplock, or close the file. The file is then re-opened in "shared" mode.
 

Theoretically, problems related to the use of Oplocks typically occur on busy networks.  Difficulties also arise on networks with clients that do not respond in a timely manner to server oplock break requests.  When using the standard default registry values, the server assumes that the client with an Oplock has 'died' if it does not respond within 35 seconds to a break Oplock request.  An Oplock break failure can result in data loss and possibly allow two clients to simultaneously open a shared file in exclusive mode.

Note:  Additional details regarding Opportunistic File Locking are available in Microsoft TechNet Article Q129202.

The following registry entries are used to enable or disable oplocks for Windows NT Workstation and Server.  These registry keys may not exist by default.  The registry on both Windows NT Server and Windows NT Workstations must be modified.  Windows 95 and Windows 98 do not use Oplocks and therefore do not require a modification to the registry.  

To access the registry, run REGEDT32.EXE from the File menu, then select 'Run' in Program Manager or File Manager.  Altering the registry as follows, changes the default Oplocks setting from true/one (1) to false/zero (0).

WARNING:   Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows NT to correct them.  Microsoft and Niakwa cannot guarantee that any problems resulting from the use of Registry Editor can be solved.   Use this tool at your own risk.

WARNING: Please note that there is a serious performance penalty paid for turning off Oplocks.

Note: On NT systems you need Administrator-equivalent access to make the registry changes. After changing the registry settings, reboot the server or workstation for the settings to take effect.

NT Workstation

Use the Registry Editor to navigate to the following subkeys:

\HKEY_LOCAL_MACHINE
\SYSTEM
\CurrentControlSet
\Services
\LanmanWorkstation
\Parameters

By default, Opportunistic locking is enabled but not shown in a visible key.  To disable Oplocks, the registry key must be added and set to 0.  Therefore, within the above subkey, add a new value called "UseOpportunisticLocking", and set the DWORD value to "0".  To subsequently re-enable Oplocks, the setting should be changed from "0" to "1".

NT Server

 Use the Registry Editor to navigate to the following subkeys:

\HKEY_LOCAL_MACHINE
\SYSTEM
\CurrentControlSet
\Services
\LanmanServer
\Parameters

By default, Opportunistic locking is enabled but not shown in a visible key.  To disable Oplocks, the registry key must be added and set to 0.  Therefore, within the above subkey, add a new value called "EnableOplocks", and set the DWORD value to "0".  To later re-enable Oplocks, the setting should be changed from "0" to "1".


Niakwa, Basic-2C and NPL are trademarks of Niakwa, Inc. All other products mentioned are registered trademarks or trademarks of their respective companies.

Questions or problems regarding this web site should be directed to webmaster@niakwa.com.
Copyright 1996-2000 Niakwa, Inc. All rights reserved.
Last updated: Friday July 25, 2008.