<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Samuraism - hudson tag</title>
  <link>http://samuraism.jp/blog/tags/hudson/</link>
  <description></description>
  <language>en</language>
  <copyright>Yusuke Yamamoto</copyright>
  <lastBuildDate>Sat, 07 Apr 2012 17:05:00 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  
  <item>
    <title>Hudson build fails with Maven JVM terminated unexpectedly with exit code 134</title>
    <link>http://samuraism.jp/blog/2010/12/16/hudson_build_fails_with_maven_jvm_terminated_unexpectedly_with_exit_code_134.html</link>
    
      
        <description>
          &lt;p&gt;We use &lt;a href=&#034;http://hudson-ci.org/&#034;&gt;Hudson&lt;/a&gt; as a continuous integration tool for &lt;a href=&#034;http://twitter4j.org/&#034;&gt;Twitter4J&lt;/a&gt;.&lt;br/&gt;I really love the maven oriented and easy to use tool and it makes Twitter4J development much smoother.&lt;br/&gt;&lt;br/&gt;But what unfortunate is the error message &lt;a href=&#034;http://twitter4j.org/hudson/job/T4J/1201/console&#034;&gt;&amp;quot;ERROR: Maven JVM terminated unexpectedly with exit code 134&amp;quot;&lt;/a&gt; which can be seen quite often. This is really annoying because it happens randomly and when it happens, it persists until I restart Hudson.&lt;br/&gt;&lt;br/&gt;I consulted &lt;a href=&#034;https://groups.google.com/group/hudson-ja/browse_thread/thread/4bfb2f6588a7e58b?hl=ja#6b159721308c4a98&#034;&gt;the mailing list&lt;/a&gt; and knew that exit code 134 indicates that the process crashed with SEGV or something like that.&lt;br/&gt;But somehow I don&#039;t couldn&#039;t find hs_err_pid[PID].log or core dump on the current directory.&lt;br/&gt;Then I dug an important message from syslog, saying&lt;br/&gt;&lt;div class=&#034;codeSample&#034;&gt;Nov 25 21:59:17 macmini com.apple.ReportCrash.Root[3736]: 2010-11-25 21:59:17.966 ReportCrash[3736:1407] Saved crash report for java[3732] version 1.0 (1.0) to /Library/Logs/DiagnosticReports/java_2010-11-25-215917_localhost.crash&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;It seems that Apple&#039;s JVM stores crash reports under /Library/Logs/DiagnosticReports/ as same as other native OSX apps.&lt;br/&gt;Here&#039;s snippet of the crash report:&lt;br/&gt;&lt;div class=&#034;codeSample&#034;&gt;Thread 0 Crashed:  Dispatch queue: com.apple.main-thread &lt;br/&gt;0   libSystem.B.dylib                   0x00007fff82e7a3d6 __kill + 10 &lt;br/&gt;1   libSystem.B.dylib                   0x00007fff82f1a972 abort + 83 &lt;br/&gt;2   com.apple.LaunchServices            0x00007fff80a31c9c GetOurLSSessionIDInit() + 298 &lt;br/&gt;3   libSystem.B.dylib                   0x00007fff82e447fa pthread_once + 95 &lt;br/&gt;4   com.apple.LaunchServices            0x00007fff80a31b6a GetOurLSSessionAttributeBits() + 23 &lt;br/&gt;5   com.apple.LaunchServices            0x00007fff80a31b3b NormalizeLSSessionID(LSSessionID) + 28 &lt;br/&gt;6   com.apple.LaunchServices            0x00007fff80a30c10 _LSApplicationCheckIn + 44 &lt;br/&gt;7   com.apple.HIServices                0x00007fff85e473ce _RegisterApplication + 1086 &lt;br/&gt;8   com.apple.HIServices                0x00007fff85e4e926 SetApplicationIsDaemon + 90 &lt;br/&gt;9   libawt.jnilib                       0x00000001150a9884 +[AWTStarter startAWT:] + 902 &lt;br/&gt;10  libawt.jnilib                       0x000000011506d625 -[CPerformer perform] + 93 &lt;br/&gt;11  com.apple.Foundation                0x00007fff811f563b __NSThreadPerformPerform + 219 &lt;br/&gt;12  com.apple.CoreFoundation            0x00007fff8734be91 __CFRunLoopDoSources0 + 1361 &lt;br/&gt;13  com.apple.CoreFoundation            0x00007fff8734a089 __CFRunLoopRun + 873 &lt;br/&gt;14  com.apple.CoreFoundation            0x00007fff8734984f CFRunLoopRunSpecific + 575 &lt;br/&gt;15  java                                0x0000000100004696 0x100000000 + 18070 &lt;br/&gt;16  java                                0x0000000100003eee 0x100000000 + 16110 &lt;br/&gt;17  java                                0x00000001000017b4 0x100000000 + 6068 &lt;/div&gt;&lt;br/&gt;From the stack, I can see that the JVM crashed while initializing AWT and it appears to be a Mac OSX specific issue.&lt;br/&gt;&lt;br/&gt;Then I &lt;a href=&#034;http://www.google.co.jp/search?hl=ja&amp;safe=off&amp;client=safari&amp;rls=en&amp;q=AWTStarter+crashed+__NSThreadPerformPerform+java+com.apple.main-thread+GetOurLSSessionIDInit&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai=&#034;&gt;googled with &amp;quot;AWTStarter crashed __NSThreadPerformPerform java com.apple.main-thread GetOurLSSessionIDInit&amp;quot;&lt;/a&gt; and found this thread.&lt;br/&gt;・&lt;a href=&#034;http://www.techienuggets.com/Comments?tx=115123&#034;&gt;Comments about Nasty problem with headless mode in Tomcat 6-0-24&lt;/a&gt;&lt;br/&gt;&lt;div class=&#034;codeSample&#034;&gt;In fact just after receiving this email from you I also got one from &lt;br/&gt;Apple saying that it&#039;s a bug and that they&#039;re trying to solve it.&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;The above thread doesn&#039;t tell any solution or workaround, but the subject hints that it happens only on headless mode.&lt;br/&gt;So I turned -Djava.awt.headless=false to true and the problem solved, yay!&lt;br/&gt;&lt;br/&gt;Things learned from the issue:&lt;br/&gt;- usually exit code 134 is caused by SEGV &lt;br/&gt;- Apple&#039;s JVM dumps crash report to /Library/Logs/DiagnosticReports/java_YYYY-MM-DD-******_[hostname].crash&lt;br/&gt;- Apple&#039;s JVM dies with code 134 occasionally and it&#039;s a known issue&lt;br/&gt;- the issue can be workarounded with  -Djava.awt.headless=true (or just without -Djava.awt.headless option)&lt;br/&gt;&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://samuraism.jp/blog/2010/12/16/hudson_build_fails_with_maven_jvm_terminated_unexpectedly_with_exit_code_134.html#comments</comments>
    <guid isPermaLink="true">http://samuraism.jp/blog/2010/12/16/hudson_build_fails_with_maven_jvm_terminated_unexpectedly_with_exit_code_134.html</guid>
    <pubDate>Thu, 16 Dec 2010 01:09:00 GMT</pubDate>
  </item>
  
  </channel>
</rss>

