- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: "Hang" on return
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
тАО03-13-2009 04:06 AM
тАО03-13-2009 04:06 AM
Login as TMG1_WILLEM (low-priv user), execute a command:
$ SPAWN PIPE SETP tomg2 ;
SETENV is a procedure that changes the process and job environment to fit a particular environemnt, different from login: UIC, default, logicals, process rights and privileges (both AUTHORIZED and DEFAULT), using two (privileged) images and DCL. The user does have an account in this environment (TMG2_WILLEM) but can not normally log in directly into this environment.
The source of the original images is lost, and the functionality has been reverse-engineered from the original, by examining what it does to process end job environment.
In most cases, it seems to work fine. Changes in the process environment can be observed in the attachment.
However, above code sequence shows that there is still a difference to be handled.
Using the old images, it doesn't matter if
It seems to me that the subprocess does not signal the main process of it's termination.
I also tried (to check process and devices:
$ SPAWN PIPE SETP TOMG2 ; ANA/SYS
and this also causes the main process to hang when SDA is exited, no matter how, when the new images are used.
My thought is there must be some protection that needs to be altered, or an ACE added, (like I did on TT:) to signal the end of the subprocess, but I couldn't locate anything.
Any idea on how to find out what device may be inaccessible?
OpenVMS Developer & System Manager
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 04:58 AM
тАО03-13-2009 04:58 AM
Re: "Hang" on return
First, roughly, what does the new code do? Straight system service calls (impersonate!) or kernel mode hackery twidlling bits in Process control blocks, process headers?
> TMG1_WILLEM (low-priv user),
It looks to me that this username has all the priviliges in the world: CMKRNL (useful to grab any other priv, and to issue SET UIC), and WORLD and so on. Not low-priv and does nto need an installed helper.
>> $ SPAWN PIPE
What is the purpose of the SPAWN before the pipe?
Are there DETACHED processes, or just changed to the sub-processed.
I suspect that one of the processes is waiting for a MAILBOX message. Use ANALYZE/SYSTEM and SHOW PROC/CHAN looking for 'busy'. You may also want to use the SDA MBX extention.
Hope this helps a little,
Groetjes,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 06:09 AM
тАО03-13-2009 06:09 AM
Re: "Hang" on return
Does it use T2T ? If the receiver does an exit without reading/closing sys$net it will receive a wait of 5 minutes (was on VMS 6.2).
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 06:19 AM
тАО03-13-2009 06:19 AM
Re: "Hang" on return
The images in the procedure are installed with the privs required, so any user can run the procedures, without elevated privs.
on SPAWN PIPE....The original sequence I got changes environment, copies a file in that environment that is otherwise inaccessible, changes ownership of this copy, restores the original environment and exits - as a single entity. There are other ways to achieve this but this is the code used in the production environment.
On mailbox: I guess so: My idea is that writing a message to a termination mailbox fails because the process' UIC has changed. However, I just noticed that the original program may change the process-UIC as well - but probably just in the process context, not in the JIB (as the new code does).
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 06:24 AM
тАО03-13-2009 06:24 AM
Re: "Hang" on return
No T2T - what's T2T? - AFAIK.
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 06:26 AM
тАО03-13-2009 06:26 AM
Re: "Hang" on return
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 07:00 AM
тАО03-13-2009 07:00 AM
Re: "Hang" on return
I looked into ACC for the last attempt ($ SPAWN PIPE SETENV TOMG2 ; ANA/SYS), that I stopped with ^Z (normal exit). It didn't return either, this is what ACC returns on this proces:
SUBPROCESS Process Termination
------------------------------
Username: TMG1_WILLEM UIC: [TMG2_P,TMG2_WILLEM]
Account: TMG1_P Finish time: 13-MAR-2009 15:06:17.30
Process ID: 20200155 Start time: 13-MAR-2009 15:06:12.64
Owner ID: 20200154 Elapsed time: 0 00:00:04.65
Terminal name: Processor time: 0 00:00:03.76
Remote node addr: Priority: 4
Remote node name: Privilege <31-00>: 521DB02D
Remote ID: Privilege <63-32>: 00000000
Remote full name:
Posix UID: -2 Posix GID: -2 (%XFFFFFFFE)
Queue entry: Final status code: 00F48009
Queue name:
Job name:
Final status text:
Page faults: 479 Direct IO: 101
Page fault reads: 87 Buffered IO: 183
Peak working set: 5632 Volumes mounted: 0
Peak page file: 172912 Images executed: 7
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 07:53 AM
тАО03-13-2009 07:53 AM
Re: "Hang" on return
The status is just the ANALYZE/SYSTEM you used:
$ write sys$output f$mess(%x00F48009)
%SDA-S-NOMSG, Message number 00F48009
The HIBER state is interesting.
It suggests it is NOT having a (mailbox) IO outstanding, but it may have an attention AST ready to fire. So I woudl still check for the channels and such.
Have just tried whether a simple $WAKE call will make it happy?
Does the tool need to have a SYS$WAKE call, to add a 'pending' wake, or use SYS$SCHDWK 'just in case'?
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 08:07 AM
тАО03-13-2009 08:07 AM
Re: "Hang" on return
There is (oddly?) no standard tool to do SET PROC/WAKE/ID=...
Here is a trivial 'wake' tool.
$ type wake.c
#include
int pid, sys$wake();
main (int argc, char *argv[])
{
sscanf( argv[1], "%X", &pid);
return sys$wake(&pid,0);
}
$
And here is that tool in a test:
$ type hiber.c
#include
#include
int sys$hiber();
main ()
{
printf ("Hiber for %08X\n", getpid());
sys$hiber();
printf ("Goodbye.\n");
}
$
$ spawn/nowait run hiber
%DCL-S-SPAWNED, process HEIN_7111 spawned
$
Hiber for 00000497
$
$ mcr sys$login:wake 497
Goodbye.
$
Goodbye,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 08:12 AM
тАО03-13-2009 08:12 AM
Re: "Hang" on return
is this SETENV the same as the one used in the environment we both have in our history?
If YES, then you probable should contact Oswald.
I no longer have the direct contact info, but I think you will know where to find him.
hth
Proost.
Have one on me.
jpe