[Info-vax] Nonexisting "Owner process" of a device.

VAXman- at SendSpamHere.ORG VAXman- at SendSpamHere.ORG
Sun Jul 9 08:29:04 EDT 2017


In article <ojo76n$jjd$1 at pcls7.std.com>, moroney at world.std.spaamtrap.com (Michael Moroney) writes:
>mcleanjoh at gmail.com writes:
>
>>I can see one way that this might happen ...
>
>>Process A requests that some other process (let's call it B) provide an I/O
>>device or channel and then process A terminates without telling process B 
>>to deassign the device or channel.
>
>Pretty much.
>If I recall correctly, the original problem went somewhat like this:
>
>Process A assigns a channel/allocates some device that is not normally
>shareable (such as a terminal, whether virtual or real). Since the
>device isn't shareable (such as a disk), the owner PID field gets set
>to this process' PID.
>
>Process B, using the SHARE privilege, assigns a channel to the same device
>and does some IO. A remains the owner.
>
>Process A deassigns the channel/logs out/similar, but since the device
>reference count doesn't go to 0 (because of B), certain cleanup
>activities (including zeroing of the owner PID) doesn't happen.
>
>Once A logs out, the owner PID references a nonexistent process.
>
>When B deassigns its channel, for some reason the PID field does
>not get set to 0 because it's not B's PID.  In the original problem,
>the reference count to the device does not go to 0 for some reason, so
>now the device is "owned" by a nonexistent process with a phantom
>reference to it.

If the issue is then to cleanup this device, assign a channel to it 
from some process, patch the owner field with this process's PID --
a simple task with SDA and DELTA -- and then, deassign the channel.
-- 
VAXman- A Bored Certified VMS Kernel Mode Hacker    VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.



More information about the Info-vax mailing list