Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-31897

(8.1.x) Sometimes WildFly server hangs indefinitely during shutdown due to NettyAcceptor waiting without timeout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 8.1 Update 3
    • ActiveMQ, JMS
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      WildFly server sometimes does not shutdown itself and hangs during clean shutdown. Thread dump analysis reveals that the server hangs indefinitely when trying to close Netty channel groups in the ActiveMQ Artemis NettyAcceptor component.

      Environment:

      • WildFly 39.0.0.Final
      • ActiveMQ Artemis version: 2.44.0

      Steps to Reproduce:
      1. Start WildFly server with messaging subsystem enabled
      2. Establish client connections to ActiveMQ Artemis
      3. Initiate server shutdown
      4. Observe that server hangs and never completes shutdown

      Actual Result:
      Server hangs indefinitely during shutdown. Thread dump shows:

        Thread: "ServerService Thread Pool -- 111" (#327)
        State: WAITING (on object monitor)
        Stack trace:
          at io.netty.util.concurrent.DefaultPromise.awaitUninterruptibly(DefaultPromise.java:290)
            - locked <0x00000000dbd095a8> (a io.netty.channel.group.DefaultChannelGroupFuture)
          at io.netty.channel.group.DefaultChannelGroupFuture.awaitUninterruptibly(DefaultChannelGroupFuture.java:178)
          at org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptor.asyncStop(NettyAcceptor.java:793)
        

      The code at NettyAcceptor.java:793 calls channelGroup.close().awaitUninterruptibly() without a timeout parameter, causing indefinite hang when channels fail to close properly. This problem is very rare and there is no good reproducer

       

      Expected Result:

      Server should complete shutdown within a reasonable timeout period (e.g., 3-5 seconds), forcefully closing any remaining connections if necessary.

      Attachments:

      • node-1-thread-dump-before-kill-shutdown-sequence.txt
      • node-1-thread-dump-when-killed-shutdown-sequence.txt

              ehugonne1@redhat.com Emmanuel Hugonnet
              mnovak1@redhat.com Miroslav Novak
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: