Eclipse crashes while trying to export application - java

I tried to export my android application and it just crashed with the following code. Tried several times still the error stays glued. Anyway out of this?
Following is the Log:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0x00007fea9e58ee3e, pid=4241, tid=140644277511936
#
# JRE version: OpenJDK Runtime Environment (7.0_55-b14) (build 1.7.0_55-b14)
# Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libc.so.6+0x98e3e] envz_strip+0x61e
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /opt/adt-bundle-linux-x86_64-20140624/eclipse/hs_err_pid4241.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

First right click on the project and refresh it. Then export it using archive file.
I hope this solves your problem.

Related

Java SIGSEGV error when running from docker

I have no experience in Java and I can run my code successfully from the development. But only when I built the project and runs it from docker, I got an error like this.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000000200a6, pid=1, tid=0x00007ff7227f9b10
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.12.0
# Distribution: Custom build (Sat May 4 17:33:35 UTC 2019)
# Problematic frame:
# C 0x00000000000200a6
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /opt/my_project/hs_err_pid1.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https://icedtea.classpath.org/bugzilla
#
I have followed the error message to use ulimit -c unlimited by adding it in the docker command: docker run --ulimit core=-1 --env-file -t my_project but still not helping and got another similar error
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000000200a6, pid=1, tid=0x00007eff79c95b10
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.12.0
# Distribution: Custom build (Sat May 4 17:33:35 UTC 2019)
# Problematic frame:
# C 0x00000000000200a6
#
# Core dump written. Default location: /opt/my_project/core or core.1
#
# An error report file with more information is saved as:
# /opt/my_project/hs_err_pid1.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https://icedtea.classpath.org/bugzilla
#
Here's my Dockerfile
FROM openjdk:8-jre-alpine
ADD ./build/libs/ /opt/my_project
RUN apk update && apk add --no-cache libc6-compat && ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
WORKDIR /opt/my_project
CMD ["java", "-jar", "my_project.jar"]
I have no idea if the error is related to the java environment or the docker or something else. Appreciate the help!
EDIT:
The error occurred when running on this line:
Logging logging = LoggingOptions.newBuilder().setCredentials(googleCredentials).setProjectId(projectId).build().getService();
This is solved by using the debian based image instead of alpine.
Thanks to the folks in the comment section!
Just documenting our own experience here, which corroborates rahmathd's answer.
We were using an alpine-based Amazon Corretto:
FROM amazoncorretto/amazoncorretto:11-alpine-jre
RUN apk --update --no-cache add tzdata && apk add --no-cache libstdc++ && apk add --no-cache libc6-compat && ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
ENV TZ Asia/Tokyo
One of the following two messages accompanied the crash that happened every time when running the app for a couple of seconds.
1)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fbd3196c5d6, pid=1, tid=60
#
# JRE version: OpenJDK Runtime Environment Corretto-11.0.8.10.1 (11.0.8+10) (build 11.0.8+10-LTS)
# Java VM: OpenJDK 64-Bit Server VM Corretto-11.0.8.10.1 (11.0.8+10-LTS, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C [ld-musl-x86_64.so.1+0x235d6] free+0x28
#
# Core dump will be written. Default location: //core
#
# An error report file with more information is saved as:
# //hs_err_pid1.log
[thread 301 also had an error]
[thread 37 also had an error]
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
2)
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Switching to either a Ubuntu and Amazon Linux based Corretto both solved the issue for us as well.

How to Use the Java Compiler Replay File to debug JVM Issues

I have a Java server process that is now intermittently crashing with the following crash report:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f8c169f6df8, pid=33597, tid=140237357057792
#
# JRE version: Java(TM) SE Runtime Environment (8.0_40-b25) (build 1.8.0_40-b25)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x404df8] PhaseChaitin::gather_lrg_masks(bool)+0x208
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# / blah2/hs_err_pid33597.log
#
# Compiler replay data is saved as:
# /blah2/replay_pid33597.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Before I think of effecting any machine configuration changes (such as changing the VM flags passed in or adding additional logging of any kind), I would like to perform as much analysis of whatever diagnostic information is available.
Does the replay_pid file have information that can help me (as an application developer) diagnose this problem or is it for VM crash reporting to Oracle? Are there any tools available that can analyze it (similar to a thread dump analyzer for instance)?
Any help/hints appreciated.
Thanks
AD
Yes, the replay file can help you to reproduce the issue in a controlled manner.
There's an excellent presentation "Analyzing HotSpot Crashes" by Volker Simonis which covers this - here's a direct link to the relevant example in that talk: https://www.youtube.com/watch?v=xC8fEeo7izI&feature=youtu.be&t=1888

Eclipse crashes when it tries to auto-fill option for populating the methods

I am using Eclipse, Juno version. It loads well. But when it tries to use the autofill features for methods pop-down, it crashes. With the following log:
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x00007f66acbd82a1, pid=6895, tid=140080532424448
#
# JRE version: OpenJDK Runtime Environment (7.0_55-b14) (build 1.7.0_55-b14)
# Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libsoup-2.4.so.1+0x6c2a1] soup_session_feature_detach+0x11
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/nithin/hs_err_pid6895.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
Tried the answer by the BugZilla as the log inicated. But still it's the same. Any ideas to resolve this?
I also had this problem. However, thanks to THIS thread, I fixed it by adding -Dorg.eclipse.swt.browser.DefaultType=mozilla to my eclipse.ini file.

Eclipse crash and close every time opened

I faced an fetal error with eclipse ide, when i try to open eclipse load GUI and then close, that occur each time opened eclipse ide.
Error Loading DDMS Preferences
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f5a0c9822a1, pid=4316, tid=140027354994432
#
# JRE version: Java(TM) SE Runtime Environment (7.0_45-b18) (build 1.7.0_45-b18)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libsoup-2.4.so.1+0x6c2a1] soup_session_feature_detach+0x11
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /opt/eclipse/hs_err_pid4316.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug
Work around
change eclipse owwner.
run eclipse as root.
Extract jdk again on /opt.
Made link to jre from /opt to /usr/bin.
But problem still exists, any help will be appreciated.
Based on this my problem had been solved.
For a workaround add the following to the end of your eclipse.ini
-Dorg.eclipse.swt.browser.DefaultType=mozilla
If
-Dorg.eclipse.swt.browser.DefaultType=mozilla
doesn't work and your OS is debian, try solution in this post:
http://forums.debian.net/viewtopic.php?f=8&t=115477

Running java application from android project in eclipse

Is it possible to run a java porgram which does some simple operations like may be just perform addition,subtraction,etc from a android project in eclipse? When I do so, I get the following error.
Invalid layout of java.lang.String at value
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (javaClasses.cpp:136), pid=15848, tid=47842905868608
# fatal error: Invalid layout of preloaded class
#
# JRE version: (7.0_45-b18) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /rhel5pdi/workplace/golchham/android-amazon/src/MAAAndroidSampleAPK/hs_err_pid15848.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
Any help on this ?I found similar errors but all were with some memory related or library issues. I don't find any here.
Thanks in advance.
Add the std JRE to "properties / java build path / libraries"
In the "runconfiguration / classpath" remove Android (leaving only std JRE)
Classfile err
Internal error

Categories

Resources