<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Access violation when running a detached process in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165317#M14403</link>
    <description>Andy,&lt;BR /&gt;&lt;BR /&gt;consider to create a process dump (use $ RUN/DET/DUMP) and try to figure out what's happening from the dump.&lt;BR /&gt;&lt;BR /&gt;Look at your code (probably DBCMCU) and try to figure out what it's doing. If you think everything is o.k., consider to hand the dump to either Oracle or HP ;-)&lt;BR /&gt;&lt;BR /&gt;The code may just assume that a CLI is available, although I can't see something like this to directly happen in putenv or get_environ_offset. But these routines will traverse virtual memory in the process, which could have been corrupted.&lt;BR /&gt;&lt;BR /&gt;Volker.</description>
    <pubDate>Thu, 20 Mar 2008 14:45:00 GMT</pubDate>
    <dc:creator>Volker Halle</dc:creator>
    <dc:date>2008-03-20T14:45:00Z</dc:date>
    <item>
      <title>Access violation when running a detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165315#M14401</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We have various programs that we run as detached processes. The programs are written in C. &lt;BR /&gt;&lt;BR /&gt;We are now migrating to OpenVMS v8.3-1H1 on HP Integrity with C v7.3-18.&lt;BR /&gt;&lt;BR /&gt;On the Alpha we start them without the DCL environment.&lt;BR /&gt;&lt;BR /&gt;On the Integrity when we start the detached processes without the DCL environment, we get an access violation and the program terminates. The dump file is attached.&lt;BR /&gt;&lt;BR /&gt;If we start them with in the DCL environment using LOGINOUT.EXE the process runs correctly.&lt;BR /&gt;&lt;BR /&gt;Any input on what maybe causing this would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Andrew</description>
      <pubDate>Thu, 20 Mar 2008 14:08:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165315#M14401</guid>
      <dc:creator>A.W.R</dc:creator>
      <dc:date>2008-03-20T14:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Access violation when running a detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165316#M14402</link>
      <description>&lt;!--!*#--&gt;I would guess that this a bug in the code that, through good luck, did not cause a problem on the Alpha, but is biting you in the a** on Integrity.  :)&lt;BR /&gt;&lt;BR /&gt;In your program you apparently call the C routine PUTENV.  This takes a string argument.  Is the CHAR array for that string defined as STATIC?  If not you could get an access violation later (after the routine that calls PUTENV exits).</description>
      <pubDate>Thu, 20 Mar 2008 14:26:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165316#M14402</guid>
      <dc:creator>Jess Goodman</dc:creator>
      <dc:date>2008-03-20T14:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Access violation when running a detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165317#M14403</link>
      <description>Andy,&lt;BR /&gt;&lt;BR /&gt;consider to create a process dump (use $ RUN/DET/DUMP) and try to figure out what's happening from the dump.&lt;BR /&gt;&lt;BR /&gt;Look at your code (probably DBCMCU) and try to figure out what it's doing. If you think everything is o.k., consider to hand the dump to either Oracle or HP ;-)&lt;BR /&gt;&lt;BR /&gt;The code may just assume that a CLI is available, although I can't see something like this to directly happen in putenv or get_environ_offset. But these routines will traverse virtual memory in the process, which could have been corrupted.&lt;BR /&gt;&lt;BR /&gt;Volker.</description>
      <pubDate>Thu, 20 Mar 2008 14:45:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165317#M14403</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2008-03-20T14:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Access violation when running a detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165318#M14404</link>
      <description>In addition to the process dump, you can also use the debugger and troubleshoot it directly.  (Yes, you can use the debugger on a detached process.  it takes a little set-up work, but...)  While this approach might perturb the run-time environment (if there's a heap corruption or stray pointer), it can be a familiar environment and faster than digging through dumps.&lt;BR /&gt;&lt;BR /&gt;If you have DECwindows around, SET DISPLAY or such to create a WSA device, and pass this in as SYS$INPUT, SYS$OUTPUT and SYS$ERROR on the $creprc call, or on the RUN /DETACH.&lt;BR /&gt;&lt;BR /&gt;(There's a "back-door" in LOGINOUT here, too, where passing a WSA device as SYS$ERROR sets up DECW$DISPLAY for you.)&lt;BR /&gt;&lt;BR /&gt;You can also use DBG$INPUT and DBG$OUTPUT logical names (in a logical name table visible to the detached process) and aim those logical names at an unallocated terminal.  (In the absence of an unallocated serial terminal, I've used CREATE /TERMINAL or the underlying X calls DwtDECtermPort or DECW$CREATE_DECTERM to create a DECterm terminal using DECwindows, and to then pass that in via these logical names.)&lt;BR /&gt;&lt;BR /&gt;A common error that can arise here involves process quotas or PQL minimum system parameter settings, as the memory quotas need to be circa 2x to 3x of those of Alpha.&lt;BR /&gt;&lt;BR /&gt;Here, I see slzsetevar is calling putenv, and putenv is tipping over.  This could be a calling error, or it could also be a heap corruption.  (putenv is commonly used, and tends not to have errors, so this is probably either an error in the calling code, or some sort of a run-time corruption that is tripping putenv.)&lt;BR /&gt;&lt;BR /&gt;Coincidently, I posted up some information on debugging an access violation (ACCVIO) signal just yesterday:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://64.223.189.234/node/800" target="_blank"&gt;http://64.223.189.234/node/800&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Stephen Hoffman&lt;BR /&gt;HoffmanLabs LLC</description>
      <pubDate>Thu, 20 Mar 2008 14:46:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165318#M14404</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-03-20T14:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Access violation when running a detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165319#M14405</link>
      <description>BTW, putenv is documented as calling malloc, and if the heap is stuffed up, the putenv code will often tip over... &lt;BR /&gt;&lt;BR /&gt;I'll assume you are not trying to create a symbol or logical name here, as lib$set_symbol and lib$set_logical would be better choices.  And the former expects a CLI around.&lt;BR /&gt;&lt;BR /&gt;Some tips on debugging C code weirdness, and an intro to heap errors (and pointers to tools):&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://64.223.189.234/node/401" target="_blank"&gt;http://64.223.189.234/node/401&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Mar 2008 14:53:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/access-violation-when-running-a-detached-process/m-p/4165319#M14405</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-03-20T14:53:46Z</dc:date>
    </item>
  </channel>
</rss>

