Waiting for read-lock on file: Difference between revisions
From CASA Guides
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[[Category: CASA Basics]] | [[Category: CASA Basics]] | ||
{{ | {{Using CASA Hints Tips Tricks}} | ||
You might come across an error that looks like this: | You might come across an error that looks like this: | ||
Line 8: | Line 8: | ||
And no tasks will operate within CASA on the .ms file anymore. Quitting out and restarting CASA doesn't seem to help. | And no tasks will operate within CASA on the .ms file anymore. Quitting out and restarting CASA doesn't seem to help. | ||
Right now, the suggested fix for this is to just delete the table.lock file in your .ms directory. Here is the '''pythonic''' way to get rid of table-lock files in the present directory and subdirectories. Use the following code with caution! | Right now, the suggested fix for this is to try a clearstat: | ||
<source lang="python"> | |||
clearstat | |||
</source> | |||
Sometimes typing this multiple times can help make sure the table is really unlocked. | |||
<!-- Commenting this section due to multiple users having errors when running simple tasks like plotting data. Forcing the deletion of .locked files no longer seems to be a good way of releasing a table lock in more recent CASA versions (JAS). | |||
In extreme cases, you might have to just delete the table.lock file manually in your .ms directory. Here is the '''pythonic''' way to get rid of table-lock files in the present directory and subdirectories. Use the following code with caution! | |||
<source lang="python"> | <source lang="python"> | ||
Line 16: | Line 24: | ||
if name == 'table.lock': os.remove(os.path.join(root,name)) | if name == 'table.lock': os.remove(os.path.join(root,name)) | ||
</source> | </source> | ||
--> | |||
== Which process is locking the file? == | |||
It is possible to find the process holding the lock with the following command: | |||
<source lang="python"> | |||
showtablelock tablename | |||
</source> | |||
If the table is locked, it tells which pid holds the lock. Thereafter ''ps'' can tell you exactly what process it is and you can decide if it needs to be ended or killed. | |||
{{Checked 3.0.0}} | |||
--[[User:Lchomiuk|Laura Chomiuk]] 20:03, 18 February 2010 (UTC) | --[[User:Lchomiuk|Laura Chomiuk]] 20:03, 18 February 2010 (UTC) |
Latest revision as of 15:52, 19 June 2018
You might come across an error that looks like this:
2010-02-18 01:08:42 INFO listobs Process 21666: waiting for read-lock on file .../Leo/leo1.ms/table.lock
And no tasks will operate within CASA on the .ms file anymore. Quitting out and restarting CASA doesn't seem to help.
Right now, the suggested fix for this is to try a clearstat:
clearstat
Sometimes typing this multiple times can help make sure the table is really unlocked.
Which process is locking the file?
It is possible to find the process holding the lock with the following command:
showtablelock tablename
If the table is locked, it tells which pid holds the lock. Thereafter ps can tell you exactly what process it is and you can decide if it needs to be ended or killed.
Last checked on CASA Version 3.0.0 (r9860).
--Laura Chomiuk 20:03, 18 February 2010 (UTC)