- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Failure to delete an open file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 08:04 PM
тАО02-23-2010 08:04 PM
Failure to delete an open file
A file that has been opened by file id returns a status value of rms$_mkd (failed to mark file for deletion) with fab$l_stv set to 0910 (no such file) when issuing a close with delete.
The file is clearly open at time of issuing the close (as I can see it using $ana/sys $sho proc/chan) and is subsequently closed
Any ideas to determine why this is happening would be much appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 09:16 PM
тАО02-23-2010 09:16 PM
Re: Failure to delete an open file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 03:21 AM
тАО02-24-2010 03:21 AM
Re: Failure to delete an open file
I've seen bugs latent in VMS itself for twenty-five or more years, and similar bugs latent in applications that otherwise appeared to be running "correctly".
Moving to a different (and usually also faster) box has a long history of exposing these bugs.
And sometimes the platform move caused folks to look at the application, and to notice the error(s).
Debug the source code. There's a reasonable likelihood that the errors are correct, of course. If you don't have the source code (as is one reason for emulation) then you may have a (bigger) problem.
OpenVMS back in this era also had the occasional bug around handling temporary files; there was a particularly nasty one with spooled files back in this version range, and I recall a few others. See of your ECOs are "current" for OpenVMS VAX V6.2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 09:35 AM
тАО02-24-2010 09:35 AM
Re: Failure to delete an open file
First and foremost. Did it ever work?
Secondly, does it work on more recent OpenVMS versions. Try on EISNER or DEATHROW?
Does it work with say BYPASS privs?
Is the file deleted?
Does it have a name? (Directory entry)
Maybe the system is trying to protect you from creating an orphan?
anyway...
$CLOSE with FAB$V_DLT translates to a $QIO, IO$_DELETE | IO$M_DELETE.
It tells the QIO to access by FID, unless the file was opened TMP, indicating that there would not be a directory entry. So if RMS knows there is no directory entry, it avoids using the FID. That's a little counter intuitive to me, but it may just match your observations.
If you can single step the code, then stop it just before the $CLOSE and use ANAL/SYSTEM .. SHOW PROC/RMS=(FAB,FWA).
Watch out for FAV$V_ASY. That has caught a good few folks by surprise.
Check the FIB (from the FWA).
Maybe I have time tonight for a reproducer, but if you can isolate the code into an example to be attached, then that would help a lot!
Good Luck!
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 01:26 PM
тАО02-24-2010 01:26 PM
Re: Failure to delete an open file
In reply
Yes, the program has worked and does work on newer and older versions of VMS.
Privileges is not an issue as I am running with BYPASS privilege
The file does not have a name (directory entry) and does not get deleted.
The code is basically opening a file by id, then searching a directory for a file with matching ID (which on this occasion it never finds) and then marking the file for delete before closing it. If I disable the directory search then the delete succeeds. At this stage I am suspecting some sort of buffer overrun in the directory search code
Once again thanks
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 08:31 PM
тАО02-24-2010 08:31 PM
Re: Failure to delete an open file
We've seen some funnies with wildcard file look ups where we use a logical name to define a search path. In our case we were seeing duplications of file names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 08:40 PM
тАО02-24-2010 08:40 PM
Re: Failure to delete an open file
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2010 03:53 PM
тАО02-25-2010 03:53 PM
Re: Failure to delete an open file
In my situation, this is being set (to 5) in the nam block following a $PARSE operation.
Subsequent to this I do a $SEARCH,$OPEN AND $CLOSE, however if the close is a close with delete, then the delete fails as in initial question
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2010 04:23 PM
тАО02-25-2010 04:23 PM
Re: Failure to delete an open file
The FID and DID values should each be treated as opaque three-word values for the purposes of manipulation and - if one or both are not treated as an opaque three-word value -- well, that would be an application bug.
Near as I can tell, GNV blew the handling of the NMX field, too: <>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2010 06:52 PM
тАО02-25-2010 06:52 PM
Re: Failure to delete an open file
DID_NMX is the Directory file ID sub fields for the directory file NuMber eXtension.
It is the most significant byte for the file number.
It is a documented output for $PARSE.
You can verify with $ DIRECTORY /FILE xxx.DIR
or F$FILE("xxx.dir","FID")
The 5 suggests you'll see a number between 327680 and 400000.
fwiw,
Hein.