Path: utzoo!utgpu!water!watmath!clyde!att!ihnp4!ucbvax!XEROX.COM!"James_A._Gray.OsbuSouth" From: "James_A._Gray.OsbuSouth"@XEROX.COM Newsgroups: comp.os.vms Subject: Re: Print symboints Message-ID: <880526-223840-3902@Xerox> Date: 27 May 88 05:37:58 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 81 Query: Recently, while testing a new print symbiont, all of our batch and print queues were deleted and the queue manager stopped. The only thing we got was a JOBCTL.DMP file in SYS$SYSTEM. Contains only a condition signaled as "%SYSTEM-F-PRIVINSTALL, shareable images must be installed to run privileged image". This was a modification to an existing symbiont (LASER, for the Apple LaserWriter). Since we obviously do not want to experience this again (a lot of users were sure %^& mad at us!), does anyone have suggestions as to what we can do? The basic symbiont was written in C, but we added subroutines written in Fortran if this impacts anything. Also, does anybody know how to debug a print symbiont? If it is compile/linked in debug, it does seem to run. Suggestions? Some answers: 1) When analyzing an image dump file from a different directory than the image file you will always get the PRIVINSTALL message unless you specify the /IMAGE qualifier to point to the image file used to create the symbiont. For example, assume that your image file is MYSYMBIONT.EXE and that it resides (as it must) in SYS$SYSTEM, then either $ SET DEFAULT SYS$SYSTEM $ ANALYZE/PROCESS MYSYMBIONT or $ ANALYZE/PROCESS/IMAGE=SYS$SYSTEM:MYSYMBIONT - SYS$SYSTEM:MYSYMBIONT 2) To use the symbolic debugger with a user written symbiont, first compile with the /DEBUG qualifier, then link with the /DEBUG qualifier, redirect DBG$INPUT and DBG$OUTPUT to some real terminal and then finally start the symbiont. For example, $ CC MYSYMBIONT/DEBUG $ LINK MYSYMBIONT/DEBUG $ COPY MYSYMBIONT.EXE SYS$SYSTEM: $ DBG_TERM = "OPA0:" $ DEFINE/NOLOG/TABLE=LNM$GROUP_000001 DBG$INPUT - 'DBG_TERM' $ DEFINE/NOLOG/TABLE=LNM$GROUP_000001 DBG$OUTPUT - 'DBG_TERM' $ DEFINE/NOLOG/TABLE=LNM$GROUP_000001 DBG$INIT - my-debug-init-file $ START/QUEUE queue-name/PROCESS=MYSYMBIONT 3) The most likely cause of all of the queues being deleted (not really deleted but not visible with a SHOW QUEUE) and the queue manager stopping is a write to SYS$OUTPUT by the print symbiont. What actually happens is that JOBCTL takes a dive (usually you will get a JOBCTL.DMP in SYS$SYSTEM) which takes out the queue manager and all of the queues. Just restarting the queue manager (via START/MANAGER) will get all of the queues back; sometimes it will complain that the queue file (JOBSYSQUE.DAT usually in SYS$SYSTEM) is corrupted. If JBSSYSQUE is corrupted then you will need to do a START/MANAGER/NEW and redefine all of your queues. If you need to output some message during the course of running the symbiont you should use either SYS$SNDOPR or SYS$BRKTHRU to output the message. Never ever use SYS$OUTPUT, SYS$ERROR or SYS$INPUT in a symbiont. A somewhat subtle way that you could be using one of these files would be by a routine signaling an error that is not handled by a condition handler; FORTRAN will do this for floating over/underflow for example. You might want to set up a condition handler in the main that just exits with the error status; you'll get an OPCOM message that the symbiont exited but it will not affect other queues. 4) When debugging a symbiont using the symbolic debugger, you may encounter the case where the debugger is entered without any message being reported. This will be the case if the symbiont takes an access violation. Just look at the current instruction and do a SHOW CALLS to find out where you are. I hope that this is of some help. If you're still having trouble, feel to contact me directly. Jim Gray Gray.OSBUSouth@Xerox.COM