<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html class="client-nojs" dir="ltr" lang="en">
<head>
<meta charset="UTF-8" />
<title>Documents/How to/Crash report - OpenSCADAWiki</title>
<meta content="MediaWiki 1.26.4" name="generator" />
<link href="https://www.gnu.org/copyleft/fdl.html" rel="copyright" />
<link href="files/doc.css" rel="stylesheet" /></head>
<body><div class="floatright"><a href="index.html"><img alt="OpenSCADA" src="../en/files/index.png" /></a></div><div id="mw_header">
			<div class="mw-indicators">
</div>
			<h1 id="firstHeading" lang="en">Documents/How to/Crash report</h1>
		</div><div class="mw-content-ltr" dir="ltr" id="mw-content-text" lang="en"><div class="mw-pt-languages" dir="ltr" lang="en"><div class="mw-pt-languages-list autonym"><span class="mw-pt-languages-ui mw-pt-languages-selected mw-pt-progress mw-pt-progress--complete">English</span>&nbsp;• ‎<a class="mw-pt-progress mw-pt-progress--complete" href="../ru/How_to_Crash_report.html" title="Документы/Как/Отчитаться про аварийное завершение (87% translated)">mRussian</a>&nbsp;• ‎<a class="mw-pt-progress mw-pt-progress--complete" href="../uk/How_to_Crash_report.html" title="Документи/Як/Звітувати про аварійне завершення (100% translated)">Українська</a></div></div>
<div style="float:right; border:1px solid gray; width:300px; padding:2px; margin-left: 10pt; margin-bottom: 10pt;">
<ul><li> <b>Author:</b> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </li></ul>
</div>
<p>For debugging and testing OpenSCADA it is given considerable time of developers, but due to resource constraints and the inability to cover all configuration and implementation options of OpenSCADA, errors can be occurred as a failure of some functions, incorrectness of their implementation and even crash of the program. Understanding this on the part of the user is very important and it requires goodwill and some time to prepare a report about the problem, with the aim of its subsequent elimination by the developers.
</p>
<div class="toc" id="toc"><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1 tocsection-1"><a href="#The_reporting_conditions_and_variants"><span class="tocnumber">1</span> <span class="toctext">The reporting conditions and variants</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#Requirements_for_the_error_report"><span class="tocnumber">2</span> <span class="toctext">Requirements for the error report</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="#Obtaining_the_file_of_the_pre-mortem_dump_and_its_processing_.28DEPRECATED.29"><span class="tocnumber">3</span> <span class="toctext">Obtaining the file of the pre-mortem dump and its processing (DEPRECATED)</span></a></li>
</ul>
</div>

<h2><span class="mw-headline" id="The_reporting_conditions_and_variants"><span class="mw-headline-number">1</span> The reporting conditions and variants</span></h2>
<p>Anyone can report for error in the program for be considered by the developers on the general grounds of the free technical support, outside of the agreement of the commercial technical support or execution of this user's work. But the developers will consider only the errors that are the direct errors of OpenSCADA, not the problems of the environment and third-party libraries and are reproduced in the developer in the demo configurations of the last versions of OpenSCADA and the existing equipment of the OpenSCADA project!
</p><p>The main and only official site for error reporting on the general grounds for free technical support is the section of the forum "<a class="external text" href="http://oscada.org/en/forum/topics/bug_tracker/" rel="nofollow noreferrer noopener" target="_blank">Bug tracker</a>", where <a class="external text" href="http://oscada.org/en/development/developers/" rel="nofollow noreferrer noopener" target="_blank">developers</a> <a class="external" href="http://oscada.org/wiki/Special:MyLanguage/Works" title="Special:MyLanguage/Works">is guaranteed to give it an answer</a>. If you are not sure that this is an error directly with OpenSCADA, then it's better to write a report about it in another section of the OpenSCADA forum, where no warranty is given. Otherwise, after three consecutive incorrect error reports, you will be disconnected from the forum for the bad reception of the technical support and consultation, in vain spending so time of the developers! The error reporting rules are detailed in <a class="external text" href="http://oscada.org/en/forum/posts/bug_tracker/rules-1/" rel="nofollow noreferrer noopener" target="_blank">here</a>.
</p><p>Before forming a bug report on the general grounds of the free technical support, you need to check the list of known reports on the <a class="external text" href="http://oscada.org/en/forum/tags/" rel="nofollow noreferrer noopener" target="_blank">page of the forum tags</a>:
</p>
<ul><li> confirmed-opened and solving now — "BugConfirmed";</li>
<li> which are currently in need of feedback from the author — "BugNeedFeedBack";</li>
<li> execution environment and specific to the user — "BugEnvironment";</li>
<li> incorrect error reports — "BugWrong".</li></ul>
<p>Reporting of errors in the program based on <a class="external text" href="http://oscada.org/en/services/technical-support/" rel="nofollow noreferrer noopener" target="_blank">the commercial technical support</a> or user work can be done in the following ways, according to the developer's priority:
</p>
<ul><li> in the forum section "<a class="external text" href="http://oscada.org/en/forum/topics/tech_support/" rel="nofollow noreferrer noopener" target="_blank">Tech support</a>" that appears and is available to registered users with an active <a class="external text" href="http://oscada.org/en/services/technical-support/" rel="nofollow noreferrer noopener" target="_blank">package of the technological support</a>;</li>
<li> e-mail to <a class="external text" href="mailto:service@oscada.org" rel="nofollow noreferrer noopener" target="_blank">service at oscada.org</a>;</li>
<li> directly by e-mail, instant messaging and call service, or by telephone of <a class="external text" href="http://oscada.org/en/development/developers/" rel="nofollow noreferrer noopener" target="_blank">the developer</a>, as well as <a class="external text" href="http://oscada.org/en/forum/private-messages/" rel="nofollow noreferrer noopener" target="_blank">private forum messages</a> (for registered users).</li></ul>
<h2><span class="mw-headline" id="Requirements_for_the_error_report"><span class="mw-headline-number">2</span> Requirements for the error report</span></h2>
<p>In order to exclude unnecessary overhead questions, or even premature closure of the error in the state "Not a bug", and to speed up the process of localization of the problem, it is recommended to follow the following requirements for the report:
</p>
<ul><li> Specify the environment of the execution of OpenSCADA, that is: distribution and version of the operating system.</li>
<li> Specify the version of OpenSCADA, including the SVN revision of the working branch.</li>
<li> Specify the configuration and execution features.</li></ul>
<dl><dd><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="files/At.png" width="22" /></a> In the case of free support, it is mandatory to reproduce the problem in standard configurations and in the <a href="Quick_start.html" title="Special:MyLanguage/Documents/Quick start">demo database</a>, especially when it is an emergency crash and it is not possible to generate a crash report or it is indescribable.</dd></dl>
<ul><li> Describe the actions that cause the error.</li>
<li> Attach the OpenSCADA message protocol for a session with the error.</li>
<li> Include report of the program crash — unroll the stack at the time of the crash.
<ul><li> the report is usually generated automatically by generating it from the crashing process or pre-mortem memory dump (earlier) — just install <b>GDB</b>; refer to the next section for some specific here;</li>
<li> to increase significantly the use of the stack unrolling, you must add debugging information, by setting the "-g" option during compilation, or install the ready debug package <b>openscada-dbg</b>;</li>
<li> for problems, related to the blocking of one or more OpenSCADA threads, it may be useful to manually interrupt the program by call <span style="border: solid gray 1px; padding: 1px; font-family: monospace; font-size: 1.2em; white-space: nowrap;">openscada-proj snapshot {ProjID} </span> or the "SIGSEGV" signal, which will cause the formation of the fall-down report with the information about the hangover.</li></ul></li></ul>
<h2><span class="mw-headline" id="Obtaining_the_file_of_the_pre-mortem_dump_and_its_processing_.28DEPRECATED.29"><span class="mw-headline-number">3</span> Obtaining the file of the pre-mortem dump and its processing (DEPRECATED)</span></h2>
<p><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="files/At.png" width="22" /></a> The section is not actual more for new versions of OpenSCADA, but you can use its content for old versions or in specific and manual learning the crashes!
</p><p>In the case of an emergency exit of a program, the kernel of the Linux operating system can form a pre-mortem memory dump of the program. With this dump, you can often find a place in the program that caused the emergency stop. To enable the possibility of generating the pre-mortem memory dump of program by the Linux kernel, you need to execute the commands:
</p>
<div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span class="c"># Check the possibility of generation of memory dumps</span>
<span class="c"># Specifies the "core" if it is enabled</span>
cat /proc/sys/kernel/core_pattern
<span class="c"># Enabling the generation of memory dumps</span>
<span class="nb">echo</span> <span class="s2">"core"</span> &gt; /proc/sys/kernel/core_pattern
</pre></div>
<p>After that, you need to remove the limit on the size of the generated dump file. This limit is currently, by default, removed into OpenSCADA and is enabled with the command line argument <b>--noCoreDump</b>. To remove this limitation, at the operating system level, you can execute, before calling OpenSCADA, a special command <span style="border: solid gray 1px; padding: 1px; font-family: monospace; font-size: 1.2em; white-space: nowrap;">ulimit -c unlimited</span>.
</p><p>Then, you must make sure that the user launching OpenSCADA has the rights to write to the OpenSCADA working directory, which is required in the latest versions of OpenSCADA and provided by <a href="Program_manual.html#Projects" title="Special:MyLanguage/Documents/Program manual">the OpenSCADA Project Manager</a>.
</p><p>Then start OpenSCADA and reproduce the crash, which resulted in the working directory OpenSCADA, creates a file "core".
</p><p>The latest versions of OpenSCADA provide the automatic generation of the crash report, in the presence of the "core" dump file and the <b>gdb</b> debugger, and this is done at the start of OpenSCADA. Crash report files are named "AGLKS_core_2018-02-16_22.06.crash" and accumulate in the work folder of the OpenSCADA project.
</p><p>If the "core" memory dump file is generated and the crash report is not automatically generated, then the <b>gdb</b> debugger is probably not installed. In this case, you must install it and call:
</p>
<ul><li> service procedure of the OpenSCADA projects manager:</li></ul>
<dl><dd><span style="border: solid gray 1px; padding: 1px; font-family: monospace; font-size: 1.2em; white-space: nowrap;">openscada-proj proc {ProjName}</span></dd></dl>
<ul><li> or a direct debugger command from the project's working directory:</li></ul>
<dl><dd><span style="border: solid gray 1px; padding: 1px; font-family: monospace; font-size: 1.2em; white-space: nowrap;">gdb openscada --core core --batch --quiet -ex "thread apply all bt full" -ex "quit" &gt; {ProjName}_core_$(date +%F_%H:%M).crash</span></dd></dl>
<ul><li> or a direct debugger procedure in the interactive mode, by calling <b>gdb</b> without arguments:</li></ul>
<div class="mw-highlight mw-content-ltr" dir="ltr" style="margin-left: 15px"><pre><span class="c"># Go to working folder of the OpenSCADA project</span>
<span class="o">(</span>gdb<span class="o">)</span> <span class="nb">cd</span> /var/spool/openscada/<span class="o">{</span>ProjName<span class="o">}</span>
<span class="o">(</span>gdb<span class="o">)</span> <span class="nb">cd</span> ~/.openscada/<span class="o">{</span>ProjName<span class="o">}</span>
<span class="c"># Specifying an executable file</span>
<span class="o">(</span>gdb<span class="o">)</span> file /usr/bin/openscada
<span class="c"># Specifying the dump file of the program</span>
<span class="o">(</span>gdb<span class="o">)</span> core-file ./core.26658
<span class="c"># Getting the reversal of the stack execution — the crash report</span>
<span class="o">(</span>gdb<span class="o">)</span> thread apply all bt full
<span class="c">#0  0xb7d104c0 in pthread_cancel () from /lib/librt.so.1</span>
<span class="c">#1  0xb7d1edaa in start_thread () from /lib/libpthread.so.0</span>
<span class="c">#2  0xb7dfcf5e in clone () from /lib/libc.so.6</span>
</pre></div>






</div><table style="border-top: dotted 2px #999999; margin-top: 20pt; color: gray;" width="100%"><tr><td style="text-align: left;" width="40%"><a href="http://oscada.org/wiki/Documents/How_to/Crash_report/en">Documents/How_to/Crash_report/en</a> - <a href="http://oscada.org/en/main/about-the-project/licenses/">GFDL</a></td><td style="text-align: center;">April 2025</td><td style="text-align: right;" width="40%">OpenSCADA 1+r3018</td></tr></table></body>
</html>