changeset 209:03baa55848c2

Bug 3285: JVM aborted on assert code at MonitorContended JVMTI event Reviewed-by: ykubota https://github.com/HeapStats/heapstats/pull/73
author Yasumasa Suenaga <yasuenag@gmail.com>
date Mon, 16 Jan 2017 23:42:36 +0900
parents 83d42891fa09
children 77b168ba77e3
files ChangeLog agent/heapstats.conf.in agent/src/heapstats-engines/configuration.cpp agent/src/heapstats-engines/logMain.cpp
diffstat 4 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jan 13 21:26:52 2017 +0900
+++ b/ChangeLog	Mon Jan 16 23:42:36 2017 +0900
@@ -1,3 +1,7 @@
+2017-01-16  Yasumasa Suenaga <yasuenag@gmail.com>
+
+	* Bug 3285: JVM aborted on assert code at MonitorContended JVMTI event
+
 2017-01-13  Yasumasa Suenaga <yasuenag@gmail.com>
 
 	* Bug 3248: Log and SnapShot tab should have slide bar for selecting time range
--- a/agent/heapstats.conf.in	Fri Jan 13 21:26:52 2017 +0900
+++ b/agent/heapstats.conf.in	Mon Jan 16 23:42:36 2017 +0900
@@ -18,7 +18,9 @@
 trigger_on_dump=true
 
 # deadlock check
-check_deadlock=true
+# This feature is experimental. It might be a cause of HotSpot internal error
+# when you set this flag to true.
+check_deadlock=false
 
 # Trigger logging setting
 trigger_on_logerror=true
--- a/agent/src/heapstats-engines/configuration.cpp	Fri Jan 13 21:26:52 2017 +0900
+++ b/agent/src/heapstats-engines/configuration.cpp	Mon Jan 16 23:42:36 2017 +0900
@@ -1,7 +1,7 @@
 /*!
  * \file configuration.cpp
  * \brief This file treats HeapStats configuration.
- * Copyright (C) 2014-2016 Yasumasa Suenaga
+ * Copyright (C) 2014-2017 Yasumasa Suenaga
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -94,7 +94,7 @@
                                          &setOnewayBooleanValue);
     triggerOnDump = new TBooleanConfig(this, "trigger_on_dump", true,
                                        &setOnewayBooleanValue);
-    checkDeadlock = new TBooleanConfig(this, "check_deadlock", true,
+    checkDeadlock = new TBooleanConfig(this, "check_deadlock", false,
                                        &setOnewayBooleanValue);
     triggerOnLogError = new TBooleanConfig(this, "trigger_on_logerror", true,
                                            &setOnewayBooleanValue);
@@ -462,7 +462,7 @@
                        triggerOnDump->get() ? "true" : "false");
 
   /* Output status of deadlock check. */
-  logger->printInfoMsg("Deadlock check = %s",
+  logger->printInfoMsg("Deadlock check (experimental feature) = %s",
                        checkDeadlock->get() ? "true" : "false");
 
   /* Output status of logging triggers. */
--- a/agent/src/heapstats-engines/logMain.cpp	Fri Jan 13 21:26:52 2017 +0900
+++ b/agent/src/heapstats-engines/logMain.cpp	Mon Jan 16 23:42:36 2017 +0900
@@ -1,7 +1,7 @@
 /*!
  * \file logmain.cpp
  * \brief This file is used common logging process.
- * Copyright (C) 2011-2016 Nippon Telegraph and Telephone Corporation
+ * Copyright (C) 2011-2017 Nippon Telegraph and Telephone Corporation
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -317,7 +317,7 @@
     flagLogSignal = 0;
     flagAllLogSignal = 0;
 
-    if (conf->TriggerOnLogLock()->get() && !abortionByDeadlock) {
+    if (conf->CheckDeadlock()->get() && !abortionByDeadlock) {
       /* Switch deadlock finder state. */
       if (enable) {
         TDeadlockFinder::getInstance()->start(jvmti, env);