Bug 963448 - Incorrect exception handling in CoreGroupCommunicationService#handle
Incorrect exception handling in CoreGroupCommunicationService#handle
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Clustering (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity medium
: DR0
: EAP 6.3.0
Assigned To: Paul Ferraro
Jitka Kozana
Russell Dickenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-15 16:03 EDT by dereed
Modified: 2014-06-28 11:31 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, it was found that `CoreGroupCommunicationService#handle` was mishandling exceptions, affecting caller of the class. The class was found to be hiding exceptions and returning `null` values instead. This value could produce unexpected and unintended behaviors in callers. In this release, the null response will be dealt with by the distributed lock manager, however the use of `CommandDispatcher` in future releases of the product will resolve the issue permanently.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-28 11:31:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-1351 Major Closed Incorrect exception handling in CoreGroupCommunicationService#handle 2016-05-05 11:17 EDT

  None (edit)
Description dereed 2013-05-15 16:03:52 EDT
org/jboss/as/clustering/impl/CoreGroupCommunicationService#handle catches and hides any internal exceptions, and just returns null instead.

This breaks callers of CoreGroupCommunicationService when they get a null value where it's not expected (after verifying that the response was not flagged as an exception)

java.lang.NullPointerException
at org.jboss.as.clustering.lock.AbstractClusterLockSupport.lock(AbstractClusterLockSupport.java:157)

It also catches an exception from the called method, and returns it as the return value, instead of just throwing it as an exception so it can be properly returned as an exception inside JGroups' RequestCorrelator.
Comment 2 JBoss JIRA Server 2013-07-25 14:57:22 EDT
Paul Ferraro <paul.ferraro@redhat.com> updated the status of jira WFLY-1351 to Closed
Comment 3 JBoss JIRA Server 2013-07-25 14:57:22 EDT
Paul Ferraro <paul.ferraro@redhat.com> made a comment on jira WFLY-1351

CoreGroupCommunicationService is obsolete.  This issue does not apply to its replacement, CommandDispatcher.
Comment 5 Paul Ferraro 2013-08-29 15:25:55 EDT
Technically, this issue is still relevant to 6.2 and 6.3, as this class will continue to exist.  However, the plan for EAP 6.3 is to drop usage of this object for locking web sessions.
Comment 6 Paul Ferraro 2013-12-12 10:38:16 EST
Rather than change the API (which would be necessary to return the appropriate exception back to the caller), we'll handle the null response in the distributed lock manager.
Comment 7 Paul Ferraro 2014-01-03 17:02:32 EST
https://github.com/jbossas/jboss-eap/pull/750
Comment 8 Richard Janík 2014-02-18 08:55:37 EST
6.3.0.DR0 verified.
Comment 11 sgilda 2014-05-12 14:18:36 EDT
Changed <literal></literal> tags in Doc Text to ticks (`) to fix Bug 1096865
Comment 12 sgilda 2014-05-12 14:28:00 EDT
Changed <literal></literal> tags in Doc Text to ticks (`) to fix Bug 1096865

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