<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to crash a Java app easily?</title>
	<atom:link href="http://boxysystems.com/index.php/how-to-crash-a-jvm/feed/" rel="self" type="application/rss+xml" />
	<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/</link>
	<description>Innovation through creativity...</description>
	<lastBuildDate>Mon, 12 Dec 2011 09:48:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Nowaker</title>
		<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/comment-page-1/#comment-1267</link>
		<dc:creator>Nowaker</dc:creator>
		<pubDate>Wed, 10 Nov 2010 11:00:17 +0000</pubDate>
		<guid isPermaLink="false">http://boxysystems.com/?p=129#comment-1267</guid>
		<description>To clear these confusions, you should change the title to &quot;How to crash a Java application&quot;.</description>
		<content:encoded><![CDATA[<p>To clear these confusions, you should change the title to &#8220;How to crash a Java application&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: StackOverflow, some insights&#8230; &#124; BoxySystems Inc.</title>
		<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/comment-page-1/#comment-221</link>
		<dc:creator>StackOverflow, some insights&#8230; &#124; BoxySystems Inc.</dc:creator>
		<pubDate>Tue, 20 Jul 2010 18:25:04 +0000</pubDate>
		<guid isPermaLink="false">http://boxysystems.com/?p=129#comment-221</guid>
		<description>[...] while ago I wrote an article on &#8220;how to crash a JVM&#8221;, the purpose of that article is to identify the end limits of JVM, instead it stirred quite some [...]</description>
		<content:encoded><![CDATA[<p>[...] while ago I wrote an article on &#8220;how to crash a JVM&#8221;, the purpose of that article is to identify the end limits of JVM, instead it stirred quite some [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siddique</title>
		<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/comment-page-1/#comment-30</link>
		<dc:creator>Siddique</dc:creator>
		<pubDate>Mon, 24 May 2010 04:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://boxysystems.com/?p=129#comment-30</guid>
		<description>Hi Kumar,

Thanks for taking time to express your thoughts. 

I&#039;ll try to make this simple. A system can die &quot;gracefully&quot; or &quot;non-gracefully&quot;. If the weblogic or tomcat die due to OutOfMemoryError, I call it a  &quot;crash&quot;. Yes, it&#039;s not JVM&#039;s fault but, it&#039;s still a system crash. If you want, you can perfectly handle the errors and keep going without dying.

If you read through the answers posted in the StackOverFlow link you gave, there are some folks who added similar examples like I did. So, I am not the only one who think this as crashing.

By no means, I am not trying to find a flaw in JVM or undermine it&#039;s robustness. Here is a simple metaphor I could think of for this scenario...

A car can be crashed by a reckless driver running over a building or it can go out of whack and got crashed due to some mechanical/logistical malfunctioning like the recent Toyota&#039;s story. 

Hope it clears some confusions.</description>
		<content:encoded><![CDATA[<p>Hi Kumar,</p>
<p>Thanks for taking time to express your thoughts. </p>
<p>I&#8217;ll try to make this simple. A system can die &#8220;gracefully&#8221; or &#8220;non-gracefully&#8221;. If the weblogic or tomcat die due to OutOfMemoryError, I call it a  &#8220;crash&#8221;. Yes, it&#8217;s not JVM&#8217;s fault but, it&#8217;s still a system crash. If you want, you can perfectly handle the errors and keep going without dying.</p>
<p>If you read through the answers posted in the StackOverFlow link you gave, there are some folks who added similar examples like I did. So, I am not the only one who think this as crashing.</p>
<p>By no means, I am not trying to find a flaw in JVM or undermine it&#8217;s robustness. Here is a simple metaphor I could think of for this scenario&#8230;</p>
<p>A car can be crashed by a reckless driver running over a building or it can go out of whack and got crashed due to some mechanical/logistical malfunctioning like the recent Toyota&#8217;s story. </p>
<p>Hope it clears some confusions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar</title>
		<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/comment-page-1/#comment-29</link>
		<dc:creator>Kumar</dc:creator>
		<pubDate>Sun, 23 May 2010 19:04:55 +0000</pubDate>
		<guid isPermaLink="false">http://boxysystems.com/?p=129#comment-29</guid>
		<description>You are really misleading the terminology of what JVM crash means. JVM crash as everybody understands is when JVM is not able to handle the condition gracefully, kills all threads, and generates the core dump. Any non-native Java code should never crash the JVM (if it did it is always due to JVM bug).

Let&#039;s take a look at your examples.
1. Modify your first example to create a another thread and notice that JVM doesn&#039;t die but just kills the main thread. This is not considered a JVM crash but application logic issue.

public class JVMCrashTest {

	public static boolean done = false;

	public static void main(String[] args) {

		if (!done) {
			new Thread(new Runnable() {
				public void run() {
					try {
						Thread.sleep(1000000);
					} catch (Exception e) {
						//Ignore
					}
				}
			}).start();

			done = true;
		}

		main(args);
	}
}


2. It is same for second example.


public class JVMCrashTest {

	public static boolean done = false;

	public static void main(String[] args) {

		if (!done) {
			new Thread(new Runnable() {
				public void run() {
					try {
						Thread.sleep(1000000);
					} catch (Exception e) {
						//Ignore
					}
				}
			}).start();

			done = true;
		}

		Integer integers[] = new Integer[Integer.MAX_VALUE];
	}
}

3. And it is again same for third example.


import java.util.*;

public class JVMCrashTest {

	public static boolean done = false;

	public static void main(String[] args) {

		if (!done) {
			new Thread(new Runnable() {
				public void run() {
					try {
						Thread.sleep(1000000);
					} catch (Exception e) {
						//Ignore
					}
				}
			}).start();

			done = true;
		}

		ArrayList list = new ArrayList();
        for (int i = 0; i &lt; Integer.MAX_VALUE; i++) {
            list.add(new Object());
        }
	}
}

However, it seems it is possible to *really* crash the JVM (not just kill the thread executing the code) is mentioned at this post http://stackoverflow.com/questions/65200/how-do-you-crash-a-jvm

So please be considerate to others when they try to correct your inaccurate post and I hope you update the post to rectify this.</description>
		<content:encoded><![CDATA[<p>You are really misleading the terminology of what JVM crash means. JVM crash as everybody understands is when JVM is not able to handle the condition gracefully, kills all threads, and generates the core dump. Any non-native Java code should never crash the JVM (if it did it is always due to JVM bug).</p>
<p>Let&#8217;s take a look at your examples.<br />
1. Modify your first example to create a another thread and notice that JVM doesn&#8217;t die but just kills the main thread. This is not considered a JVM crash but application logic issue.</p>
<p>public class JVMCrashTest {</p>
<p>	public static boolean done = false;</p>
<p>	public static void main(String[] args) {</p>
<p>		if (!done) {<br />
			new Thread(new Runnable() {<br />
				public void run() {<br />
					try {<br />
						Thread.sleep(1000000);<br />
					} catch (Exception e) {<br />
						//Ignore<br />
					}<br />
				}<br />
			}).start();</p>
<p>			done = true;<br />
		}</p>
<p>		main(args);<br />
	}<br />
}</p>
<p>2. It is same for second example.</p>
<p>public class JVMCrashTest {</p>
<p>	public static boolean done = false;</p>
<p>	public static void main(String[] args) {</p>
<p>		if (!done) {<br />
			new Thread(new Runnable() {<br />
				public void run() {<br />
					try {<br />
						Thread.sleep(1000000);<br />
					} catch (Exception e) {<br />
						//Ignore<br />
					}<br />
				}<br />
			}).start();</p>
<p>			done = true;<br />
		}</p>
<p>		Integer integers[] = new Integer[Integer.MAX_VALUE];<br />
	}<br />
}</p>
<p>3. And it is again same for third example.</p>
<p>import java.util.*;</p>
<p>public class JVMCrashTest {</p>
<p>	public static boolean done = false;</p>
<p>	public static void main(String[] args) {</p>
<p>		if (!done) {<br />
			new Thread(new Runnable() {<br />
				public void run() {<br />
					try {<br />
						Thread.sleep(1000000);<br />
					} catch (Exception e) {<br />
						//Ignore<br />
					}<br />
				}<br />
			}).start();</p>
<p>			done = true;<br />
		}</p>
<p>		ArrayList list = new ArrayList();<br />
        for (int i = 0; i &lt; Integer.MAX_VALUE; i++) {<br />
            list.add(new Object());<br />
        }<br />
	}<br />
}</p>
<p>However, it seems it is possible to *really* crash the JVM (not just kill the thread executing the code) is mentioned at this post <a href="http://stackoverflow.com/questions/65200/how-do-you-crash-a-jvm" rel="nofollow">http://stackoverflow.com/questions/65200/how-do-you-crash-a-jvm</a></p>
<p>So please be considerate to others when they try to correct your inaccurate post and I hope you update the post to rectify this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siddique</title>
		<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/comment-page-1/#comment-28</link>
		<dc:creator>Siddique</dc:creator>
		<pubDate>Sat, 22 May 2010 17:26:35 +0000</pubDate>
		<guid isPermaLink="false">http://boxysystems.com/?p=129#comment-28</guid>
		<description>I don&#039;t agree that JVM should die by generating &quot;hs_err_*.log&quot; to be considered a crash. Then, we probably need to rephrase the title to.. &quot;How to crash JVM natively?&quot;.

JVM is a system running native and non-native code. The point is.. it terminates not able to run some code. That&#039;s all we are trying to accomplish. It really doesn&#039;t matter whether we crash it using native or non-native code 

What about performance optimizations in Java, should that be done in native code also in order to be considered &quot;a real  optimization&quot;?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t agree that JVM should die by generating &#8220;hs_err_*.log&#8221; to be considered a crash. Then, we probably need to rephrase the title to.. &#8220;How to crash JVM natively?&#8221;.</p>
<p>JVM is a system running native and non-native code. The point is.. it terminates not able to run some code. That&#8217;s all we are trying to accomplish. It really doesn&#8217;t matter whether we crash it using native or non-native code </p>
<p>What about performance optimizations in Java, should that be done in native code also in order to be considered &#8220;a real  optimization&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention How to crash a JVM easily? &#124; BoxySystems Inc. -- Topsy.com</title>
		<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/comment-page-1/#comment-27</link>
		<dc:creator>Tweets that mention How to crash a JVM easily? &#124; BoxySystems Inc. -- Topsy.com</dc:creator>
		<pubDate>Sat, 22 May 2010 13:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://boxysystems.com/?p=129#comment-27</guid>
		<description>[...] This post was mentioned on Twitter by Lasith Sameera, Ibrahim Saracoglu. Ibrahim Saracoglu said: How to crash a JVM easily? :) http://bit.ly/cRznSw #java [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Lasith Sameera, Ibrahim Saracoglu. Ibrahim Saracoglu said: How to crash a JVM easily? <img src='http://boxysystems.com/myblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <a href="http://bit.ly/cRznSw" rel="nofollow">http://bit.ly/cRznSw</a> #java [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Torgny Andersson</title>
		<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/comment-page-1/#comment-26</link>
		<dc:creator>Torgny Andersson</dc:creator>
		<pubDate>Sat, 22 May 2010 12:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://boxysystems.com/?p=129#comment-26</guid>
		<description>I don&#039;t agree with you that these example &quot;crash&quot; the JVM. The examples throw an exception, that&#039;s the *application* crashing; not the JVM.

To really crash the JVM, you need to dereference a null pointer in C code (called via JNI from the JVM).</description>
		<content:encoded><![CDATA[<p>I don&#8217;t agree with you that these example &#8220;crash&#8221; the JVM. The examples throw an exception, that&#8217;s the *application* crashing; not the JVM.</p>
<p>To really crash the JVM, you need to dereference a null pointer in C code (called via JNI from the JVM).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake</title>
		<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/comment-page-1/#comment-25</link>
		<dc:creator>Jake</dc:creator>
		<pubDate>Sat, 22 May 2010 12:25:42 +0000</pubDate>
		<guid isPermaLink="false">http://boxysystems.com/?p=129#comment-25</guid>
		<description>Another effective technique for crashing a jvm is to run it on linux.</description>
		<content:encoded><![CDATA[<p>Another effective technique for crashing a jvm is to run it on linux.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siddique</title>
		<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/comment-page-1/#comment-24</link>
		<dc:creator>Siddique</dc:creator>
		<pubDate>Fri, 21 May 2010 21:45:54 +0000</pubDate>
		<guid isPermaLink="false">http://boxysystems.com/?p=129#comment-24</guid>
		<description>Crash computing.. Interesting...

I  never heard of that before.

Thanks for posting the link. 
</description>
		<content:encoded><![CDATA[<p>Crash computing.. Interesting&#8230;</p>
<p>I  never heard of that before.</p>
<p>Thanks for posting the link.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siddique</title>
		<link>http://boxysystems.com/index.php/how-to-crash-a-jvm/comment-page-1/#comment-23</link>
		<dc:creator>Siddique</dc:creator>
		<pubDate>Fri, 21 May 2010 21:45:07 +0000</pubDate>
		<guid isPermaLink="false">http://boxysystems.com/?p=129#comment-23</guid>
		<description>Hi Derrick,
Killing/crashing is a debatable term from VM run perspective. You have the right to express your view point.</description>
		<content:encoded><![CDATA[<p>Hi Derrick,<br />
Killing/crashing is a debatable term from VM run perspective. You have the right to express your view point.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

