<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://help.openclovis.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://help.openclovis.com/index.php?action=history&amp;feed=atom&amp;title=Process_death</id>
		<title>Process death - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://help.openclovis.com/index.php?action=history&amp;feed=atom&amp;title=Process_death"/>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php?title=Process_death&amp;action=history"/>
		<updated>2026-06-14T21:39:52Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>https://help.openclovis.com/index.php?title=Process_death&amp;diff=17&amp;oldid=prev</id>
		<title>68.189.243.50 at 14:12, 1 June 2011</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php?title=Process_death&amp;diff=17&amp;oldid=prev"/>
				<updated>2011-06-01T14:12:58Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:12, 1 June 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* '''One of my processes is dying.&amp;#160; Does ASP ever kill a process?'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* '''One of my processes is dying.&amp;#160; Does ASP ever kill a process?'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: Yes.&amp;#160; As per the SAF spec, all AMF communications are timed.&amp;#160; Therefore if your process instantiation time or processing of AMF callbacks (CSI assignment) takes too long, then the process may be killed.&amp;#160; The process must call saAmfResponse() within a configurable time limit (default 30 seconds) or it will be killed.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For example here &lt;/del&gt;is a handler for the &amp;quot;active&amp;quot; assignment:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: Yes.&amp;#160; As per the SAF spec, all AMF communications are timed.&amp;#160; Therefore if your process instantiation time or processing of AMF callbacks (CSI assignment) takes too long, then the process may be killed.&amp;#160; The process must call saAmfResponse() within a configurable time limit (default 30 seconds) or it will be killed.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;You can check the &amp;quot;sys.latest&amp;quot; log on the active system controller to discover whether this is your problem.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Here &lt;/ins&gt;is a handler for the &amp;quot;active&amp;quot; assignment:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* '''The AMF is killing my process, but my handler looks ok.&amp;#160; What else could be wrong?'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;: It is possible that you are not letting the AMF dispatch handler run.&amp;#160; Please make sure that you call saAmfDispatch() periodically.&amp;#160; Code to do this is automatically generated within the &amp;quot;main&amp;quot; function (in clCompAppMain.c) of your process if you use the IDE code generation tool.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>68.189.243.50</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php?title=Process_death&amp;diff=16&amp;oldid=prev</id>
		<title>68.189.243.50 at 14:02, 1 June 2011</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php?title=Process_death&amp;diff=16&amp;oldid=prev"/>
				<updated>2011-06-01T14:02:42Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* '''One of my processes is dying.  Does ASP ever kill a process?'''&lt;br /&gt;
: Yes.  As per the SAF spec, all AMF communications are timed.  Therefore if your process instantiation time or processing of AMF callbacks (CSI assignment) takes too long, then the process may be killed.  The process must call saAmfResponse() within a configurable time limit (default 30 seconds) or it will be killed.  For example here is a handler for the &amp;quot;active&amp;quot; assignment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void CSISetHandler(SaInvocationT invocation,const SaNameT *compName,SaAmfHAStateT haState, SaAmfCSIDescriptorT csiDescriptor)&lt;br /&gt;
{&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case SA_AMF_HA_ACTIVE:  // BAD&lt;br /&gt;
            sleep(35);  // This &amp;quot;sleep&amp;quot; is placeholder for your actual routine that runs for 30+ seconds. Since this occurs before the saAmfResponse, it will cause the AMF to think that the process is hung.  The AMF will kill the process.&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        case SA_AMF_HA_ACTIVE:  // BAD&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            sleep(35);  // This is monopolising the AMF handler thread.  So if another event comes in just after this one, it will delay the processing of that event, causing the AMF to believe that the process is hung.&lt;br /&gt;
            break;&lt;br /&gt;
        case SA_AMF_HA_ACTIVE:  // GOOD&lt;br /&gt;
        {&lt;br /&gt;
            pthread_t thread;&lt;br /&gt;
            pthread_create(&amp;amp;thread, NULL, sleep, (void *) 35);  // This a contrived example to start a thread that sleeps for 35 seconds.  You would call your actual routine not sleep!&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
        }   break;&lt;br /&gt;
&lt;br /&gt;
        /* All other HA states need to be added to this switch, so this is not good template code */&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>68.189.243.50</name></author>	</entry>

	</feed>