• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. How to delete lock files after cell is closed?

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 126
  • Views 24651
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to delete lock files after cell is closed?

Kabal
Kabal over 12 years ago

How can I do it?

setenv DD_DONT_DO_OS_LOCKS

that does not help, I am not sure if there is a specific way to tell cadence not to  leave lock files after the cell (no matter which cell) has been closed?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    First of all, DD_DONT_DO_OS_LOCKS does not prevent lock files from being created (and you really wouldn't want it to do that; I've seen customers who routinely delete the lock files and then they complain because they lose data; the system then has no idea that somebody else has something open for edit).

    That environment variable is to control whether it uses the operating system lock mechanism to lock the lock file whilst it is being created - this is a second level of locking to help prevent issues where two processes both try to lock it at the same time.

    Lock files should get removed once either the file/cellView is no longer in edit mode, or has been closed. Also, if virtuoso exits (normally), they should get removed. In general the only case where lock files remain is when virtuoso has exited abnormally (killed or crashed).

    When that happens, there is a mechanism to recover stranded locks when you next try to open the same file/cellView for edit. What happens is that it consults the lock file, and checks to see what machine had the lock - and also what the process id and so on is. It then tries to ask a process called clsbd which is running on each machine where Virtuoso has been started at some point, whether that process is still running. If it is, then the request to reclaim the lock is denied; if it isn't, the lock may be reclaimed and then the lock file is removed and a new one created for the new locking process. If however it either cannot contact clsbd on the remote machine (maybe it is not running, or maybe the machine is not up, or maybe there's a firewall in the way blocking the ports used), it errs on the side of caution and denies the lock recovery. However, it allows a certain amount of time before it gives up - because maybe you have a network glitch and the time taken to respond is too long.

    We do provide a utility, clsAdminTool to aid with finding and removing lock files, but you should always use this with caution because this doesn't do the checking that the remote process is still running or not.

    If you are finding a case where the lock files are not being removed, first check that it really has closed it - look in File->Close Data in the CIW - maybe there is more than one reference to the cellView in memory and hence it has kept it in memory - this can easily happen particularly if you have SKILL code which opens cellViews but doesn't match the opens with corresponding closes (it keeps a count of opens versus closes and only when they match does it purge from memory and release the lock. However, close data would fix that, as would exiting virtuoso).

    Hope this helps!

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • monkeydliren
    monkeydliren over 8 years ago
    Hi Andrew,

    May I ask you about the situation you mentioned in the responce, "virtuoso has exited abnormally"

    I recently had a system crash, such that Virtuoso also got crashed.

    After that, when i tried to open Virtuoso, the previous schematic that was opeining before the system crash, they all got a lock and i can not edit them.

    I tried Close Data in CIW and restart Virtuoso but did not work.

    Can you please help with this issue?

    Thank you very much

    Ren
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • monkeydliren
    monkeydliren over 8 years ago
    oh i got it now.

    using the clsAdminTool to release the lock on specified folder
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Provided that the machine which had the crash has since had virtuoso run on it again (or the "clsbd" deamon is started directly), it shouldn't be necessary to use clsAdminTool. Running virtuoso would cause clsbd to start, and then if virtuoso on another machine (or the same machine) finds the file is locked, it can consult with the clsbd on the machine with the lock to see if the process that was locking the file is still running or not. If it's not still running, the lock can safely be reclaimed.

    clsAdminTool (in general) should only be needed when there is a lock and the machine is no longer accessible (i.e. if it's still powered down) - or if clsbd can't be started for some reason (not sure why).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information