<docbook><section><title>UnderstandingExitCodesSignals</title><bridgehead class="http://www.w3.org/1999/xhtml:h2">Using Evidence to Diagnose Problems</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Understanding Exit Codes Signals</bridgehead>
<para>When a Broker or agent is terminated, the exit code can be seen in the log file (for example oplrqb.log) or in the foreground window.</para><para>The exits codes are shown below:</para><para>Table: 1.
 Log Levels
</para><table><title /><tgroup><thead /><tbody>
<row><entry><emphasis>Exit Code</emphasis></entry><entry> 	<emphasis>Category</emphasis></entry><entry> 	<emphasis>Comment</emphasis></entry></row>
<row><entry>0 	</entry><entry>NORMAL </entry><entry>	Normal exit with success</entry></row>
<row><entry>1 	</entry><entry>WARNING</entry><entry> 	some kind of failure at startup/shutdown, typically shown with a reason for this error</entry></row>
<row><entry>&gt;1 	</entry><entry>UNKNOWN</entry><entry> 	When the exit code is not in the range of 0-15 then it is typically an uninitialised exit value taken from the stack. This can occur when an error in some database code is returned to the OpenLink code (Broker).</entry></row>
</tbody></tgroup></table>
<para>The agent or broker may be terminated with a signal:</para><para>Table: 2.
 Reported Signals
</para><table><title /><tgroup><thead /><tbody>
<row><entry><emphasis>Signal</emphasis> </entry><entry>	<emphasis>Name</emphasis> </entry><entry>	<emphasis>Category</emphasis> </entry><entry>	<emphasis>Comment</emphasis></entry></row>
<row><entry>2 </entry><entry>	SIGINT</entry><entry>	NORMAL </entry><entry>	user pressed CTRL-C on oplrqb -fd</entry></row>
<row><entry>3 </entry><entry>	SIGQUIT</entry><entry> 	NORMAL</entry><entry> 	user pressed CTRL-\ on oplrqb -fd</entry></row>
<row><entry>4 </entry><entry>	SIGILL </entry><entry>	FAULT </entry><entry>	illegal instruction resulting in a program crash</entry></row>
<row><entry>7 </entry><entry>	SIGBUS</entry><entry> 	FAULT </entry><entry>	misaligned mem read/write resulting in a program crash</entry></row>
<row><entry>8 </entry><entry>	SIGFPE </entry><entry>	FAULT </entry><entry>	divide by 0 or other arithmetical error</entry></row>
<row><entry>9 </entry><entry>	SIGKILL </entry><entry>	NORMAL </entry><entry>	sent by the broker to kill an agent which has ignored multiple SIGTERMs</entry></row>
<row><entry>11</entry><entry> 	SIGSEGV </entry><entry>	FAULT</entry><entry> 	buffer/stack overrun resulting in a program crash</entry></row>
<row><entry>13 </entry><entry>	SIGPIPE 	</entry><entry>NORMAL </entry><entry>	other side of a pipe was killed while this side tried to write data to it</entry></row>
<row><entry>15 </entry><entry>	SIGTERM </entry><entry>	NORMAL</entry><entry> 	sent by the broker to an agent to ask it to terminate</entry></row>
</tbody></tgroup></table>
<para>On the Windows platform, severe errors are reported in the following way:</para><programlisting>pid ... died with status code 0x....
</programlisting><para> The hex number may be looked up in the winnt.h file.
 All errors reported in this way are considered severe, and should be reported to OpenLink Support.
</para></section></docbook>