<< November 2010 | Home | January 2011 >>

Hudson build fails with Maven JVM terminated unexpectedly with exit code 134

We use Hudson as a continuous integration tool for Twitter4J.
I really love the maven oriented and easy to use tool and it makes Twitter4J development much smoother.

But what unfortunate is the error message "ERROR: Maven JVM terminated unexpectedly with exit code 134" which can be seen quite often. This is really annoying because it happens randomly and when it happens, it persists until I restart Hudson.

I consulted the mailing list and knew that exit code 134 indicates that the process crashed with SEGV or something like that.
But somehow I don't couldn't find hs_err_pid[PID].log or core dump on the current directory.
Then I dug an important message from syslog, saying

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


It seems that Apple's JVM stores crash reports under /Library/Logs/DiagnosticReports/ as same as other native OSX apps.
Here's snippet of the crash report:
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff82e7a3d6 __kill + 10
1 libSystem.B.dylib 0x00007fff82f1a972 abort + 83
2 com.apple.LaunchServices 0x00007fff80a31c9c GetOurLSSessionIDInit() + 298
3 libSystem.B.dylib 0x00007fff82e447fa pthread_once + 95
4 com.apple.LaunchServices 0x00007fff80a31b6a GetOurLSSessionAttributeBits() + 23
5 com.apple.LaunchServices 0x00007fff80a31b3b NormalizeLSSessionID(LSSessionID) + 28
6 com.apple.LaunchServices 0x00007fff80a30c10 _LSApplicationCheckIn + 44
7 com.apple.HIServices 0x00007fff85e473ce _RegisterApplication + 1086
8 com.apple.HIServices 0x00007fff85e4e926 SetApplicationIsDaemon + 90
9 libawt.jnilib 0x00000001150a9884 +[AWTStarter startAWT:] + 902
10 libawt.jnilib 0x000000011506d625 -[CPerformer perform] + 93
11 com.apple.Foundation 0x00007fff811f563b __NSThreadPerformPerform + 219
12 com.apple.CoreFoundation 0x00007fff8734be91 __CFRunLoopDoSources0 + 1361
13 com.apple.CoreFoundation 0x00007fff8734a089 __CFRunLoopRun + 873
14 com.apple.CoreFoundation 0x00007fff8734984f CFRunLoopRunSpecific + 575
15 java 0x0000000100004696 0x100000000 + 18070
16 java 0x0000000100003eee 0x100000000 + 16110
17 java 0x00000001000017b4 0x100000000 + 6068

From the stack, I can see that the JVM crashed while initializing AWT and it appears to be a Mac OSX specific issue.

Then I googled with "AWTStarter crashed __NSThreadPerformPerform java com.apple.main-thread GetOurLSSessionIDInit" and found this thread.
Comments about Nasty problem with headless mode in Tomcat 6-0-24
In fact just after receiving this email from you I also got one from
Apple saying that it's a bug and that they're trying to solve it.


The above thread doesn't tell any solution or workaround, but the subject hints that it happens only on headless mode.
So I turned -Djava.awt.headless=false to true and the problem solved, yay!

Things learned from the issue:
- usually exit code 134 is caused by SEGV
- Apple's JVM dumps crash report to /Library/Logs/DiagnosticReports/java_YYYY-MM-DD-******_[hostname].crash
- Apple's JVM dies with code 134 occasionally and it's a known issue
- the issue can be workarounded with -Djava.awt.headless=true (or just without -Djava.awt.headless option)

このエントリーをはてなブックマークに追加   

Twitter4J 2.1.8 released - now supports ALL official APIs

Twitter4J is an open-sourced, mavenized and Google App Engine/Android ready Java library for the Twitter API which is released under the BSD license.

Twitter4J 2.1.8 is now available for download.
This version supports all existing REST APIs, and comes with example codes for all APIs.


This version is also available in the Maven central repository.
http://repo1.maven.org/maven2/org/twitter4j/
You can also use the snapshot repository.
http://twitter4j.org/maven2/org/twitter4j/

Release Notes - Twitter4J - Version 2.1.8

Bug

  • [TFJ-392] - & not escaped properly in JSON results
  • [TFJ-449] - GetSuggestedUserCategories.java fails with ArrayIndexOutOfBoundsException
  • [TFJ-450] - all trends Resources examples scripts point twitter4j.examples.tweets.UpdateStatus
  • [TFJ-455] - createPlace() fails with 404

Improvement

  • [TFJ-403] - include entities is not enabled for some methods
  • [TFJ-447] - getOAuthRequestToekn() should throw IllegalStateException if Access token is already available
  • [TFJ-448] - getRetweetedBy(IDs)(long statusId, Paging paging) is useless as it returns only the first 100 users and no pagination is necessary
  • [TFJ-456] - retry when receiving 503 status code
  • [TFJ-461] - documentation is pointing old OAuth endpoints

New Feature

  • [TFJ-397] - support site streams
  • [TFJ-451] - support /related_results/show
  • [TFJ-457] - support twipplePhoto

Task

  • [TFJ-452] - deprecate updateDeliveryDevice
  • [TFJ-453] - changing email via account/update_profile is no longer supported
  • [TFJ-458] - refactor ImageUpload
  • [TFJ-459] - ImageUpload example
  • [TFJ-460] - remove authentication credentials from the repository
このエントリーをはてなブックマークに追加