<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>thinking sysadmin &#187; kernel panic</title>
	<atom:link href="http://andyleonard.com/tag/kernel-panic/feed/" rel="self" type="application/rss+xml" />
	<link>http://andyleonard.com</link>
	<description>qstat -u aleonard -s z</description>
	<lastBuildDate>Tue, 28 Feb 2012 04:47:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Interesting Linux VM Crash Pattern</title>
		<link>http://andyleonard.com/2009/11/20/interesting-linux-vm-crash-pattern/</link>
		<comments>http://andyleonard.com/2009/11/20/interesting-linux-vm-crash-pattern/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 19:09:16 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[virtualization]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[kernel panic]]></category>
		<category><![CDATA[mptscsi]]></category>
		<category><![CDATA[netapp]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[vmware esx]]></category>
		<category><![CDATA[vsmp]]></category>

		<guid isPermaLink="false">http://andyleonard.com/?p=343</guid>
		<description><![CDATA[I&#8217;ve just begun to pull together some interesting data on a series of Linux VM crashes I&#8217;ve seen. I don&#8217;t have a resolution yet, but some interesting patterns have emerged. Crash Symptoms A CentOS 4.x or 5.x guest will crash with a message similar to the following on its console: CentOS 4.x: [&#60;f883b299&#62;] .text.lock.scsi_error+0x19/0x34 [scsi_mod] [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just begun to pull together some interesting data on a series of Linux VM crashes I&#8217;ve seen.  I don&#8217;t have a resolution yet, but some interesting patterns have emerged.</p>
<p><strong>Crash Symptoms</strong></p>
<p>A CentOS 4.x or 5.x guest will crash with a message similar to the following on its console:</p>
<p>CentOS 4.x:</p>
<p><code>[&lt;f883b299&gt;] .text.lock.scsi_error+0x19/0x34 [scsi_mod]<br />
[&lt;f88c19ce&gt;] mptscsih_io_done+0x5ee/0x608 [mptscsi] (…)<br />
[&lt;c02de564&gt;] common_interrupt+0x18/0x20<br />
[&lt;c02ddb54&gt;] system_call+0x0/0x30</code></p>
<p>CentOS 5.x:</p>
<p><code>RIP  [&lt;ffffffff8014c562&gt;] list_del+0x48/0x71 RSP &lt;ffffffff80425d00&gt; &lt;0&gt;Kernel Panic - not syncing: Fatal exception</code></p>
<p>A hard reset (i.e. pressing the reset button on the VM&#8217;s console) is required to reboot the guest.<br />
<span id="more-343"></span><br />
<strong>Further Details</strong></p>
<p>Five different VMs have encountered this issue, running at a mix of close-to-current CentOS 4.x and 5.x patch levels.  Guest kernel versions when the crash occurred were 2.6.18-128.7.1.el5 and 2.6.18-128.1.10.el5 (5.x) and 2.6.9-89.0.9.ELsmp (4.x).  Memory allocations on affected guests range from 512MB to 3072MB.  Notably, all affected VMs are using SMP &#8211; each has 2 vCPUs &#8211; having been created before our in-house practices followed <a href="http://blogs.vmware.com/performance/2008/06/esx-scheduler-s.html">VMware guidelines</a> and discouraged use of SMP on ESX guests when unnecessary.  One VM was created via P2V; the rest were created <em>de novo</em> on virtual hardware.</p>
<p>All crashes have happened on a single node in an ESX 3.5 HA cluster composed of four Dell PowerEdge 1950s.  ESX hosts have tracked the latest VMware patches closely.  COS memory on the ESX host in question was increased from the default to 800MB prior to the three most recent crashes; in other words, the COS memory increase appears to have had no effect on the crashes.  DRS is in use, set to &#8220;fully automated&#8221; and &#8220;apply recommendations with three or more stars&#8221; and no virtual machine rules have been created to control DRS host placement.</p>
<p>All guests are on the same NFS data store, served from a NetApp filer running ONTAP 7.2.x.  One guest had its vmswap placed separately on an iSCSI data store; the rest have their swap stored on NFS with the VM.  No log messages were seen on the filer during the event, although the a log message similar to the following has been seen several times on the ESX host:</p>
<p><code>vmkernel: 43:07:27:51.725 cpu2:2185)WARNING: NFS: 4590: Can't find call with serial number -2146566055</code></p>
<p>Curiously, all crashes have happened in the evening, in the 10 o&#8217;clock hour, after nightly backups have been completed.  Backups are created using a combination of VMware and NetApp snapshots via a script similar to one detailed on <a href="http://vmwaretips.com/wp/2008/12/05/netapp-snapshots-in-esx-take-2/">vmwaretips.com</a>.  No substantial load or latency has been recorded on the NetApp during the crashes, and weeks have passed between events.</p>
<p><strong>Speculation</strong></p>
<p>Explanations I&#8217;m leaning towards, ranked by my judgment of their likelihood:</p>
<p>1) <strong>Hardware issue.</strong>  Assuming a random distribution of VMs &#8211; recall that DRS is in use and no virtual machine rules are in place &#8211; the odds of all five crashes happening on one host out of four are slim: 1 in 1024.  Unfortunately, by all measures we&#8217;ve used, including the VI Client&#8217;s &#8220;Health Status&#8221; and Dell OMSA, there are no hardware issues with the host.</p>
<p>Further, the distribution of VMs is not truly random.  DRS migrations are infrequent in this cluster, and the largest determinant of guest location is migration following hosts being placed into maintenance mode for patching.</p>
<p>If it is a hardware issue, it&#8217;s subtle, and possibly only brought to the fore by the following issues.</p>
<p>2) <strong>Red Hat Enterprise Linux bug</strong> &#8211; which, by extension, is typically equivalent to a CentOS bug.  In fact, this issue appears to have been raised with Red Hat already in bugs <a href="https://bugzilla.redhat.com/show_bug.cgi?id=197158">197158</a> and <a href="https://bugzilla.redhat.com/show_bug.cgi?id=228108">228108</a> &#8211; but, according the bug reports, the issue is resolved, and the patches have since been ported downstream to CentOS.  However, perhaps the issue is not truly resolved &#8211; see <a href="https://bugzilla.redhat.com/show_bug.cgi?id=228108#c35">comment 35</a> in 228108.</p>
<p>3) <strong>vSMP Bug.</strong>  The majority of our Linux VMs are uniprocessor and appear so far to be immune to this issue; it is striking that the crash has only occurred on dual processor guests.  I cannot articulate a mechanism for multiple vCPUs causing this crash, however.</p>
<p>4) <strong>NetApp issue.</strong>  This appears to be a storage issue at some level, considering the mptscsi and NFS messages noted above, so performance of the NetApp filer would be a natural place for further investigation.  However, we monitor the performance of our filer relatively closely, using the ONTAP SDK and Cacti, and nothing unusual was recorded during any crash.  It seems unusual that all VMs reside on the same data store, but that data store shares an aggregate with multiple other unaffected data stores, and several LUNs are served from the same aggregate to non-ESX machines without complaint.</p>
<p>I have not yet opened a case with VMware on this issue &#8211; or Dell, or NetApp, for that matter &#8211; but if and when I do, I&#8217;ll update here to the extent possible.</p>
<p><strong>Update 11/20/2009:</strong> Prompted by a helpful comment from nate below, I looked up and verified the NFS settings across the cluster.  They are the same across all hosts, and are as follows:</p>
<p><code>NFS.IndirectSend 0<br />
NFS.DiskFileLockUpdate 10<br />
NFS.LockUpdateTimeout 5<br />
NFS.LockRenewMaxFailureNumber 3<br />
NFS.LockDisable 0<br />
NFS.HeartbeatFrequency 12<br />
NFS.HeartbeatTimeout 5<br />
NFS.HeartbeatDelta 5<br />
NFS.HeartbeatMaxFailures 10<br />
NFS.MaxVolumes 8<br />
NFS.SendBufferSize 264<br />
NFS.ReceiveBufferSize 128<br />
NFS.VolumeRemountFrequency 30<br />
NFS.UDPRetransmitDelay 700</code></p>
<p>The only values that are changed from default are HeartbeatFrequency and HeartbeatMaxFailures, to match NetApp&#8217;s recommendations in <a href="http://media.netapp.com/documents/tr-3428.pdf">TR-3428</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://andyleonard.com/2009/11/20/interesting-linux-vm-crash-pattern/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

