Bug 82717 - Deadlock when perform server restart
Deadlock when perform server restart
Status: RESOLVED FIXED
Product: serverplugins
Classification: Unclassified
Component: JBoss
5.x
All Linux
: P3 (vote)
: 6.x
Assigned To: Petr Hejl
issues@serverplugins
: RANDOM, THREAD
: 83004 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-15 10:28 UTC by Michal Mocnak
Modified: 2007-09-11 21:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
thread dump (8.66 KB, text/plain)
2006-08-15 10:29 UTC, Michal Mocnak
Details
JBoss server.log file (601.99 KB, text/plain)
2006-08-16 16:41 UTC, _ gsporar
Details
stdout from test run on Ubuntu (13.66 KB, text/plain)
2006-08-21 17:18 UTC, _ gsporar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Mocnak 2006-08-15 10:28:49 UTC
Found in nb55 daily build #200608150000

1. start nb
2. add a jboss4 server
3. start jboss4
4. right click on jboss4 server node and perform action 'Restart'
=> the restart process ends in deadlock -> thread dump is attached
Comment 1 Michal Mocnak 2006-08-15 10:29:57 UTC
Created attachment 32939 [details]
thread dump
Comment 2 Michal Mocnak 2006-08-15 11:00:16 UTC
Downgrade to P3 -> it's random error -> will be resolved soon
Comment 3 Libor Kotouc 2006-08-15 11:48:42 UTC
I cannot reproduce.
I added some additional logging which can be turned on by the
netbeans.serverplugins.jboss4.logging system property.
Comment 4 _ gsporar 2006-08-16 16:40:59 UTC
Over on 82784 Libor said I should add to this IZ.

So here is what I did:

1. On the configuration described in 82784 I edited netbeans.conf and added
-J-Dnetbeans.serverplugins.jboss4.logging to the netbeans_default_options.

2. I then ran the same test as described in 82784.  I got the same results: the
server does not get stopped.  But I don't think I'm seeing a deadlock.  Which
piece is deadlocking?  NB?  Or JBoss?

Server log is attached.

The output on stdout wasn't much:

gs145266@dhcp-uaus09-130-6:~/tools/netbeans/5.5/beta2/bin$ ./netbeans
NNModelBuilder.setBeanProperties: public void
org.netbeans.modules.j2ee.dd.impl.ejb.model_3_0.MessageDrivenBean.setMappedName(java.lang.String)
doesn't exist
NNModelBuilder.setBeanProperties: public void
org.netbeans.modules.j2ee.dd.impl.ejb.model_3_0.MessageDrivenBean.setMappedName(java.lang.String)
doesn't exist
************START thread 40
STARTING message fired
STARTED message fired
Startup thread NOTIFIED


The output in the NB output window is pretty standard stuff:

=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/gs145266/tools/jboss/4.0.4/Patch1

  JAVA: /home/gs145266/tools/jdk/5/jdk1.5.0_06/bin/java

  JAVA_OPTS:  -Dhttp.proxyHost= -Dhttp.proxyPort=
-Dhttp.nonProxyHosts="localhost|127.0.0.1|dhcp-uaus09-130-6|localhost.localdomain"
-Dhttps.proxyHost= -Dhttps.proxyPort= -Dprogram.name=run.sh

  CLASSPATH:
/home/gs145266/tools/jboss/4.0.4/Patch1/bin/run.jar:/home/gs145266/tools/jdk/5/jdk1.5.0_06/lib/tools.jar

=========================================================================

10:22:52,558 INFO  [Server] Starting JBoss (MX MicroKernel)...
10:22:52,562 INFO  [Server] Release ID: JBoss [Zion] 4.0.4.GA (build:
CVSTag=JBoss_4_0_4_GA date=200605151000)
10:22:52,565 INFO  [Server] Home Dir: /home/gs145266/tools/jboss/4.0.4/Patch1
10:22:52,565 INFO  [Server] Home URL: file:/home/gs145266/tools/jboss/4.0.4/Patch1/
10:22:52,567 INFO  [Server] Patch URL: null
10:22:52,567 INFO  [Server] Server Name: default
10:22:52,567 INFO  [Server] Server Home Dir:
/home/gs145266/tools/jboss/4.0.4/Patch1/server/default
10:22:52,568 INFO  [Server] Server Home URL:
file:/home/gs145266/tools/jboss/4.0.4/Patch1/server/default/
10:22:52,568 INFO  [Server] Server Log Dir:
/home/gs145266/tools/jboss/4.0.4/Patch1/server/default/log
10:22:52,568 INFO  [Server] Server Temp Dir:
/home/gs145266/tools/jboss/4.0.4/Patch1/server/default/tmp
10:22:52,569 INFO  [Server] Root Deployment Filename: jboss-service.xml
10:22:53,703 INFO  [ServerInfo] Java version: 1.5.0_06,Sun Microsystems Inc.
10:22:53,704 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM
1.5.0_06-b05,Sun Microsystems Inc.
10:22:53,704 INFO  [ServerInfo] OS-System: Linux 2.6.12-9-386,i386
10:22:55,371 INFO  [Server] Core system initialized
10:22:56,970 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL:
resource:log4j.xml
10:22:58,224 INFO  [SocketServerInvoker] Invoker started for locator:
InvokerLocator [socket://127.0.0.1:3873/]
10:22:58,672 INFO  [AspectDeployer] Deployed AOP:
file:/home/gs145266/tools/jboss/4.0.4/Patch1/server/default/deploy/ejb3-interceptors-aop.xml
10:23:00,434 INFO  [WebService] Using RMI server codebase:
http://dhcp-uaus09-130-6:8083/
10:23:02,160 INFO  [MailService] Mail Service bound to java:/Mail
10:23:02,460 INFO  [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099,
RMI=/0.0.0.0:1098, backlog=50, no client SocketFactory, Server
SocketFactory=class org.jboss.net.sockets.DefaultSocketFactory
10:23:02,481 INFO  [SubscriptionManager] Bound event dispatcher to
java:/EventDispatcher
10:23:02,924 INFO  [Embedded] Catalina naming disabled
10:23:02,971 INFO  [ClusterRuleSetFactory] Unable to find a cluster rule set in
the classpath. Will load the default rule set.
10:23:02,972 INFO  [ClusterRuleSetFactory] Unable to find a cluster rule set in
the classpath. Will load the default rule set.
10:23:03,247 INFO  [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on
http-0.0.0.0-8080
10:23:03,248 INFO  [Catalina] Initialization processed in 276 ms
10:23:03,248 INFO  [StandardService] Starting service jboss.web
10:23:03,258 INFO  [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.17
10:23:03,291 INFO  [StandardHost] XML validation disabled
10:23:03,313 INFO  [Catalina] Server startup in 65 ms
10:23:03,443 INFO  [TomcatDeployer] deploy, ctxPath=/,
warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
10:23:03,720 INFO  [WebappLoader] Dual registration of jndi stream handler:
factory already defined
10:23:04,534 INFO  [TomcatDeployer] deploy, ctxPath=/jbossws,
warUrl=.../tmp/deploy/tmp47505jbossws-exp.war/
10:23:04,872 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
10:23:04,974 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jms/jms-ra.rar
10:23:05,010 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/quartz-ra.rar
10:23:05,021 INFO  [QuartzResourceAdapter] start quartz!!!
10:23:05,334 INFO  [SimpleThreadPool] Job execution threads will use class
loader of thread: main
10:23:05,355 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
10:23:05,357 INFO  [RAMJobStore] RAMJobStore initialized.
10:23:05,357 INFO  [StdSchedulerFactory] Quartz scheduler
'DefaultQuartzScheduler' initialized from default resource file in Quartz
package: 'quartz.properties'
10:23:05,357 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2
10:23:05,357 INFO  [QuartzScheduler] Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED started.
10:23:05,961 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
10:23:06,175 INFO  [A] Bound to JNDI name: queue/A
10:23:06,176 INFO  [B] Bound to JNDI name: queue/B
10:23:06,176 INFO  [C] Bound to JNDI name: queue/C
10:23:06,177 INFO  [D] Bound to JNDI name: queue/D
10:23:06,178 INFO  [ex] Bound to JNDI name: queue/ex
10:23:06,195 INFO  [testTopic] Bound to JNDI name: topic/testTopic
10:23:06,196 INFO  [securedTopic] Bound to JNDI name: topic/securedTopic
10:23:06,197 INFO  [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
10:23:06,199 INFO  [testQueue] Bound to JNDI name: queue/testQueue
10:23:06,220 INFO  [UILServerILService] JBossMQ UIL service available at :
/0.0.0.0:8093
10:23:06,265 INFO  [DLQ] Bound to JNDI name: queue/DLQ
10:23:06,405 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
10:23:06,433 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console,
warUrl=.../deploy/jmx-console.war/
10:23:06,582 INFO  [Http11BaseProtocol] Starting Coyote HTTP/1.1 on
http-0.0.0.0-8080
10:23:06,647 INFO  [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
10:23:06,654 INFO  [JkMain] Jk running ID=0 time=0/21  config=null
10:23:06,667 INFO  [Server] JBoss (MX MicroKernel) [4.0.4.GA (build:
CVSTag=JBoss_4_0_4_GA date=200605151000)] Started in 14s:91ms

 
Comment 5 _ gsporar 2006-08-16 16:41:56 UTC
Created attachment 32998 [details]
JBoss server.log file
Comment 6 Libor Kotouc 2006-08-17 08:28:28 UTC
ok, to clarify this issue a little bit. First, thanks Greg for the participation.
Second, there is no deadlock in fact (AFAIK), the problem is about logging
thread surviving the server stop. 
Third, the lines in the stdout are important, it indicates, how the threads are
running. Here I see that the log writer (thread reading from the server process
and writing its output to the output pane) has been started. The more important
is what would happen if the server has been stopped. If beta2 build is run, the
log writer wouldn't be stopped in that case probably, it was matter of the issue
81951.
I recommend to use current daily build (or release55_beta2_jboss branch build),
not the original beta2 build, to avoid the stopping problems. In fact, there is
probably one minor bug and *this* issue is about that.
I added some stdout logging into the 'stopping' code (the same system property
must be used).
Comment 7 _ gsporar 2006-08-18 23:45:39 UTC
I just tried the daily build of 5.5 from 2006-08-18 and I got basically the same
results: JBoss does not get stopped.

The difference is that now there are lots of these messages on stdout:

STOPPING message fired

and when the IDE finally gave up trying, it displayed an error message dialog
that says:

JBoss Application Server 4 Stop Failed.

Comment 8 Libor Kotouc 2006-08-21 09:19:45 UTC
*** Issue 83004 has been marked as a duplicate of this issue. ***
Comment 9 Libor Kotouc 2006-08-21 09:56:44 UTC
Greg, can you please attach the whole stdout? I am especially interested whether
there were some other messages coming after the 'STOPPING message fired'. Either
*before* the server was stopped or *after* that. Or nothing at all. Thanks
Comment 10 _ gsporar 2006-08-21 17:18:18 UTC
Created attachment 33130 [details]
stdout from test run on Ubuntu
Comment 11 Petr Hejl 2007-09-11 12:56:38 UTC
This issue is quite old. I can't reproduce it. Is there still any reproducible scenarion?

Seems it could be caused by "just" a quite long server stop procedure, not a deadlock.
Comment 12 Petr Hejl 2007-09-11 15:46:30 UTC
Seems to be reproducible (randomly) with JBoss 5 Beta 2, with DEBUG log level for console.
Comment 13 Petr Hejl 2007-09-11 21:46:51 UTC
Fixed. Bad synchronization.
Another reason why issue 114089 could be helpful.

Checking in src/org/netbeans/modules/j2ee/jboss4/ide/JBLogWriter.java;
/cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBLogWriter.java,v  <--  JBLogWriter.java
new revision: 1.9; previous revision: 1.8
done
Checking in src/org/netbeans/modules/j2ee/jboss4/ide/JBStartServer.java;
/cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStartServer.java,v  <--  JBStartServer.java
new revision: 1.38; previous revision: 1.37
done
Checking in src/org/netbeans/modules/j2ee/jboss4/ide/JBStopRunnable.java;
/cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStopRunnable.java,v  <--  JBStopRunnable.java
new revision: 1.5; previous revision: 1.4
done
Checking in src/org/netbeans/modules/j2ee/jboss4/nodes/Util.java;
/cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/nodes/Util.java,v  <--  Util.java
new revision: 1.8; previous revision: 1.7
done
Checking in src/org/netbeans/modules/j2ee/jboss4/nodes/actions/OpenServerLogAction.java;
/cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/nodes/actions/OpenServerLogAction.java,v  <-- 
OpenServerLogAction.java
new revision: 1.3; previous revision: 1.2
done


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo