Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tape drive allocated to non-existant process

32 views
Skip to first unread message

R Eldridge, VMS FOREVER

unread,
Sep 23, 1991, 3:59:21 PM9/23/91
to
we have a tape drive that is allocated by a non-existing process.
how do i deallocate the device without having to reboot?

rod eldridge gv...@isuvax.bitnet -or-
iowa state university gv...@isuvax.iastate.edu

robert berglin

unread,
Sep 23, 1991, 5:15:11 PM9/23/91
to
In article <1991Sep23.1...@news.iastate.edu> gv...@isuvax.iastate.edu writes:
>we have a tape drive that is allocated by a non-existing process.
>how do i deallocate the device without having to reboot?
>

You should be able to issue a DEALLOCATE command from a privileged account and
get it to work (I don't remember specifically which privilege it takes; I
think it's either VOLPRO of PHY_IO).

-Bob Berglin, Superconducting Super Collider, Dallas, Texas
phone: (214) 708-5110
internet: ber...@sscux1.ssc.gov or bergl...@sscvx1.ssc.gov

Scientific VAXcluster Administrator

unread,
Sep 23, 1991, 7:51:00 PM9/23/91
to
In article <1991Sep23.1...@news.iastate.edu>,
gv...@isuvax.iastate.edu writes...

>we have a tape drive that is allocated by a non-existing process.
>how do i deallocate the device without having to reboot?
>

As far as I know, you have to reboot. We ran into a similar problem under
VMS 5.4-1 with a TA78 tape drive. A DISMOUNT command resulted in hanging the
process which issued the command. When the process was stopped, the drive
remained allocated to the non-existent process. CSCPAT 0245 was supposed to
address this problem. However, the final solution was to raise the Sysgen
parameter CHANNELCNT to FILLM + 100.

--------------------------------------------------------------------------------
Greg Blumers Sverdrup Technology, Inc.
VAXcluster Administrator c/o NASA Lewis Research Center
(216)433-6777 or FTS 297-6777 Mail Stop 142-2
21000 Brookpark Road
uug...@scivax.lerc.nasa.gov Cleveland, OH 44135
--------------------------------------------------------------------------------

Ehud Gavron

unread,
Sep 23, 1991, 10:06:00 PM9/23/91
to
In article <1991Sep23.2...@sunova.ssc.gov>, ber...@sscux1.ssc.gov
(robert berglin) writes...
#In article <1991Sep23.1...@news.iastate.edu> gv...@isuvax.iastate.edu writes:
#>we have a tape drive that is allocated by a non-existing process.
#>how do i deallocate the device without having to reboot?
#>
#
#You should be able to issue a DEALLOCATE command from a privileged account and
#get it to work (I don't remember specifically which privilege it takes; I
#think it's either VOLPRO of PHY_IO).

No. The DEALLOCATE command cannot affect anything your
process does not own.

See code below my signature that will deallocate devices
owned by nonexistent processes.
#
#-Bob Berglin, Superconducting Super Collider, Dallas, Texas
# phone: (214) 708-5110
# internet: ber...@sscux1.ssc.gov or bergl...@sscvx1.ssc.gov

Ehud

--
Ehud Gavron (EG76)
gav...@Spades.ACES.COM

.TITLE CLRREF - Clear Device Reference count
.IDENT /002-0/

;++
;
; CLRREF.MAR 16-Sep-1991 Ehud Gavron
; So you want to clear a device that someone has left allocated and gone
; away, huh? Be vewy vewy caweful. We'we huntin' wabbits.
;
; Ehud Gavron gav...@Spades.ACES.COM
;
;--
; V1.0.0 Created because I'm not getting enough interesting
; kernel-coding to do in my regular job.
;
; V2.0.0 Made it $ASSIGN, set reference count to 1, $DASSGN
; 19-Sep-1991 Ehud Gavron
;
;
; Definitions
;
.library "sys$Library:lib.mlb" ; find $xxxdefs
.link "sys$system:sys.stb"/selective_search ; find xxx$x_xs

$ccbdef ; Channel Control Block offsets (to get UCB)
$pcbdef ; Process Control Block offsets (to get PID)
$prvdef ; Privilege definitions (to get BYPASS and _IO)
$orbdef ; Object Resource Block offsets (to clear owner)
$ssdef ; System Service status values (for normal status)
$ucbdef ; Unit Control Block offsets (miscellaneous)
;
; Macros
;
.macro check ?l1
blbs r0,l1
$exit_s r0
l1:
.endm check

;
; Variables
;
Channel: .blkl 1 ; channel number
Device: .ascid "$all$ddcuuuu:" ; the device (max size I expect)
Privmsk: .blkl 2 ; privilege mask
Prompt: .ascid "Device: " ; the prompt if someone didn't enter it
Ucb: .blkl 1 ; address of UCB
Clrref_arg: .long 1 ; The argument list to give the UCB
.address ucb ; address to the kernel-mode routine
;
; Start of user-mode code
;
.entry clrref,^m<>

;
; Get the device name from the command line
;
pushl #0 ; flags
pushal Device ; resultant-length
pushal Prompt ; prompt-string
pushal Device ; resultant-string
calls #4,g^lib$get_foreign
check
;
; Enable privileges
;
movl #<prv$m_bypass+prv$m_phy_io+prv$m_log_io>,privmsk
$setprv_s enbflg=#1,prvadr=privmsk
check
;
; Assign channel to the device
;
$assign_s devnam=device,chan=channel
check
;
; Get UCB address from CCB
;
movl @#ctl$gl_ccbbase,r0 ; Get CCB table base address
movzwl channel,r1 ; Get channel number (byte offset)
subl r1,r0 ; Get address of CCB for this channel
movl ccb$l_ucb(r0),ucb ; Get UCB address
;
; Call the kernel-mode routine to set the reference count and owner
;
$cmkrnl_s routin=clrref_k,arglst=clrref_arg
check
;
; Deassign the channel
;
$dassgn_s chan=channel
$exit_s r0

;
; The kernel-mode code
;
.entry clrref_k,^m<>

;
; Get the Unit Control Block (UCB) address
;
movl 4(ap),r1 ; Address of Ucb variable
movl (r1),r1 ; Address of device UCB
;
; Get PCB address into R4 (really we already have this from $cmkrnl)
;
movl ctl$gl_pcb,r4
;
; Raise IPL, acquire Mutex, and set the reference count
;
lock lockname=iolock8 ; Raise IPL, acquire lock
movw #1,ucb$w_refc(r1) ; Set reference count to 1
bicl #dev$m_all,ucb$l_devchar(r1) ; Clear the allocated bit
movl pcb$l_pid(r4),ucb$l_pid(r1) ; Set us as the owner in UCB
;
; Get the Object Resource Block (ORB) address
;
movl ucb$l_orb(r1),r1 ; Object Resource Block offset from UCB
movl pcb$l_pid(r4),orb$l_owner(r1) ; Set us as the owner in ORB
;
; Return to user mode
;
unlock lockname=iolock8 ; Release lock (lower IPL)
movl #ss$_normal,r0 ; Status ok
ret ; G'bye

.end clrref

le...@levy.fnal.gov

unread,
Sep 24, 1991, 11:23:13 AM9/24/91
to

Deallocate won't work, no matter what privs you have. You could write a priv'ed
program to poke the DCB, but rebooting is best. We used to see this
problem frequently, and there is a patch to fix it. If you have support, I
suggest you call Colorado to get this patch.

================================================================================
[ Mark E. Levy, Fermilab | A host is a host from coast to coast, ]
[ BitNet: LEVY@FNAL | And noone will talk to a host that's close,]
[ Internet: LE...@FNALD.FNAL.GOV | Unless the host (that isn't close), ]
[ HEPnet/SPAN: FNALD::LEVY (VMS!) | is busy, hung, or dead. ]
================================================================================

Why not ?

unread,
Sep 25, 1991, 7:55:56 AM9/25/91
to
In article <1991Sep23.2...@sunova.ssc.gov>, ber...@sscux1.ssc.gov (robert berglin) writes:
> In article <1991Sep23.1...@news.iastate.edu> gv...@isuvax.iastate.edu writes:
>>we have a tape drive that is allocated by a non-existing process.
>>how do i deallocate the device without having to reboot?
>>
>
> You should be able to issue a DEALLOCATE command from a privileged account and
> get it to work (I don't remember specifically which privilege it takes; I
> think it's either VOLPRO of PHY_IO).
>
No. it's a VMS bug, corrected near VMS v5.4-2 i think
there are specific 99%proof hacks to clear this condition,
but beware of the remaining 1%, since it will force the system to deallocate
the drive the standard way.
================================================================================
! Guillaume Gerard ! Bitnet GEGE@FRINT51 !
! Systems responsible ! Email ger...@enst.fr !
! French Telecom University ! X400 C=FR AD=ATLAS PD=TELECPARIS !
! FAX: Ha! I won !! ! PSI 2080750412855::gerard !
================================================================================
%SYSTEM-W-TMNYFNGRS, too many fingers on keyboard

Art McClinton

unread,
Sep 27, 1991, 6:42:00 AM9/27/91
to
Date sent: 27-SEP-1991 12:36:01 GMT

>In article <1991Sep23.2...@sunova.ssc.gov>, ber...@sscux1.ssc.gov (robert berglin) writes:
>> In article <1991Sep23.1...@news.iastate.edu> gv...@isuvax.iastate.edu writes:
>>>we have a tape drive that is allocated by a non-existing process.
>>>how do i deallocate the device without having to reboot?
>>>

The approach that I have used for years with Tape Drives that have numbered
plugs is to change the drive unit number. Thus if MTA0: is allocated to a
non-existant process I switch the number 0 to a 5. Thus VMS thinks it has a
new tape drive. It never seems to get concerned about the missing one.
And it is cleared up on the next reboot.

Users have been told to use generic allocates so they never seem to be
confused.

*
*---Art
*
*Arthur T. McClinton Jr. Internet: A...@MITRE.ORG
*MITRE Corporation Phone: 703-883-6356
*7525 Colshire Dr Internal Mitre: ART@AERA785 or M10319@MWVM
*McLean, Va. 22102-3481 DCS: MCCLINTON
* FAX: 703-883-6308

0 new messages