<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://petersap.nl/SybaseWiki/index.php?action=history&amp;feed=atom&amp;title=Stacktraces_in_ASE</id>
		<title>Stacktraces in ASE - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://petersap.nl/SybaseWiki/index.php?action=history&amp;feed=atom&amp;title=Stacktraces_in_ASE"/>
		<link rel="alternate" type="text/html" href="http://petersap.nl/SybaseWiki/index.php?title=Stacktraces_in_ASE&amp;action=history"/>
		<updated>2026-04-04T20:57:39Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>http://petersap.nl/SybaseWiki/index.php?title=Stacktraces_in_ASE&amp;diff=1635&amp;oldid=prev</id>
		<title>Psap at 09:39, 17 May 2007</title>
		<link rel="alternate" type="text/html" href="http://petersap.nl/SybaseWiki/index.php?title=Stacktraces_in_ASE&amp;diff=1635&amp;oldid=prev"/>
				<updated>2007-05-17T09:39:26Z</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; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:39, 17 May 2007&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;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sometimes your Sybase ASE will produce a stacktrace in the errorlog. At first glance the messages within the stacktrace are obscure and seem very hard to read. In this document some tips and techniques are given to get information out of the stacktrace so you can isolate the problem that caused the stacktrace.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sometimes your Sybase ASE will produce a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[http://en.wikipedia.org/wiki/Stack_trace &lt;/ins&gt;stacktrace&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;in the errorlog. At first glance the messages within the stacktrace are obscure and seem very hard to read. In this document some tips and techniques are given to get information out of the stacktrace so you can isolate the problem that caused the stacktrace.&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==What is a stacktrace?==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==What is a stacktrace?==&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;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In my opinion a stacktrace is the result of hitting a bug within the Sybase server. A stacktrace should never occur and it should be reported to Sybase so they can resolve the problem and make a fix (EBF) available (when you have a support contract). However, it does help that you also spent some time working on a stacktrace, because EBF's can take quite some time to become available. In the meantime you will probably need a workaround.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In my opinion a stacktrace is the result of hitting a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[http://en.wikipedia.org/wiki/Computer_bug &lt;/ins&gt;bug&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;within the Sybase server. A stacktrace should never occur and it should be reported to Sybase so they can resolve the problem and make a fix (EBF) available (when you have a support contract). However, it does help that you also spent some time working on a stacktrace, because EBF's can take quite some time to become available. In the meantime you will probably need a workaround.&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;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The stacktrace itself is a list of all the functions called within ASE from the point where your session connected to the server up to the moment you hit the bug. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Reading &lt;/del&gt;a stacktrace from top to bottom you will see that the stacktrace is a so called traceback. It starts at the point where you hit the bug and then each function is shown up to the point that your session connected to the server. As we will see later, there are also some other messages given, such as database id.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The stacktrace itself is a list of all the functions called within ASE from the point where your session connected to the server up to the moment you hit the bug. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;While reading &lt;/ins&gt;a stacktrace from top to bottom you will see that the stacktrace is a so called traceback. It starts at the point where you hit the bug and then each function is shown up to the point that your session connected to the server. As we will see later, there are also some other messages given, such as database id.&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==How to recognize a stacktrace.==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==How to recognize a stacktrace.==&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 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Legend===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Legend===&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* current process: Shows the kernel process id in hexadecimal. The decimal value is 520683576 and is the same as the kpid shown on the last line of this stacktrace.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* current process: Shows the kernel process id in hexadecimal. The decimal value is 520683576 and is the same as the kpid shown on the last line of this stacktrace.&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;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* infected with: Reflects the cause of the problem within ASE at the level of the operating system. Most common are 10 and 11, meaning &amp;quot;Bus error&amp;quot; and &amp;quot;Segmentation fault&amp;quot; respectively&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. When you see other values here try looking at the manual pages of signal.h (try &amp;quot;man -s 3HEAD signal&amp;quot;)&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* infected with: Reflects the cause of the problem within ASE at the level of the operating system. Most common are 10 and 11, meaning &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[http://en.wikipedia.org/wiki/Bus_error &lt;/ins&gt;&amp;quot;Bus error&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[http://en.wikipedia.org/wiki/Segmentation_fault &lt;/ins&gt;&amp;quot;Segmentation fault&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;respectively.&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* SQL causing error: Points to the query that caused the problem. Please note that the bug is ofcourse within ASE but a workaround can be applied in the code shown. Since the introduction of dynamic SQL in version 12.0 you cannot trust this information when your application uses dynamic SQL. The &amp;quot;SQL causing error&amp;quot; will not point to the right SQL code that caused the problem.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* SQL causing error: Points to the query that caused the problem. Please note that the bug is ofcourse within ASE but a workaround can be applied in the code shown. Since the introduction of dynamic SQL in version 12.0 you cannot trust this information when your application uses dynamic SQL. The &amp;quot;SQL causing error&amp;quot; will not point to the right SQL code that caused the problem.&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;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* curdb: Points to the dbid of the current database of the session. Use &amp;quot;select db_name(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;10&lt;/del&gt;)&amp;quot; to retrieve the name of the database &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(10 is just an example here)&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* curdb: Points to the dbid of the current database of the session. Use &amp;quot;select db_name(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;curdb&amp;gt;&lt;/ins&gt;)&amp;quot; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;([http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.blocks/html/blocks/blocks142.htm db_name]) &lt;/ins&gt;to retrieve the name of the database.&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;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* lasterror and preverror: Shows the error number (if any) that is accompanied with the stacktrace. This error can be shown in the errorlog just above the stacktrace and will yield important information to find a workaround for the problem. When the error is not shown you can retrieve the text for the error with &amp;quot;select description from master..sysmessages where error = ...&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* lasterror and preverror: Shows the error number (if any) that is accompanied with the stacktrace. This error can be shown in the errorlog just above the stacktrace and will yield important information to find a workaround for the problem. When the error is not shown you can retrieve the text for the error with &amp;quot;select description from master..sysmessages where error = ...&amp;quot;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Alternatively, look in the [http://infocenter.sybase.com/help/topic/com.sybase.39996_1250/html/svrtsg/title.htm Troubleshooting and Error Messages Guide]&lt;/ins&gt;&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;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* transtate: Shows the state of the transaction when the stacktrace occured. The values are the same as for the global variable @@transtate. Possible value are: 0=transaction in progress, 1=transaction succeeded, completed and committed, 2=previous statement aborted, transaction still active, 3=transaction aborted and rolled back.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* transtate: Shows the state of the transaction when the stacktrace occured. The values are the same as for the global variable &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sqlug/html/sqlug/sqlug608.htm &lt;/ins&gt;@@transtate&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;. Possible value are: 0=transaction in progress, 1=transaction succeeded, completed and committed, 2=previous statement aborted, transaction still active, 3=transaction aborted and rolled back.&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* curcmd: Reflects the command that was executing when the stacktrace occurred. I don't have a definitive list for these numbers yet, but this might help: 193 and 196: execute, 195 and 224: select, 197 update.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* curcmd: Reflects the command that was executing when the stacktrace occurred. I don't have a definitive list for these numbers yet, but this might help: 193 and 196: execute, 195 and 224: select, 197 update.&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* program: The name of the client that connected to the server. It's equivalent to the column program_name in the table master..sysprocesses.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* program: The name of the client that connected to the server. It's equivalent to the column program_name in the table master..sysprocesses.&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 84:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 84:&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Legend===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Legend===&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* current process: Shows the kernel process id in hexadecimal. The decimal value is 520683576 and is the same as the kpid shown on the last line of this stacktrace.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* current process: Shows the kernel process id in hexadecimal. The decimal value is 520683576 and is the same as the kpid shown on the last line of this stacktrace.&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;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* infected with: Reflects the cause of the problem within ASE at the level of the operating system. Most common are 10 and 11, meaning &amp;quot;Bus error&amp;quot; and &amp;quot;Segmentation fault&amp;quot; respectively&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. When you see other values here try looking at the manual pages of signal.h (try &amp;quot;man -s 3HEAD signal&amp;quot;)&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* infected with: Reflects the cause of the problem within ASE at the level of the operating system. Most common are 10 and 11, meaning &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[http://en.wikipedia.org/wiki/Bus_error &lt;/ins&gt;&amp;quot;Bus error&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[http://en.wikipedia.org/wiki/Segmentation_fault &lt;/ins&gt;&amp;quot;Segmentation fault&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;respectively.&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* kpid: All server processes have a spid and also a kernel process id. It can be retrieved by using a &amp;quot;select * from master..sysprocesses&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* kpid: All server processes have a spid and also a kernel process id. It can be retrieved by using a &amp;quot;select * from master..sysprocesses&amp;quot;.&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 99:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 99:&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; pc: 0xff3483b8 '''_fork'''+0x850(0x0000000b, 0x00bf2090, 0x00000000, 0x00000000, 0x00000000)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; pc: 0xff3483b8 '''_fork'''+0x850(0x0000000b, 0x00bf2090, 0x00000000, 0x00000000, 0x00000000)&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Don't get confused by the all the hexadecimal numbers but just look at the names of the functions (as shown in bold here). These functions handle the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;traceback and &lt;/del&gt;termination of the process. The information shown is of little use so let's carry straight on to the next part that details the problem within the server.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Don't get confused by the all the hexadecimal numbers but just look at the names of the functions (as shown in bold here). These functions handle the termination of the process. The information shown is of little use so let's carry straight on to the next part that details the problem within the server.&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==What went wrong?==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==What went wrong?==&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 127:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 127:&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Legend===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Legend===&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;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* spid: The spid (server process id) is shown here. It's a bit overdone because at the start of each line in the errorlog it is also shown. If you look at the full stacktrace example you'll see cpu-number, family-id, spid and datetime.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* spid: The &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.blocks/html/blocks/blocks239.htm &lt;/ins&gt;spid&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;(server process id) is shown here. It's a bit overdone because at the start of each line in the errorlog it is also shown. If you look at the full stacktrace example you'll see cpu-number, family-id, spid and datetime.&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* kpid: All server processes have a spid and also a kernel process id. It can be retrieved by using a &amp;quot;select * from master..sysprocesses&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* kpid: All server processes have a spid and also a kernel process id. It can be retrieved by using a &amp;quot;select * from master..sysprocesses&amp;quot;.&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;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* suid: The suid (server user id) can be traced back to a user name with &amp;quot;select suser_name(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;68&lt;/del&gt;)&amp;quot;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;68 is used as an example&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* suid: The suid (server user id) can be traced back to a user name with &amp;quot;select suser_name(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;suid&amp;gt;&lt;/ins&gt;)&amp;quot;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[http://infocenter&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sybase.com/help/topic/com.sybase.help.ase_15.0.blocks/html/blocks/blocks218.htm suser_name()]&lt;/ins&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When users are using the same login names is can be very hard to determine which user caused the problem.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When users are using the same login names is can be very hard to determine which user caused the problem.&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;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When you set traceflag 4013 with &amp;quot;dbcc traceon(4013)&amp;quot; each logon will be shown in the errorlog together with the name of the client, so that can help you to trace back to the user causing the problem. You can then talk to the person and try to figure out what he/she was doing.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When you set traceflag 4013 with &amp;quot;dbcc traceon(4013)&amp;quot; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.omni_ug/html/omni_ug/omni_ug120.htm dbcc traceon()] &lt;/ins&gt;each logon will be shown in the errorlog together with the name of the client, so that can help you to trace back to the user causing the problem. You can then talk to the person and try to figure out what he/she was doing.&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&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-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Reproducing the problem==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Reproducing the problem==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key website-mw_:diff:version:1.11a:oldid:1633:newid:1635 --&gt;
&lt;/table&gt;</summary>
		<author><name>Psap</name></author>	</entry>

	<entry>
		<id>http://petersap.nl/SybaseWiki/index.php?title=Stacktraces_in_ASE&amp;diff=1633&amp;oldid=prev</id>
		<title>Psap at 19:55, 16 May 2007</title>
		<link rel="alternate" type="text/html" href="http://petersap.nl/SybaseWiki/index.php?title=Stacktraces_in_ASE&amp;diff=1633&amp;oldid=prev"/>
				<updated>2007-05-16T19:55:49Z</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;Sometimes your Sybase ASE will produce a stacktrace in the errorlog. At first glance the messages within the stacktrace are obscure and seem very hard to read. In this document some tips and techniques are given to get information out of the stacktrace so you can isolate the problem that caused the stacktrace.&lt;br /&gt;
&lt;br /&gt;
==What is a stacktrace?==&lt;br /&gt;
In my opinion a stacktrace is the result of hitting a bug within the Sybase server. A stacktrace should never occur and it should be reported to Sybase so they can resolve the problem and make a fix (EBF) available (when you have a support contract). However, it does help that you also spent some time working on a stacktrace, because EBF's can take quite some time to become available. In the meantime you will probably need a workaround.&lt;br /&gt;
The stacktrace itself is a list of all the functions called within ASE from the point where your session connected to the server up to the moment you hit the bug. Reading a stacktrace from top to bottom you will see that the stacktrace is a so called traceback. It starts at the point where you hit the bug and then each function is shown up to the point that your session connected to the server. As we will see later, there are also some other messages given, such as database id.&lt;br /&gt;
&lt;br /&gt;
==How to recognize a stacktrace.==&lt;br /&gt;
As said earlier, a stacktrace is reported in the errorlog. When your client connection suddenly dies you should suspect a stacktrace, especially when you see the message &amp;quot;The SQL Server is terminating this process&amp;quot;. Take a look in the errorlog or ask your DBA to take a look.&lt;br /&gt;
&lt;br /&gt;
==Sample stack trace.==&lt;br /&gt;
For readability the first part (cpu number, datetime, etc) of all lines, has been omitted.&lt;br /&gt;
 kernel current process (0x1f090038) infected with 11&lt;br /&gt;
 kernel Address 0x0036a39c (expand_ALL_nodes+0x1b4), siginfo (code, address) = (1, 0x0000000c)&lt;br /&gt;
 kernel ************************************&lt;br /&gt;
 kernel SQL causing error : exec @error = grid_exceptions @system_id with recompile&lt;br /&gt;
 kernel ************************************&lt;br /&gt;
 server SQL Text: exec @error = grid_exceptions @system_id with recompile&lt;br /&gt;
 kernel curdb = 10 pstat = 0x40010000 lasterror = 0&lt;br /&gt;
 kernel preverror = 0 transtate = 1&lt;br /&gt;
 kernel curcmd = 224 program = isql&lt;br /&gt;
 kernel pc: 0x0064ec6c pcstkwalk+0x24(0x81d1b458, 0x00000000, 0x0000270f, 0x00000002, 0xfffffff8)&lt;br /&gt;
 kernel pc: 0x0064eb78 ucstkgentrace+0x194(0x1f090038, 0x821f4468, 0x821f4468, 0x81e0c460, 0x00000000)&lt;br /&gt;
 kernel pc: 0x0061c0d8 ucbacktrace+0xa8(0x81e0c460, 0x00000001, 0x1f090038, 0x821a3ed8, 0x00000000)&lt;br /&gt;
 kernel pc: 0x000f6238 terminate_process+0xd70(0x00bedc60, 0x000054e8, 0x000054e4, 0xffffffff, 0x00005000)&lt;br /&gt;
 kernel pc: 0x00631868 kisignal+0x1e0(0x81d1bf94, 0x81d1bcfc, 0x0000000b, 0x81d1bcd0, 0x81d1bf88)&lt;br /&gt;
 kernel pc: 0xff34905c sigaction+0x740(0x0000000b, 0x81d1bf88, 0x81d1bcd0, 0xff35e000, 0x0000000b)&lt;br /&gt;
 kernel pc: 0xff34bbcc _getfp+0x220(0x0000000b, 0x81d1bf88, 0x81d1bcd0, 0xff348f78, 0x00bf2128)&lt;br /&gt;
 kernel pc: 0xff3483b8 _fork+0x850(0x0000000b, 0x00bf2090, 0x00000000, 0x00000000, 0x00000000)&lt;br /&gt;
 kernel pc: 0x001b2810 lock_logical+0x284(0x00000000, 0x81d1c0f0, 0x00000000, 0x00000003, 0x821f4468)&lt;br /&gt;
 kernel pc: 0x003668c0 colnames+0x498(0x821f45f0, 0x84173cf0, 0x00000000, 0x821f4468, 0x81d1c1c8)&lt;br /&gt;
 kernel pc: 0x00366338 colnames_recurse+0xa8(0x000001, 0x000000, 0x85393058, 0x84173dc4, 0x84173d50)&lt;br /&gt;
 kernel pc: 0x00366244 colnames_driver+0x40(0x84173cf0, 0x84173d50, 0x00000000, 0x84173cf0, 0x87609000)&lt;br /&gt;
 kernel pc: 0x003a32e0 s_normquery+0x58(0x00006c00, 0x84173d50, 0x821f4468, 0x00000000, 0x00000001)&lt;br /&gt;
 kernel pc: 0x003a24fc s_normalize+0x274(0x00000001, 0x84173d50, 0x00bdf504, 0x00000000, 0x00000000)&lt;br /&gt;
 kernel pc: 0x003a3d64 s_renormalize+0xa4(0x00005000, 0x00bdf400, 0x00005388, 0x821f4468, 0x00000000)&lt;br /&gt;
 kernel pc: 0x003a3a84 s_recompile+0x1b8(0x00000001, 0x873b5348, 0x00005000, 0x00005388, 0x821f4468)&lt;br /&gt;
 kernel [Handler pc: 0x003a4594 s_handle installed by the following function:-]&lt;br /&gt;
 kernel pc: 0x003a1100 sequencer+0xc0c(0x00bdf400, 0x00bee800, 0x00005000, 0x00005388, 0x821f4468)&lt;br /&gt;
 kernel pc: 0x00391938 execproc+0x79c(0x00005388, 0x00007000, 0x821f4468, 0x00005000, 0x00000011)&lt;br /&gt;
 kernel pc: 0x0038ab14 s_execute+0x291c(0x00bedc00, 0x00be1400, 0x81816340, 0x00000008, 0x00000000)&lt;br /&gt;
 kernel [Handler pc: 0x003a4594 s_handle installed by the following function:-]&lt;br /&gt;
 kernel pc: 0x003a15cc sequencer+0x10d8(0x00bdf400, 0x00bedc00, 0x81816340, 0x00005388, 0x821f4468)&lt;br /&gt;
 kernel pc: 0x0011ce34 tdsrecv_language+0xb4(0x00bdf400, 0x00bee800, 0x000001, 0x00005000, 0x00005400)&lt;br /&gt;
 kernel end of stack trace, spid 10, kpid 520683576, suid 68&lt;br /&gt;
&lt;br /&gt;
Let's use this stacktrace as an example.&lt;br /&gt;
&lt;br /&gt;
==Stacktrace Header (error while executing SQL)==&lt;br /&gt;
Let's call the first part of the stacktrace the header. There are two types, one for internal server faults and another one that occurred while executing some SQL statement. Let's take a look at this one first.&lt;br /&gt;
&lt;br /&gt;
 '''current process''' (0x1f090038) '''infected with 11'''&lt;br /&gt;
 Address 0x0036a39c (expand_ALL_nodes+0x1b4), siginfo (code, address) = (1, 0x0000000c)&lt;br /&gt;
 ************************************&lt;br /&gt;
 '''SQL causing error''' : exec @error = grid_exceptions @system_id with recompile&lt;br /&gt;
 ************************************&lt;br /&gt;
 SQL Text: exec @error = grid_exceptions @system_id with recompile&lt;br /&gt;
 '''curdb''' = 10 pstat = 0x40010000 '''lasterror''' = 0&lt;br /&gt;
 '''preverror''' = 0 '''transtate''' = 1&lt;br /&gt;
 '''curcmd''' = 224 '''program''' = isql&lt;br /&gt;
&lt;br /&gt;
===Legend===&lt;br /&gt;
* current process: Shows the kernel process id in hexadecimal. The decimal value is 520683576 and is the same as the kpid shown on the last line of this stacktrace.&lt;br /&gt;
* infected with: Reflects the cause of the problem within ASE at the level of the operating system. Most common are 10 and 11, meaning &amp;quot;Bus error&amp;quot; and &amp;quot;Segmentation fault&amp;quot; respectively. When you see other values here try looking at the manual pages of signal.h (try &amp;quot;man -s 3HEAD signal&amp;quot;).&lt;br /&gt;
* SQL causing error: Points to the query that caused the problem. Please note that the bug is ofcourse within ASE but a workaround can be applied in the code shown. Since the introduction of dynamic SQL in version 12.0 you cannot trust this information when your application uses dynamic SQL. The &amp;quot;SQL causing error&amp;quot; will not point to the right SQL code that caused the problem.&lt;br /&gt;
* curdb: Points to the dbid of the current database of the session. Use &amp;quot;select db_name(10)&amp;quot; to retrieve the name of the database (10 is just an example here).&lt;br /&gt;
* lasterror and preverror: Shows the error number (if any) that is accompanied with the stacktrace. This error can be shown in the errorlog just above the stacktrace and will yield important information to find a workaround for the problem. When the error is not shown you can retrieve the text for the error with &amp;quot;select description from master..sysmessages where error = ...&amp;quot;.&lt;br /&gt;
* transtate: Shows the state of the transaction when the stacktrace occured. The values are the same as for the global variable @@transtate. Possible value are: 0=transaction in progress, 1=transaction succeeded, completed and committed, 2=previous statement aborted, transaction still active, 3=transaction aborted and rolled back.&lt;br /&gt;
* curcmd: Reflects the command that was executing when the stacktrace occurred. I don't have a definitive list for these numbers yet, but this might help: 193 and 196: execute, 195 and 224: select, 197 update.&lt;br /&gt;
* program: The name of the client that connected to the server. It's equivalent to the column program_name in the table master..sysprocesses.&lt;br /&gt;
&lt;br /&gt;
==Stacktrace Header (Internal server error)==&lt;br /&gt;
A different header will be shown when an internal error occurred. An example:&lt;br /&gt;
&lt;br /&gt;
 '''current process''' (0x518002f) '''infected with 10'''&lt;br /&gt;
 Address 0x00179978 (bufdlink+0x44), siginfo (code, address) = (1, 0x000091c1)&lt;br /&gt;
 Spinlocks held by '''kpid''' 85458991&lt;br /&gt;
 &lt;br /&gt;
 Spinlock temp_cache at address 81815dc0 owned by 85458991&lt;br /&gt;
 End of spinlock display.&lt;br /&gt;
&lt;br /&gt;
In this example the stacktrace was caused by the invalid handling of a spinlock. The name of the cache is shown (temp_cache).&lt;br /&gt;
These errors can be very hard to reproduce and a restart of the server is usually recommended (in this case the server committed suicide).&lt;br /&gt;
&lt;br /&gt;
===Legend===&lt;br /&gt;
* current process: Shows the kernel process id in hexadecimal. The decimal value is 520683576 and is the same as the kpid shown on the last line of this stacktrace.&lt;br /&gt;
* infected with: Reflects the cause of the problem within ASE at the level of the operating system. Most common are 10 and 11, meaning &amp;quot;Bus error&amp;quot; and &amp;quot;Segmentation fault&amp;quot; respectively. When you see other values here try looking at the manual pages of signal.h (try &amp;quot;man -s 3HEAD signal&amp;quot;).&lt;br /&gt;
* kpid: All server processes have a spid and also a kernel process id. It can be retrieved by using a &amp;quot;select * from master..sysprocesses&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Termination of the server process==&lt;br /&gt;
The error that caused the problem within the server (either caused by SQL code or an internal error) is catched within the server, the server process is terminated and the stacktrace is reported in the errorlog.&lt;br /&gt;
&lt;br /&gt;
 pc: 0x0064ec6c '''pcstkwalk'''+0x24(0x81d1b458, 0x00000000, 0x0000270f, 0x00000002, 0xfffffff8)&lt;br /&gt;
 pc: 0x0064eb78 '''ucstkgentrace'''+0x194(0x1f090038, 0x821f4468, 0x821f4468, 0x81e0c460, 0x00000000)&lt;br /&gt;
 pc: 0x0061c0d8 '''ucbacktrace'''+0xa8(0x81e0c460, 0x00000001, 0x1f090038, 0x821a3ed8, 0x00000000)&lt;br /&gt;
 pc: 0x000f6238 '''terminate_process'''+0xd70(0x00bedc60, 0x000054e8, 0x000054e4, 0xffffffff, 0x00005000)&lt;br /&gt;
 pc: 0x00631868 '''kisignal'''+0x1e0(0x81d1bf94, 0x81d1bcfc, 0x0000000b, 0x81d1bcd0, 0x81d1bf88)&lt;br /&gt;
 pc: 0xff34905c '''sigaction'''+0x740(0x0000000b, 0x81d1bf88, 0x81d1bcd0, 0xff35e000, 0x0000000b)&lt;br /&gt;
 pc: 0xff34bbcc '''_getfp'''+0x220(0x0000000b, 0x81d1bf88, 0x81d1bcd0, 0xff348f78, 0x00bf2128)&lt;br /&gt;
 pc: 0xff3483b8 '''_fork'''+0x850(0x0000000b, 0x00bf2090, 0x00000000, 0x00000000, 0x00000000)&lt;br /&gt;
&lt;br /&gt;
Don't get confused by the all the hexadecimal numbers but just look at the names of the functions (as shown in bold here). These functions handle the traceback and termination of the process. The information shown is of little use so let's carry straight on to the next part that details the problem within the server.&lt;br /&gt;
&lt;br /&gt;
==What went wrong?==&lt;br /&gt;
 pc: 0x001b2810 '''lock_logical'''+0x284(0x00000000, 0x81d1c0f0, 0x00000000, 0x00000003, 0x821f4468)&lt;br /&gt;
 pc: 0x003668c0 '''colnames'''+0x498(0x821f45f0, 0x84173cf0, 0x00000000, 0x821f4468, 0x81d1c1c8)&lt;br /&gt;
 pc: 0x00366338 '''colnames_recurse'''+0xa8(0x00000001, 0x00000000, 0x85393058, 0x84173dc4, 0x84173d50)&lt;br /&gt;
 pc: 0x00366244 '''colnames_driver'''+0x40(0x84173cf0, 0x84173d50, 0x00000000, 0x84173cf0, 0x87609000)&lt;br /&gt;
 pc: 0x003a32e0 '''s_normquery'''+0x58(0x00006c00, 0x84173d50, 0x821f4468, 0x00000000, 0x00000001)&lt;br /&gt;
 pc: 0x003a24fc '''s_normalize'''+0x274(0x00000001, 0x84173d50, 0x00bdf504, 0x00000000, 0x00000000)&lt;br /&gt;
 pc: 0x003a3d64 '''s_renormalize'''+0xa4(0x00005000, 0x00bdf400, 0x00005388, 0x821f4468, 0x00000000)&lt;br /&gt;
 pc: 0x003a3a84 '''s_recompile'''+0x1b8(0x00000001, 0x873b5348, 0x00005000, 0x00005388, 0x821f4468)&lt;br /&gt;
 [Handler pc: 0x003a4594 s_handle installed by the following function:-]&lt;br /&gt;
 pc: 0x003a1100 '''sequencer'''+0xc0c(0x00bdf400, 0x00bee800, 0x00005000, 0x00005388, 0x821f4468)&lt;br /&gt;
 pc: 0x00391938 '''execproc'''+0x79c(0x00005388, 0x00007000, 0x821f4468, 0x00005000, 0x00000011)&lt;br /&gt;
 pc: 0x0038ab14 '''s_execute'''+0x291c(0x00bedc00, 0x00be1400, 0x81816340, 0x00000008, 0x00000000)&lt;br /&gt;
 [Handler pc: 0x003a4594 s_handle installed by the following function:-]&lt;br /&gt;
 pc: 0x003a15cc '''sequencer'''+0x10d8(0x00bdf400, 0x00bedc00, 0x81816340, 0x00005388, 0x821f4468)&lt;br /&gt;
 pc: 0x0011ce34 '''tdsrecv_language'''+0xb4(0x00bdf400, 0x00bee800, 0x00000001, 0x00005000, 0x00005400)&lt;br /&gt;
&lt;br /&gt;
You only have to look at the names of the internal functions and try to figure out what was happening at the time of the crash. Let's look at some: '''lock_logical''' is the first and that has probably something to do with locking, '''colnames''', '''colnames_recurse''' and '''colnames_driver''' have most likely something to do with determining column names.&lt;br /&gt;
The next four '''s_normquery''', '''s_normalize''', '''s_renormalize''' and '''s_recompile''' are probably coming from the execution of a stored procedure or trigger that had to be recompiled. There's further proof for that because somewhat later on we see '''s_handle''', '''sequencer''', '''execproc''' and '''s_execute'''. Now that really is proof of the execution of a stored procedure.&lt;br /&gt;
&lt;br /&gt;
==Who can we blame?==&lt;br /&gt;
At the very last line we see&lt;br /&gt;
&lt;br /&gt;
 end of stack trace, '''spid''' 10, '''kpid''' 520683576, '''suid''' 68&lt;br /&gt;
&lt;br /&gt;
===Legend===&lt;br /&gt;
* spid: The spid (server process id) is shown here. It's a bit overdone because at the start of each line in the errorlog it is also shown. If you look at the full stacktrace example you'll see cpu-number, family-id, spid and datetime.&lt;br /&gt;
* kpid: All server processes have a spid and also a kernel process id. It can be retrieved by using a &amp;quot;select * from master..sysprocesses&amp;quot;.&lt;br /&gt;
* suid: The suid (server user id) can be traced back to a user name with &amp;quot;select suser_name(68)&amp;quot;. 68 is used as an example.&lt;br /&gt;
When users are using the same login names is can be very hard to determine which user caused the problem.&lt;br /&gt;
When you set traceflag 4013 with &amp;quot;dbcc traceon(4013)&amp;quot; each logon will be shown in the errorlog together with the name of the client, so that can help you to trace back to the user causing the problem. You can then talk to the person and try to figure out what he/she was doing.&lt;br /&gt;
&lt;br /&gt;
==Reproducing the problem==&lt;br /&gt;
The reproduction of the problem will help you solve the problem. At first glance it seems to be a locking problem (lock_logical leads us to that conclusion). When I was working on this problem it turned out not be a locking problem because when rerunning the query the stack trace re-appeared. Debugging the code lead me to a point where a temporary table was created and also queried in the same stored procedure but in the query the column names were not specified, but just a &amp;quot;select *&amp;quot;.&lt;br /&gt;
Now that makes sense because we also had these colnames, colnames_recurse and colnames_driver function names. Changing the &amp;quot;*&amp;quot; in the select to a named list solved the problem.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
When you see a stacktrace it seems very difficult to read but it does give some information to pinpoint the problem. It was also give you some extra understanding about the internals of ASE. When you keep a list of your stacktraces (hopefully a short list) you can use that list to see if you had the problem before and what the reason was for the stacktrace.&lt;br /&gt;
&lt;br /&gt;
[[category:ASE]]&lt;/div&gt;</summary>
		<author><name>Psap</name></author>	</entry>

	</feed>