community.borland.com

Article #25430: fatal lock manager error: invalid lock id() errno=??

Problem:
Getting Error:

fatal lock manager error: invalid lock id() errno=??

Solution:
This information pertains primarily to InterBase V4.x

The meaning of this error isn't always the same. If the 
platform is NT the problem may be the bulk insert 
problem. This bulk insert problem was fixed in NI-V4.1.0.
An upgrade would fix this issue.

Common problems may be:
  * lock file permissions are not set right
  * lock manager is running out of shared memory 
    (in this case do a gds_lock _print and see if the length 
      value is close to the used value, if so then probably need 
      to up the SHMSIZE parameter). 

  * Another thing to investigate is whether the application forks off 
     a child process. This error has occurred when an app 
     forked off a child and passed along the database 
     connection. When the child app tried to access the lock
     manager, an invalid lock id error was given.   Make sure 
     that the connection to the database is not being passed 
     along. The child process must initiate its own connection
     to the database, it cannot use the parents connection or 
     an invalid lock id error will occur. 


Specific Errno values:
-------------------------------

If errno=0 and customer is doing bulk inserts, this may be 
the problem with the NI-V4.0A(4) kit. Check to see which 
version of NT they are running (Connect to database in
ISQL and show version).  This is fixed in later versions of
InterBase.  An upgrade would solve this problem.

If errno=2 is specified it is probably a semaphore problem. Use
gds_drop -a to remove the semaphores and lock file. 

If errno=13 and permission denied is also specified, try 
checking the permissions on the lock file.  Also make sure 
they are not running out of shared memory (the permission 
denied error was a red herring). 

Last Modified: 18-OCT-00