Hanging threads in ejb-client when remote ejb client repeatedly throws exceptions in JBoss EAP 6

Solution Unverified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.4

Issue

  • Repeatedly throwing an Exception (in an ejb) which is missing from the client classpath will eventually cause client threads to deadlock if the Exceptions contains a sufficiently large message.
    This bug is reproduced in EAP 6.0.1 / 6.1.1 / 6.2.0 / 6.3.0/6.4
  • One the same client, issues with two EJB calls that returns an Externalizable object in different threads.
    If one throws an IOException in the writeExternal method (on the JBoss server), the ObjectOutput from the other EJB call is closed so on that call, we get “Stream is closed”.
    Expect that the EJB call which throws the IOException should fail but the other one should not.
    • Test Case
      1. Preparing an EJB with a method call which returns an Externalizable object.
      2. On the client starts two separate threads calling the same EJB method. One will returns a valid externalizable object and the other returns a bad one resulting an IOException to be thrown.
      3. Control the order so the IOException is thrown first.
      4. Now return the valid externalizable object which should return successfully but we get a Stream is closed exception.

Resolution

Apply JBoss EAP 6.4 Cumulative Patch (CP) 6 or later

Root Cause

This content is not included.BZ-1276513 - EJB Server side is needlessly closing remoting channel

Components
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.