Bug 892251 - [abrt] java-1.7.0-openjdk-devel-1.7.0.9-2.3.3.2.fc17: os::abort: Process /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/bin/java was killed by signal 6 (SIGABRT)
Summary: [abrt] java-1.7.0-openjdk-devel-1.7.0.9-2.3.3.2.fc17: os::abort: Process /usr...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alexander Kurtakov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:9d8e1c1bea6d1319f68175c5ca8...
: 915177 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-06 05:58 UTC by Dan
Modified: 2013-02-28 13:07 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-28 13:07:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: core_backtrace (2.47 KB, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: environ (1.38 KB, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: backtrace (27.30 KB, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: limits (1.29 KB, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: cgroup (129 bytes, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: smolt_data (2.30 KB, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: executable (55 bytes, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: maps (9.07 KB, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: dso_list (1.68 KB, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: proc_pid_status (926 bytes, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: var_log_messages (187 bytes, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
File: open_fds (194 bytes, text/plain)
2013-01-06 05:58 UTC, Dan
no flags Details
JRE error log (17.98 KB, application/octet-stream)
2013-01-23 22:42 UTC, Dan
no flags Details

Description Dan 2013-01-06 05:58:04 UTC
Description of problem:
Tried to run a JUnit 4 test case in eclipse 4.2.1.

Version-Release number of selected component:
java-1.7.0-openjdk-devel-1.7.0.9-2.3.3.2.fc17

Additional info:
libreport version: 2.0.18
abrt_version:   2.0.18
backtrace_rating: 4
cmdline:        /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/bin/java -Dfile.encoding=UTF-8 -Xbootclasspath:/home/dpitic/sdk/android-sdk-linux/platforms/android-4/android.jar -classpath /home/dpitic/prg/android/lib/commons-math3-3-1-api-4/bin/classes:/home/dpitic/sdk/android-sdk-linux/tools/support/annotations.jar:/home/dpitic/prg/android/lib/commons-math3-3-1-api-4/libs/android-support-v4.jar:/opt/eclipse/plugins/org.junit_4.10.0.v4_10_0_v20120426-0900/junit.jar:/opt/eclipse/plugins/org.hamcrest.core_1.1.0.v20090501071000.jar:/home/dpitic/.eclipse/org.eclipse.platform_4.2.0_1473617060/configuration/org.eclipse.osgi/bundles/152/1/.cp/:/home/dpitic/.eclipse/org.eclipse.platform_4.2.0_1473617060/configuration/org.eclipse.osgi/bundles/151/1/.cp/ org.eclipse.jdt.internal.junit.runner.RemoteTestRunner -version 3 -port 52537 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames org.apache.commons.math3.geometry.euclidean.twod.Vector2DTest
crash_function: os::abort
kernel:         3.6.10-2.fc17.x86_64

truncated backtrace:
:Thread no. 1 (10 frames)
: #2 os::abort at /usr/src/debug/java-1.7.0-openjdk/openjdk/hotspot/src/os/linux/vm/os_linux.cpp:1588
: #3 VMError::report_and_die at /usr/src/debug/java-1.7.0-openjdk/openjdk/hotspot/src/share/vm/utilities/vmError.cpp:1018
: #4 report_vm_error at /usr/src/debug/java-1.7.0-openjdk/openjdk/hotspot/src/share/vm/utilities/debug.cpp:220
: #6 report_fatal at /usr/src/debug/java-1.7.0-openjdk/openjdk/hotspot/src/share/vm/utilities/debug.cpp:225
: #7 compute_offset at /usr/src/debug/java-1.7.0-openjdk/openjdk/hotspot/src/share/vm/classfile/javaClasses.cpp:129
: #8 java_lang_String::compute_offsets at /usr/src/debug/java-1.7.0-openjdk/openjdk/hotspot/src/share/vm/classfile/javaClasses.cpp:158
: #9 SystemDictionary::initialize_preloaded_classes at /usr/src/debug/java-1.7.0-openjdk/openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp:1976
: #10 Universe::genesis at /usr/src/debug/java-1.7.0-openjdk/openjdk/hotspot/src/share/vm/memory/universe.cpp:351
: #11 universe2_init at /usr/src/debug/java-1.7.0-openjdk/openjdk/hotspot/src/share/vm/memory/universe.cpp:1006
: #12 init_globals at /usr/src/debug/java-1.7.0-openjdk/openjdk/hotspot/src/share/vm/runtime/init.cpp:113

Comment 1 Dan 2013-01-06 05:58:08 UTC
Created attachment 673244 [details]
File: core_backtrace

Comment 2 Dan 2013-01-06 05:58:11 UTC
Created attachment 673245 [details]
File: environ

Comment 3 Dan 2013-01-06 05:58:13 UTC
Created attachment 673246 [details]
File: backtrace

Comment 4 Dan 2013-01-06 05:58:15 UTC
Created attachment 673247 [details]
File: limits

Comment 5 Dan 2013-01-06 05:58:18 UTC
Created attachment 673248 [details]
File: cgroup

Comment 6 Dan 2013-01-06 05:58:20 UTC
Created attachment 673249 [details]
File: smolt_data

Comment 7 Dan 2013-01-06 05:58:22 UTC
Created attachment 673250 [details]
File: executable

Comment 8 Dan 2013-01-06 05:58:25 UTC
Created attachment 673251 [details]
File: maps

Comment 9 Dan 2013-01-06 05:58:27 UTC
Created attachment 673252 [details]
File: dso_list

Comment 10 Dan 2013-01-06 05:58:29 UTC
Created attachment 673253 [details]
File: proc_pid_status

Comment 11 Dan 2013-01-06 05:58:31 UTC
Created attachment 673254 [details]
File: var_log_messages

Comment 12 Dan 2013-01-06 05:58:33 UTC
Created attachment 673255 [details]
File: open_fds

Comment 13 Deepak Bhole 2013-01-07 19:19:43 UTC
Can you also post /home/dpitic/prg/android/lib/commons-math3-3-1-api-4/hs_err_pid2547.log please?

Comment 14 Dan 2013-01-08 02:51:54 UTC
(In reply to comment #13)
> Can you also post
> /home/dpitic/prg/android/lib/commons-math3-3-1-api-4/hs_err_pid2547.log
> please?

I deleted all of the error log files unfortunately, because I found a workaround.  The error occurred when I tried to run JUnit 4 tests using the Eclipse test runner on code compiled for Android.  This happened when I used the standard Android project configuration in Eclipse.

To fix the problem and be able to successfully run the unit tests, I had to remove the Android library and manually specify it as an external JAR library.

I can easily reproduce a similar error by fixing the Android project properties (which will add back the Android library and make the project a standard Android project) and running the unit tests.

Let me know if you still want it?

Comment 15 Alexander Kurtakov 2013-01-08 12:25:16 UTC
Do you see tests crashing their own jvm or whole eclipse is down?

Comment 16 Dan 2013-01-08 14:38:46 UTC
(In reply to comment #15)
> Do you see tests crashing their own jvm or whole eclipse is down?

Tests just crash their own JVM.  Eclipse keeps running thankfully.

Comment 17 Deepak Bhole 2013-01-23 21:58:39 UTC
Looks like an invalid class is getting pre-loaded into the VM. The function throwing the error has:

  if (!find_field(ik, name_symbol, signature_symbol, &fd, allow_super)) {
    ResourceMark rm;
    tty->print_cr("Invalid layout of %s at %s", ik->external_name(), name_symbol->as_C_string());
    fatal("Invalid layout of preloaded class");
  }


I can see the fatal() message in the backtrace, but the former was likely printed to the terminal somewhere; would it be possible for you to check please?

Comment 18 Dan 2013-01-23 22:39:16 UTC
(In reply to comment #17)
> Looks like an invalid class is getting pre-loaded into the VM. The function
> throwing the error has:
> 
>   if (!find_field(ik, name_symbol, signature_symbol, &fd, allow_super)) {
>     ResourceMark rm;
>     tty->print_cr("Invalid layout of %s at %s", ik->external_name(),
> name_symbol->as_C_string());
>     fatal("Invalid layout of preloaded class");
>   }
> 
> 
> I can see the fatal() message in the backtrace, but the former was likely
> printed to the terminal somewhere; would it be possible for you to check
> please?

The class is java.lang.String.

I have recreated the error and attached the error log file, as you originally requested in comment #13.

Comment 19 Dan 2013-01-23 22:42:39 UTC
Created attachment 686330 [details]
JRE error log

Error log after the problem was replicated.

Comment 20 Deepak Bhole 2013-01-24 15:03:48 UTC
I think this might be a common error. Looking at Google, most suggestions say to try Run As -> Android Application


http://stackoverflow.com/questions/12273118/internal-error-javaclasses-cpp129

http://stackoverflow.com/questions/13030111/fatal-error-invalid-layout-of-java-lang-string-at-value

Comment 21 Dan 2013-01-24 15:41:45 UTC
(In reply to comment #20)
> I think this might be a common error. Looking at Google, most suggestions
> say to try Run As -> Android Application
> 
> 
> http://stackoverflow.com/questions/12273118/internal-error-javaclasses-cpp129
> 
> http://stackoverflow.com/questions/13030111/fatal-error-invalid-layout-of-
> java-lang-string-at-value

I can't test this suggestion because in my case, the JUnit tests are for an Android library project, which cannot be launched as an Android Application.  Besides, I don't understand how running as an Android Application will launch the JUnit tests?

Comment 22 Deepak Bhole 2013-01-24 16:25:51 UTC
Says here that you have to debug as android application:

http://mobile.tutsplus.com/tutorials/android/android-sdk-junit-testing/

I am going to pass this on to the Eclipse component as well as this error is outside the scope of OpenJDK.

Comment 23 Dan 2013-01-24 22:31:26 UTC
(In reply to comment #22)
> Says here that you have to debug as android application:
> 
> http://mobile.tutsplus.com/tutorials/android/android-sdk-junit-testing/
> 
> I am going to pass this on to the Eclipse component as well as this error is
> outside the scope of OpenJDK.

The first bullet point on this link:

http://developer.android.com/tools/testing/testing_android.html

States that:

"Android test suites are based on JUnit. You can use plain JUnit to test a class that doesn't call the Android API, or Android's JUnit extensions to test Android components...."

This is exactly what I am trying to do.

Comment 24 Deepak Bhole 2013-01-28 19:16:21 UTC
Sorry, I am not familiar with Android development so I am not sure what you mean -- are you writing test cases for pure Java code that do not use Android API in anyway (either itself or via dependencies)? If so, why is the project being created as an Android project?

Android classes are somehow ending up on the classpath and the JVM cannot understand them. This is either a problem with the configuration or with the Eclipse plug-in being used. Either way though, there is nothing that can be done in OpenJDK packages to make this work.

Comment 25 Dan 2013-01-28 22:37:35 UTC
(In reply to comment #24)
> Sorry, I am not familiar with Android development so I am not sure what you
> mean -- are you writing test cases for pure Java code that do not use
> Android API in anyway (either itself or via dependencies)? If so, why is the
> project being created as an Android project?
> 
> Android classes are somehow ending up on the classpath and the JVM cannot
> understand them. This is either a problem with the configuration or with the
> Eclipse plug-in being used. Either way though, there is nothing that can be
> done in OpenJDK packages to make this work.

Yes, that's what I'm doing.  My Android application is composed of several Eclipse Android projects, one of which is the main project that launches the application, and the remaining projects are Android library projects.

One of the library projects uses Android API calls.

The remaining two library projects are pure Java source code with no Android API calls.  Both of these projects cause the crashes we've been looking at when I try to run JUnit tests.  As mentioned in comment #14, I can work around this problem.

According to this:

http://developer.android.com/tools/building/index.html

It looks like the Android build process creates normal Java .class files which should work normally with JUnit.  Following this, the .class files are converted to Dalvik byte code, but this and subsequent steps should be of no concern to JUnit.

Comment 26 Deepak Bhole 2013-01-29 22:00:28 UTC
Unfortunately this interaction is not something I am familiar with. 

You might want to bring this up with the developers/forums of ADT, as they may have encountered this sort of issue in the past and may readily have a solution at hand.

Comment 27 Deepak Bhole 2013-02-25 16:15:08 UTC
*** Bug 915177 has been marked as a duplicate of this bug. ***

Comment 28 Alexander Kurtakov 2013-02-28 13:07:23 UTC
I'm closing this one as it's a problem with Android tools which we don't ship in Fedora. If eclipse itself misbehaves please reopen.


Note You need to log in before you can comment on or make changes to this bug.