You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2020/05/19 15:47:06 UTC

[geode] 01/01: GEODE-8131: reader thread blocked attempting to issue an alert

This is an automated email from the ASF dual-hosted git repository.

bschuchardt pushed a commit to branch feature/GEODE-8131
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 3db5a4ca5c8086567fb3f63ba873b53eec375eb6
Author: Bruce Schuchardt <bs...@pivotal.io>
AuthorDate: Tue May 19 08:43:02 2020 -0700

    GEODE-8131: reader thread blocked attempting to issue an alert
    
    This PR does not solve the problem of the alert system causing a P2P
    message reader to block but instead ensures that the reader thread will
    write deserialization information to the log before issuing a fatal
    alert.  If the alert level is set to "info" this won't help, but no-one
    would set the alert level to that level.
    
    Along the way I removed some duplicate strings.
---
 .../main/java/org/apache/geode/internal/tcp/Connection.java  | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java b/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
index 83922cb..22a6719 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
@@ -3027,13 +3027,17 @@ public class Connection implements Runnable {
         failureMsg = "ClassNotFound deserializing message";
         failureEx = ex;
         rpId = md.getRPid();
-        logger.fatal("ClassNotFound deserializing message: {}", ex.toString());
+        // log at info level first in case fatal-level alert notification becomes blocked
+        logger.info(failureMsg, failureEx);
+        logger.fatal(failureMsg, failureEx.toString());
       } catch (IOException ex) {
         owner.getConduit().getStats().decMessagesBeingReceived(md.size());
         failureMsg = "IOException deserializing message";
         failureEx = ex;
         rpId = md.getRPid();
-        logger.fatal("IOException deserializing message", failureEx);
+        // log at info level first in case fatal-level alert notification becomes blocked
+        logger.info(failureMsg, failureEx);
+        logger.fatal(failureMsg, failureEx);
       } catch (InterruptedException ex) {
         interrupted = true;
         owner.getConduit().getCancelCriterion().checkCancelInProgress(ex);
@@ -3054,7 +3058,9 @@ public class Connection implements Runnable {
         failureMsg = "Unexpected failure deserializing message";
         failureEx = ex;
         rpId = md.getRPid();
-        logger.fatal("Unexpected failure deserializing message", failureEx);
+        // log at info level first in case fatal-level alert notification becomes blocked
+        logger.info(failureMsg, failureEx);
+        logger.fatal(failureMsg, failureEx);
       } finally {
         msgLength = md.size();
         releaseMsgDestreamer(messageId, md);