Problem in shutdown of JBoss AS 'all' config
brian.stansberry Feb 6, 2008 1:29 AMThere's a problem in the JBM shutdown in the AS 'all' config.
Basically, the shutdown calls *synchronized* MessagingPostOffice.stop(). That calls channel.close(), which results in a callback from a JGroups thread on the viewAccepted() callback. That tries to call into *synchronized* MessagingPostOffice.calculateFailoverMap().
This basically "deadlocks" until the shutdown thread times out waiting for the view dissemination process to complete:
2008-02-05 11:49:30,201 WARN [org.jgroups.mux.Multiplexer] failed to collect all service ACKs (1) for [dst: , src: 10.18.86.175:39649 (4 headers), size=0 bytes] after 2000ms, missing ACKs from [10.18.86.175:39649] (received=[]), local_addr=10.18.86.175:39649
At that point the shutdown thread is free to continue executing stop(), and ends up setting MessagingPostOffice.failoverMap to null. It then returns from stop(), freeing the JGroups thread to enter calculateFailoverMap(). NPE due to failoverMap being null:
2008-02-05 11:49:41,515 ERROR [org.jboss.messaging.core.impl.postoffice.GroupMember] Caught Exception in MembershipListener
java.lang.NullPointerException
at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.calculateFailoverMap(MessagingPostOffice.java:1939)
at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.nodesLeft(MessagingPostOffice.java:899)
at org.jboss.messaging.core.impl.postoffice.GroupMember$ControlMembershipListener.viewAccepted(GroupMember.java:498)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:704)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:747)
at org.jgroups.JChannel.up(JChannel.java:1151)
at org.jgroups.mux.Multiplexer.passToMuxChannel(Multiplexer.java:990)
at org.jgroups.mux.Multiplexer.handleServiceDown(Multiplexer.java:783)
at org.jgroups.mux.Multiplexer.handleServiceMessage(Multiplexer.java:715)
at org.jgroups.mux.Multiplexer.up(Multiplexer.java:267)
at org.jgroups.JChannel.up(JChannel.java:1151)
Bela/Vladimir, I thought you'd fixed things so a MuxChannel user wouldn't get a viewAccepted() callback when closing its channel. You don't get one when closing a regular JChannel. Perhaps my memory is faulty.