Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-254

SSL socket leak

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 3.3.1.Final
    • ssl/tls
    • None
    • Hide

      Make remote EJB calls to WildFly 9.0.1 over SSL.
      Note that not all connections cause a socket leak.

      Show
      Make remote EJB calls to WildFly 9.0.1 over SSL. Note that not all connections cause a socket leak.

      SSL connections can cause socket leaks.

      I can not say for sure if this is a bug in XNIO ssl code or the code that uses XNIO (JBoss Remoting, in this case). Looking at XNIO code it certianly seems like XNIO is the cause, but then again, looking at the code it is hard to understand why only some connections leak and not all.

      In more detail:
      It is possible that JsseSslStreamSinkConduit.terminateWrites does not call super.terminateWrites, if for some reason flush() returns false.

      And it is certain taht JsseSslStreamSourceConduit.terminateReads never calls super.terminateReads when tls is set, because it does not even try to.

      Attached is a patch that fixed socket leaks for me.

        1. xnio.2.patch
          2 kB
        2. xnio.patch
          1 kB

            Unassigned Unassigned
            armihu Arto Huusko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: