added patch519, jdwpCrash.abrt.patch to fix trasnportation error

This commit is contained in:
Jiri Vanek 2016-05-19 15:37:50 +02:00
parent 2ec1b15ed1
commit 4091ca11f3
2 changed files with 172 additions and 1 deletions

View File

@ -783,7 +783,7 @@ Obsoletes: java-1.7.0-openjdk-accessibility%1
Name: java-%{javaver}-%{origin} Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever} Version: %{javaver}.%{updatever}
Release: 6.%{buildver}%{?dist} Release: 7.%{buildver}%{?dist}
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons, # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
# and this change was brought into RHEL-4. java-1.5.0-ibm packages # and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a # also included the epoch in their virtual provides. This created a
@ -869,6 +869,7 @@ Patch515: pr2127.patch
Patch516: pr2815.patch Patch516: pr2815.patch
Patch517: pr2899.patch Patch517: pr2899.patch
Patch518: httpsFix1329342.patch Patch518: httpsFix1329342.patch
Patch519: jdwpCrash.abrt.patch
# Arch-specific upstreamable patches # Arch-specific upstreamable patches
# PR2415: JVM -Xmx requirement is too high on s390 # PR2415: JVM -Xmx requirement is too high on s390
@ -1261,6 +1262,7 @@ sh %{SOURCE12}
%patch516 %patch516
%patch517 %patch517
%patch518 %patch518
%patch519
%patch400 %patch400
%if %{use_shenandoah_hotspot} == 1 %if %{use_shenandoah_hotspot} == 1
%patch401 %patch401
@ -1853,6 +1855,9 @@ require "copy_jdk_configs.lua"
%endif %endif
%changelog %changelog
* Thu May 19 2016 jvanek <jvanek@redhat.com> - 1:1.8.0.91-7.b14
- added patch519, jdwpCrash.abrt.patch to fix trasnportation error
* Fri May 13 2016 jvanek <jvanek@redhat.com> - 1:1.8.0.91-6.b14 * Fri May 13 2016 jvanek <jvanek@redhat.com> - 1:1.8.0.91-6.b14
- Enable weak reference discovery in ShenandoahMarkCompact. Otherwise we never process any weak references in full-gc. - Enable weak reference discovery in ShenandoahMarkCompact. Otherwise we never process any weak references in full-gc.

166
jdwpCrash.abrt.patch Normal file
View File

@ -0,0 +1,166 @@
# HG changeset patch
# User dsamersoff
# Date 1403087398 25200
# Node ID 7eb9656224049bee9ca32cca8217fb12e8686b76
# Parent 66c61047f119f2919f4087f49189ee7171e7205d
8044762: com/sun/jdi/OptionTest.java test time out
Summary: gdata could be NULL in debugInit_exit
Reviewed-by: dcubed
# HG changeset patch
# User dsamersoff
# Date 1409228402 25200
# Node ID 66199a53c7f9b21032666a7e3655daab408d9881
# Parent 7eb9656224049bee9ca32cca8217fb12e8686b76
8049226: com/sun/jdi/OptionTest.java test times out again
Summary: Don't call jni_FatalError if transport initialization fails
Reviewed-by: sspitsyn, sla
diff -r 66c61047f119 -r 7eb965622404 src/share/back/debugInit.c
--- openjdk/jdk/src/share/back/debugInit.c Mon May 16 09:54:50 2016 +0300
+++ openjdk/jdk/src/share/back/debugInit.c Wed Jun 18 03:29:58 2014 -0700
@@ -1307,22 +1307,26 @@
if ( error != JVMTI_ERROR_NONE ) {
exit_code = 1;
if ( docoredump ) {
+ LOG_MISC(("Dumping core as requested by command line"));
finish_logging(exit_code);
abort();
}
}
+
if ( msg==NULL ) {
msg = "";
}
LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, msg));
- gdata->vmDead = JNI_TRUE;
+ if (gdata != NULL) {
+ gdata->vmDead = JNI_TRUE;
- /* Let's try and cleanup the JVMTI, if we even have one */
- if ( gdata->jvmti != NULL ) {
- /* Dispose of jvmti (gdata->jvmti becomes NULL) */
- disposeEnvironment(gdata->jvmti);
+ /* Let's try and cleanup the JVMTI, if we even have one */
+ if ( gdata->jvmti != NULL ) {
+ /* Dispose of jvmti (gdata->jvmti becomes NULL) */
+ disposeEnvironment(gdata->jvmti);
+ }
}
/* Finish up logging. We reach here if JDWP is doing the exiting. */
diff -r 7eb965622404 -r 66199a53c7f9 src/share/back/debugInit.c
--- openjdk/jdk/src/share/back/debugInit.c Wed Jun 18 03:29:58 2014 -0700
+++ openjdk/jdk/src/share/back/debugInit.c Thu Aug 28 05:20:02 2014 -0700
@@ -1013,7 +1013,7 @@
atexit_finish_logging(void)
{
/* Normal exit(0) (not _exit()) may only reach here */
- finish_logging(0); /* Only first call matters */
+ finish_logging(); /* Only first call matters */
}
static jboolean
@@ -1301,43 +1301,49 @@
void
debugInit_exit(jvmtiError error, const char *msg)
{
- int exit_code = 0;
+ enum exit_codes { EXIT_NO_ERRORS = 0, EXIT_JVMTI_ERROR = 1, EXIT_TRANSPORT_ERROR = 2 };
- /* Pick an error code */
- if ( error != JVMTI_ERROR_NONE ) {
- exit_code = 1;
- if ( docoredump ) {
- LOG_MISC(("Dumping core as requested by command line"));
- finish_logging(exit_code);
- abort();
- }
+ // Prepare to exit. Log error and finish logging
+ LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error,
+ ((msg == NULL) ? "" : msg)));
+
+ // coredump requested by command line. Keep JVMTI data dirty
+ if (error != JVMTI_ERROR_NONE && docoredump) {
+ LOG_MISC(("Dumping core as requested by command line"));
+ finish_logging();
+ abort();
}
- if ( msg==NULL ) {
- msg = "";
- }
+ finish_logging();
- LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, msg));
-
+ // Cleanup the JVMTI if we have one
if (gdata != NULL) {
gdata->vmDead = JNI_TRUE;
-
- /* Let's try and cleanup the JVMTI, if we even have one */
- if ( gdata->jvmti != NULL ) {
- /* Dispose of jvmti (gdata->jvmti becomes NULL) */
+ if (gdata->jvmti != NULL) {
+ // Dispose of jvmti (gdata->jvmti becomes NULL)
disposeEnvironment(gdata->jvmti);
}
}
- /* Finish up logging. We reach here if JDWP is doing the exiting. */
- finish_logging(exit_code); /* Only first call matters */
-
- /* Let's give the JNI a FatalError if non-exit 0, which is historic way */
- if ( exit_code != 0 ) {
- JNIEnv *env = NULL;
- jniFatalError(env, msg, error, exit_code);
+ // We are here with no errors. Kill entire process and exit with zero exit code
+ if (error == JVMTI_ERROR_NONE) {
+ forceExit(EXIT_NO_ERRORS);
+ return;
}
- /* Last chance to die, this kills the entire process. */
- forceExit(exit_code);
+ // No transport initilized.
+ // As we don't have any details here exiting with separate exit code
+ if (error == AGENT_ERROR_TRANSPORT_INIT) {
+ forceExit(EXIT_TRANSPORT_ERROR);
+ return;
+ }
+
+ // We have JVMTI error. Call hotspot jni_FatalError handler
+ jniFatalError(NULL, msg, error, EXIT_JVMTI_ERROR);
+
+ // hotspot calls os:abort() so we should never reach code below,
+ // but guard against possible hotspot changes
+
+ // Last chance to die, this kills the entire process.
+ forceExit(EXIT_JVMTI_ERROR);
}
diff -r 7eb965622404 -r 66199a53c7f9 src/share/back/log_messages.c
--- openjdk/jdk/src/share/back/log_messages.c Wed Jun 18 03:29:58 2014 -0700
+++ openjdk/jdk/src/share/back/log_messages.c Thu Aug 28 05:20:02 2014 -0700
@@ -230,7 +230,7 @@
/* Finish up logging, flush output to the logfile. */
void
-finish_logging(int exit_code)
+finish_logging()
{
#ifdef JDWP_LOGGING
MUTEX_LOCK(my_mutex);
diff -r 7eb965622404 -r 66199a53c7f9 src/share/back/log_messages.h
--- openjdk/jdk/src/share/back/log_messages.h Wed Jun 18 03:29:58 2014 -0700
+++ openjdk/jdk/src/share/back/log_messages.h Thu Aug 28 05:20:02 2014 -0700
@@ -29,7 +29,7 @@
/* LOG: Must be called like: LOG_category(("anything")) or LOG_category((format,args)) */
void setup_logging(const char *, unsigned);
-void finish_logging(int);
+void finish_logging();
#define LOG_NULL ((void)0)