You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matt Sullivan <mj...@hotmail.com> on 2009/06/18 03:37:52 UTC

net stop tomcat6 service hangs on Windows 2008 (64-bit)

I'm seeing a pretty consistent issue when stopping Tomcat6, when running as
a Windows service.

 

Repro:

                From the cmd prompt type

                                net stop tomcat6

 

Results:

The Apache Tomcat service is stopping........

The Apache Tomcat service could not be stopped.

 

Notes:

1.       Platform details:

a.       Windows 2008 Server SP1 (64-bit)

b.      Tomcat 6 build 18 (both with/without the native DLL = same issue)

c.       JRE 1.6.0_12

 

2.       I could find no events nor tomcat/catalina logs with a hint as to
root cause, nor did I bear fruit with a search through the FAQs, Google,
etc.

 

3.       I tried to enable verbose tomcat logging as per
http://tomcat.apache.org/tomcat-6.0-doc/logging.html but when the issue
occurs, the pertinent info isn't as yet written to disk, since it appears
log4j flushes only during the log rollover.

 

4.  The only workaround I have at this point is to kill the tomcat6.exe
process manually.

 

5.  A thread dump is below if that helps.

 

Has anyone seen this before?

 

Thanks,

Matt

 

Java HotSpot(TM) 64-Bit Server VM[nyc-bvtsp-tom:5005] (Suspended) 

      Daemon Thread [http-443-1] (Suspended)    

            Object.wait(long) line: not available [native method] 

            JIoEndpoint$Worker(Object).wait() line: 485     

            JIoEndpoint$Worker.await() line: 416      

            JIoEndpoint$Worker.run() line: 442  

            Thread.run() line: 619  

      Daemon Thread [http-80-1] (Suspended)     

            Object.wait(long) line: not available [native method] 

            JIoEndpoint$Worker(Object).wait() line: 485     

            JIoEndpoint$Worker.await() line: 416      

            JIoEndpoint$Worker.run() line: 442  

            Thread.run() line: 619  

      Daemon Thread [http-443-Acceptor-0] (Suspended) 

            Thread.sleep(long) line: not available [native method]      

            JIoEndpoint$Acceptor.run() line: 302      

            Thread.run() line: 619  

      Daemon Thread [http-80-Acceptor-0] (Suspended)  

            Thread.sleep(long) line: not available [native method]      

            JIoEndpoint$Acceptor.run() line: 302      

            Thread.run() line: 619  

      Daemon System Thread [Attach Listener] (Suspended)    

      Daemon System Thread [Signal Dispatcher] (Suspended)  

      Daemon System Thread [Finalizer] (Suspended)    

            Object.wait(long) line: not available [native method] 

            ReferenceQueue<T>.remove(long) line: 116  

            ReferenceQueue<T>.remove() line: 132      

            Finalizer$FinalizerThread.run() line: 159 

      Daemon System Thread [Reference Handler] (Suspended)  

            Object.wait(long) line: not available [native method] 

            Reference$Lock(Object).wait() line: 485   

            Reference$ReferenceHandler.run() line: 116      

      Thread [main] (Suspended)     


RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

Posted by Martin Gainty <mg...@hotmail.com>.
Hi Matt

what happens if you query the tomcat 6 service
sc query tomcat6

?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> From: mjdsullivan@hotmail.com
> To: users@tomcat.apache.org
> Subject: net stop tomcat6 service hangs on Windows 2008 (64-bit)
> Date: Wed, 17 Jun 2009 21:37:52 -0400
> 
> I'm seeing a pretty consistent issue when stopping Tomcat6, when running as
> a Windows service.
> 
>  
> 
> Repro:
> 
>                 From the cmd prompt type
> 
>                                 net stop tomcat6
> 
>  
> 
> Results:
> 
> The Apache Tomcat service is stopping........
> 
> The Apache Tomcat service could not be stopped.
> 
>  
> 
> Notes:
> 
> 1.       Platform details:
> 
> a.       Windows 2008 Server SP1 (64-bit)
> 
> b.      Tomcat 6 build 18 (both with/without the native DLL = same issue)
> 
> c.       JRE 1.6.0_12
> 
>  
> 
> 2.       I could find no events nor tomcat/catalina logs with a hint as to
> root cause, nor did I bear fruit with a search through the FAQs, Google,
> etc.
> 
>  
> 
> 3.       I tried to enable verbose tomcat logging as per
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html but when the issue
> occurs, the pertinent info isn't as yet written to disk, since it appears
> log4j flushes only during the log rollover.
> 
>  
> 
> 4.  The only workaround I have at this point is to kill the tomcat6.exe
> process manually.
> 
>  
> 
> 5.  A thread dump is below if that helps.
> 
>  
> 
> Has anyone seen this before?
> 
>  
> 
> Thanks,
> 
> Matt
> 
>  
> 
> Java HotSpot(TM) 64-Bit Server VM[nyc-bvtsp-tom:5005] (Suspended) 
> 
>       Daemon Thread [http-443-1] (Suspended)    
> 
>             Object.wait(long) line: not available [native method] 
> 
>             JIoEndpoint$Worker(Object).wait() line: 485     
> 
>             JIoEndpoint$Worker.await() line: 416      
> 
>             JIoEndpoint$Worker.run() line: 442  
> 
>             Thread.run() line: 619  
> 
>       Daemon Thread [http-80-1] (Suspended)     
> 
>             Object.wait(long) line: not available [native method] 
> 
>             JIoEndpoint$Worker(Object).wait() line: 485     
> 
>             JIoEndpoint$Worker.await() line: 416      
> 
>             JIoEndpoint$Worker.run() line: 442  
> 
>             Thread.run() line: 619  
> 
>       Daemon Thread [http-443-Acceptor-0] (Suspended) 
> 
>             Thread.sleep(long) line: not available [native method]      
> 
>             JIoEndpoint$Acceptor.run() line: 302      
> 
>             Thread.run() line: 619  
> 
>       Daemon Thread [http-80-Acceptor-0] (Suspended)  
> 
>             Thread.sleep(long) line: not available [native method]      
> 
>             JIoEndpoint$Acceptor.run() line: 302      
> 
>             Thread.run() line: 619  
> 
>       Daemon System Thread [Attach Listener] (Suspended)    
> 
>       Daemon System Thread [Signal Dispatcher] (Suspended)  
> 
>       Daemon System Thread [Finalizer] (Suspended)    
> 
>             Object.wait(long) line: not available [native method] 
> 
>             ReferenceQueue<T>.remove(long) line: 116  
> 
>             ReferenceQueue<T>.remove() line: 132      
> 
>             Finalizer$FinalizerThread.run() line: 159 
> 
>       Daemon System Thread [Reference Handler] (Suspended)  
> 
>             Object.wait(long) line: not available [native method] 
> 
>             Reference$Lock(Object).wait() line: 485   
> 
>             Reference$ReferenceHandler.run() line: 116      
> 
>       Thread [main] (Suspended)     
> 

_________________________________________________________________
Bing™  brings you maps, menus, and reviews organized in one place.   Try it now.
http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TEXT_MLOGEN_Core_tagline_local_1x1

RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Matt Sullivan [mailto:mjdsullivan@hotmail.com]
> Subject: RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)
> 
> I don't have a shutdown.bat or .cmd anywhere in C:\Program Files\
> Apache Software Foundation.

For reasons never explained, the .bat scripts are not included in the .exe download; they are in the .zip and tarballs.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

Posted by Matt Sullivan <mj...@hotmail.com>.
I don't have a shutdown.bat or .cmd anywhere in C:\Program Files\Apache
Software Foundation.   No indication in logs of an OOM situation.

I'm going to write a small batch file that attempts to stop the service,
sleeps, queries the service state with SC, and if required kills the
process. 

Thanks for all the responses.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: net stop tomcat6 service hangs on Windows 2008 (64-bit)

Posted by Konstantin Kolinko <kn...@gmail.com>.
2009/7/17 Caldarale, Charles R <Ch...@unisys.com>:
>> From: Matt Sullivan [mailto:mjdsullivan@hotmail.com]
>> Subject: RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)
>>
>> Never heard back from anyone, and I'm left assuming this is a bug,
>> albeit a difficult one to isolate.
>
> Refresh our memories - does the hang still occur if you use the shutdown.bat script rather than net stop?
>

Just to share a bit of my experience:
I have seen Tomcat hanging (and unable to respond to shutdown.sh)
after an out-of-memory (PermGen). It was on Solaris.

I have not dug into it yet (as it is not so important for us), but I
can say that there are some places where an OOM is caught and ignored
or wrapped. The one that showed in our logs was Spring Framework's
DispatcherServlet,  but Tomcat itself does the same: merely throwing
an OOM Error results in the usual "HTTP Status 500" error page being
shown.


If you face such a situation, then "simply killing tomcat6.exe process
if net stop fails" would be the only recipe that I know should be
working.

If your case is different, e.g. you failed to stop a Tomcat instance
that was not hung, then maybe some other cause and a suitable
solution/bugfix can be found. E.g. if it is the case of Application
threads that are not terminating, that Charles mentioned in his first
reply. And in my case of OOM, some tuning can lessen the probability
of it.

> I guess we'll stick with the less elegant workaround, simply killing
> tomcat6.exe process if net stop fails, unless anyone can think of something
> else to try.

I have only the thought of obtaining some diagnostics before killing
it, like getting the Java stack (using jstack tool from JDK, or from
the menu shown by  tomcat6w tray icon), or waiting until log4j flushes
the logs.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Matt Sullivan [mailto:mjdsullivan@hotmail.com]
> Subject: RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)
> 
> Never heard back from anyone, and I'm left assuming this is a bug,
> albeit a difficult one to isolate.

Refresh our memories - does the hang still occur if you use the shutdown.bat script rather than net stop?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

Posted by Matt Sullivan <mj...@hotmail.com>.
Never heard back from anyone, and I'm left assuming this is a bug, albeit a
difficult one to isolate.

We did try a less intrusive workaround by using a timeout on the Shutdown
tab in Tomcat properties, to no avail.

I guess we'll stick with the less elegant workaround, simply killing
tomcat6.exe process if net stop fails, unless anyone can think of something
else to try.

-----Original Message-----
From: Matt Sullivan [mailto:mjdsullivan@hotmail.com] 
Sent: Friday, June 19, 2009 5:05 PM
To: 'Tomcat Users List'
Subject: RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

> Ok, rules that out.  Do any of your webapps make use of JNI?  Might want
to use Process Explorer to see what's still going on inside Tomcat.
> 
>  - Chuck

No JNI.

The process dump immediately below shows JVM still loaded, etc.  I then
drill into some of the threads via Process Explorer further down.  Sorry for
length of this post, not sure what would help / not help, but I didn't spot
anything obvious...

1548 tomcat6.exe     
   CWD:     C:\Program Files\Apache Software Foundation\Tomcat 6.0\
   CmdLine: "C:\Program Files\Apache Software Foundation\Tomcat
6.0\bin\tomcat6.exe" //RS//Tomcat6
   VirtualSize:   2079048 KB   PeakVirtualSize:   2088660 KB
   WorkingSetSize:817876 KB   PeakWorkingSetSize:818400 KB
   NumberOfThreads: 34
   4740 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2548 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   1124 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   5936 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6004 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   7148 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   4880 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   7152 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   5764 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2320 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   4820 Win32StartAddr:0x00000000 LastErr:0x00000057 State:Waiting   
   5604 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   5572 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6996 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6992 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6916 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   7004 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   7016 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6900 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   1212 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   4584 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   4764 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2592 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   7144 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   1864 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6692 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2944 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   5588 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   1464 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2604 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6388 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2116 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   1984 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   5716 Win32StartAddr:0x00000000 LastErr:0x00000057 State:Waiting   
        2.0.4.0 shp  0x0000000000400000  C:\Program Files\Apache Software
Foundation\Tomcat 6.0\bin\tomcat6.exe
 6.0.6001.18000 shp  0x00000000773F0000  C:\Windows\system32\ntdll.dll
 6.0.6001.18215 shp  0x00000000771F0000  C:\Windows\system32\kernel32.dll
 6.0.6001.18000 shp  0x0000000077320000  C:\Windows\system32\USER32.dll
 6.0.6001.18159 shp  0x000007FEFF180000  C:\Windows\system32\GDI32.dll
 6.0.6001.22181 shp  0x000007FEFF400000  C:\Windows\system32\ADVAPI32.dll
 6.0.6001.18247 shp  0x000007FEFDF60000  C:\Windows\system32\RPCRT4.dll
 7.0.6001.18000 shp  0x000007FEFE100000  C:\Windows\system32\msvcrt.dll
 6.0.6001.18167 shp  0x000007FEFE520000  C:\Windows\system32\SHELL32.dll
 6.0.6001.18000 shp  0x000007FEFDB40000  C:\Windows\system32\SHLWAPI.dll
 6.0.6001.18000 shp  0x000007FEFDF30000  C:\Windows\system32\IMM32.DLL
 6.0.6001.18000 shp  0x000007FEFF240000  C:\Windows\system32\MSCTF.dll
 6.0.6001.18000 shp  0x000007FEFDC20000  C:\Windows\system32\LPK.DLL
 1.626.6001.18000 s  0x000007FEFE480000  C:\Windows\system32\USP10.dll
 6.10.6001.18000 sh  0x000007FEFC240000
C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6
.0.6001.18000_none_152e7382f3bd50c6\comctl32.dll
      14.0.0.16 shp  0x000000006D890000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\server\jvm.dll
 6.0.6001.18000 shp  0x000007FEFBA30000  C:\Windows\system32\WINMM.dll
 6.0.6001.18000 shp  0x000007FEFF510000  C:\Windows\system32\ole32.dll
 6.0.6001.18000 shp  0x000007FEFE3A0000  C:\Windows\system32\OLEAUT32.dll
     4.2.5406.0 shp  0x000007FEFB920000  C:\Windows\system32\OLEACC.dll
      6.0.140.8 shp  0x000000006D800000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\verify.dll
      6.0.140.8 shp  0x000000006D450000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\java.dll
      6.0.140.8 shp  0x000000006D3B0000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\hpi.dll
 6.0.6001.18000 shp  0x0000000077570000  C:\Windows\system32\PSAPI.DLL
      6.0.140.8 shp  0x000000006D4C0000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\jdwp.dll
      6.0.140.8 shp  0x000000006D6D0000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\npt.dll
      6.0.140.8 shp  0x000000006D850000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\zip.dll
 6.0.6001.18000 shp  0x000007FEFE1A0000  C:\Windows\system32\SETUPAPI.dll
      6.0.140.8 shp  0x000000006D310000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\dt_socket.dll
 6.0.6001.18000 shp  0x000007FEFF1F0000  C:\Windows\system32\WS2_32.dll
 6.0.6001.18000 shp  0x000007FEFF3F0000  C:\Windows\system32\NSI.dll
   4.0.3442.654 shp  0x0000000155600000  C:\Program Files (x86)\Microsoft
Firewall Client 2004\FwcWsp64.dll
 6.0.6001.18000 shp  0x000007FEFCEB0000  C:\Windows\system32\mswsock.dll
 6.0.6001.18000 shp  0x000007FEFCA10000  C:\Windows\system32\wshtcpip.dll
      6.0.140.8 shp  0x000000006D6A0000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\net.dll
 6.0.6001.18000 shp  0x000007FEFD050000  C:\Windows\System32\wship6.dll
 6.0.6001.18000 shp  0x000007FEFD430000  C:\Windows\system32\DNSAPI.dll
 6.0.6001.18000 shp  0x000007FEFBA10000  C:\Windows\System32\winrnr.dll
 6.0.6001.18000 shp  0x000007FEFDBC0000  C:\Windows\system32\WLDAP32.dll
 6.0.6001.18000 shp  0x000007FEFC930000  C:\Windows\system32\NLAapi.dll
 6.0.6001.18000 shp  0x000007FEFD160000  C:\Windows\system32\IPHLPAPI.DLL
 6.0.6001.18000 shp  0x000007FEFD110000  C:\Windows\system32\dhcpcsvc.DLL
 6.0.6001.18215 shp  0x000007FEFD990000  C:\Windows\system32\Secur32.dll
 6.0.6001.18000 shp  0x000007FEFD340000  C:\Windows\system32\WINNSI.DLL
 6.0.6001.18000 shp  0x000007FEFD0E0000  C:\Windows\system32\dhcpcsvc6.DLL
 6.0.6001.18000 shp  0x000007FEFB8C0000  C:\Windows\system32\napinsp.dll
 6.0.6001.18000 shp  0x000007FEFBA20000  C:\Windows\system32\rasadhlp.dll
 6.0.6001.18000 shp  0x000007FEFCC20000  C:\Windows\system32\rsaenh.dll
 6.0.6001.18000 shp  0x000007FEFD9B0000  C:\Windows\system32\USERENV.dll
   2.0.1803.100 shp  0x0000000073CC0000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\sqljdbc_auth.dll
 6.0.6001.18000 shp  0x000007FEFD200000  C:\Windows\system32\CRYPT32.dll
 6.0.6001.18000 shp  0x000007FEFD3F0000  C:\Windows\system32\MSASN1.dll
 6.0.6001.18000 shp  0x000007FEFD070000  C:\Windows\system32\credssp.dll
 6.0.6001.18175 shp  0x000007FEFCC70000  C:\Windows\system32\schannel.dll
 6.0.6001.18157 shp  0x000007FEFD4B0000  C:\Windows\system32\NETAPI32.dll
 6.0.6001.18000 shp  0x000007FEFCF00000  C:\Windows\system32\kerberos.dll
 6.0.6001.18000 shp  0x000007FEFD470000  C:\Windows\system32\cryptdll.dll
 6.0.6001.18000 shp  0x000007FEFD000000  C:\Windows\system32\msv1_0.dll
 6.0.6001.18000 shp  0x000007FEFD3C0000  C:\Windows\system32\ntdsapi.dll


----
All threads are Wait:UserRequest except for the 3 below.  Thread stacks for
each is included via Process Explorer.

TID 7016 in Wait:DelayExecution, stack:
ntoskrnl.exe!ExpInterlockedFlushSList+0x126f
ntoskrnl.exe!KeWaitForMultipleObjects+0xcca
ntoskrnl.exe!KeWaitForMutexObject+0x2da
ntoskrnl.exe!_misaligned_access+0x35
ntoskrnl.exe!MmUnlockPages+0x1160
ntoskrnl.exe!KeWaitForMultipleObjects+0xe61
ntoskrnl.exe!KeWaitForMutexObject+0x2da
ntoskrnl.exe!ProbeForWrite+0x733
ntoskrnl.exe!NtReadFile+0x5ff
ntoskrnl.exe!ZwUnloadKeyEx+0x20d3
ntdll.dll!NtReadFile+0xa
kernel32.dll!ReadFile+0x8a
ADVAPI32.dll!SetServiceStatus+0x436
ADVAPI32.dll!SetServiceStatus+0x1e3
ADVAPI32.dll!I_ScPnPGetServiceName+0x111
tomcat6.exe+0x3a27
tomcat6.exe+0x3c35
tomcat6.exe+0xc311
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x21

TID 6596 in Wait:WrQueue, stack:
ntoskrnl.exe!ExpInterlockedFlushSList+0x126f
ntoskrnl.exe!KeWaitForMultipleObjects+0xcca
ntoskrnl.exe!KeWaitForMutexObject+0x2da
ntoskrnl.exe!_misaligned_access+0x35
ntoskrnl.exe!MmUnlockPages+0x1160
ntoskrnl.exe!KeWaitForMultipleObjects+0xe61
ntoskrnl.exe!KeRemoveQueueEx+0x4fe
ntoskrnl.exe!ObReferenceObjectByHandle+0x3f7
ntoskrnl.exe!FsRtlIncrementCcFastReadWait+0x58d
ntoskrnl.exe!ZwUnloadKeyEx+0x20d3
ntdll.dll!ZwRemoveIoCompletion+0xa
mswsock.dll+0x5a5d
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x21

TID 4740 in Wait:Execute, stack:
ntoskrnl.exe!ExpInterlockedFlushSList+0x126f
ntoskrnl.exe!KeWaitForMultipleObjects+0xcca
ntoskrnl.exe!KeWaitForMutexObject+0x2da
ntoskrnl.exe!_misaligned_access+0x35
ntoskrnl.exe!MmUnlockPages+0x1160
ntoskrnl.exe!KeWaitForMultipleObjects+0xe61
ntoskrnl.exe!KeWaitForMutexObject+0x2da
ntoskrnl.exe!ProbeForWrite+0x733
ntoskrnl.exe!NtReadFile+0x5ff
ntoskrnl.exe!ZwUnloadKeyEx+0x20d3
ntdll.dll!NtReadFile+0xa
kernel32.dll!ReadFile+0x8a
ADVAPI32.dll!SetServiceStatus+0x436
ADVAPI32.dll!SetServiceStatus+0x1e3
ADVAPI32.dll!I_ScPnPGetServiceName+0x111
tomcat6.exe+0x3a27
tomcat6.exe+0x3c35
tomcat6.exe+0xc311
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x21


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

Posted by Matt Sullivan <mj...@hotmail.com>.
> Ok, rules that out.  Do any of your webapps make use of JNI?  Might want
to use Process Explorer to see what's still going on inside Tomcat.
> 
>  - Chuck

No JNI.

The process dump immediately below shows JVM still loaded, etc.  I then
drill into some of the threads via Process Explorer further down.  Sorry for
length of this post, not sure what would help / not help, but I didn't spot
anything obvious...

1548 tomcat6.exe     
   CWD:     C:\Program Files\Apache Software Foundation\Tomcat 6.0\
   CmdLine: "C:\Program Files\Apache Software Foundation\Tomcat
6.0\bin\tomcat6.exe" //RS//Tomcat6
   VirtualSize:   2079048 KB   PeakVirtualSize:   2088660 KB
   WorkingSetSize:817876 KB   PeakWorkingSetSize:818400 KB
   NumberOfThreads: 34
   4740 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2548 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   1124 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   5936 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6004 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   7148 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   4880 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   7152 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   5764 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2320 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   4820 Win32StartAddr:0x00000000 LastErr:0x00000057 State:Waiting   
   5604 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   5572 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6996 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6992 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6916 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   7004 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   7016 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6900 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   1212 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   4584 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   4764 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2592 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   7144 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   1864 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6692 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2944 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   5588 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   1464 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2604 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   6388 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   2116 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   1984 Win32StartAddr:0x00000000 LastErr:0x00000000 State:Waiting   
   5716 Win32StartAddr:0x00000000 LastErr:0x00000057 State:Waiting   
        2.0.4.0 shp  0x0000000000400000  C:\Program Files\Apache Software
Foundation\Tomcat 6.0\bin\tomcat6.exe
 6.0.6001.18000 shp  0x00000000773F0000  C:\Windows\system32\ntdll.dll
 6.0.6001.18215 shp  0x00000000771F0000  C:\Windows\system32\kernel32.dll
 6.0.6001.18000 shp  0x0000000077320000  C:\Windows\system32\USER32.dll
 6.0.6001.18159 shp  0x000007FEFF180000  C:\Windows\system32\GDI32.dll
 6.0.6001.22181 shp  0x000007FEFF400000  C:\Windows\system32\ADVAPI32.dll
 6.0.6001.18247 shp  0x000007FEFDF60000  C:\Windows\system32\RPCRT4.dll
 7.0.6001.18000 shp  0x000007FEFE100000  C:\Windows\system32\msvcrt.dll
 6.0.6001.18167 shp  0x000007FEFE520000  C:\Windows\system32\SHELL32.dll
 6.0.6001.18000 shp  0x000007FEFDB40000  C:\Windows\system32\SHLWAPI.dll
 6.0.6001.18000 shp  0x000007FEFDF30000  C:\Windows\system32\IMM32.DLL
 6.0.6001.18000 shp  0x000007FEFF240000  C:\Windows\system32\MSCTF.dll
 6.0.6001.18000 shp  0x000007FEFDC20000  C:\Windows\system32\LPK.DLL
 1.626.6001.18000 s  0x000007FEFE480000  C:\Windows\system32\USP10.dll
 6.10.6001.18000 sh  0x000007FEFC240000
C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6
.0.6001.18000_none_152e7382f3bd50c6\comctl32.dll
      14.0.0.16 shp  0x000000006D890000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\server\jvm.dll
 6.0.6001.18000 shp  0x000007FEFBA30000  C:\Windows\system32\WINMM.dll
 6.0.6001.18000 shp  0x000007FEFF510000  C:\Windows\system32\ole32.dll
 6.0.6001.18000 shp  0x000007FEFE3A0000  C:\Windows\system32\OLEAUT32.dll
     4.2.5406.0 shp  0x000007FEFB920000  C:\Windows\system32\OLEACC.dll
      6.0.140.8 shp  0x000000006D800000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\verify.dll
      6.0.140.8 shp  0x000000006D450000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\java.dll
      6.0.140.8 shp  0x000000006D3B0000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\hpi.dll
 6.0.6001.18000 shp  0x0000000077570000  C:\Windows\system32\PSAPI.DLL
      6.0.140.8 shp  0x000000006D4C0000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\jdwp.dll
      6.0.140.8 shp  0x000000006D6D0000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\npt.dll
      6.0.140.8 shp  0x000000006D850000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\zip.dll
 6.0.6001.18000 shp  0x000007FEFE1A0000  C:\Windows\system32\SETUPAPI.dll
      6.0.140.8 shp  0x000000006D310000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\dt_socket.dll
 6.0.6001.18000 shp  0x000007FEFF1F0000  C:\Windows\system32\WS2_32.dll
 6.0.6001.18000 shp  0x000007FEFF3F0000  C:\Windows\system32\NSI.dll
   4.0.3442.654 shp  0x0000000155600000  C:\Program Files (x86)\Microsoft
Firewall Client 2004\FwcWsp64.dll
 6.0.6001.18000 shp  0x000007FEFCEB0000  C:\Windows\system32\mswsock.dll
 6.0.6001.18000 shp  0x000007FEFCA10000  C:\Windows\system32\wshtcpip.dll
      6.0.140.8 shp  0x000000006D6A0000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\net.dll
 6.0.6001.18000 shp  0x000007FEFD050000  C:\Windows\System32\wship6.dll
 6.0.6001.18000 shp  0x000007FEFD430000  C:\Windows\system32\DNSAPI.dll
 6.0.6001.18000 shp  0x000007FEFBA10000  C:\Windows\System32\winrnr.dll
 6.0.6001.18000 shp  0x000007FEFDBC0000  C:\Windows\system32\WLDAP32.dll
 6.0.6001.18000 shp  0x000007FEFC930000  C:\Windows\system32\NLAapi.dll
 6.0.6001.18000 shp  0x000007FEFD160000  C:\Windows\system32\IPHLPAPI.DLL
 6.0.6001.18000 shp  0x000007FEFD110000  C:\Windows\system32\dhcpcsvc.DLL
 6.0.6001.18215 shp  0x000007FEFD990000  C:\Windows\system32\Secur32.dll
 6.0.6001.18000 shp  0x000007FEFD340000  C:\Windows\system32\WINNSI.DLL
 6.0.6001.18000 shp  0x000007FEFD0E0000  C:\Windows\system32\dhcpcsvc6.DLL
 6.0.6001.18000 shp  0x000007FEFB8C0000  C:\Windows\system32\napinsp.dll
 6.0.6001.18000 shp  0x000007FEFBA20000  C:\Windows\system32\rasadhlp.dll
 6.0.6001.18000 shp  0x000007FEFCC20000  C:\Windows\system32\rsaenh.dll
 6.0.6001.18000 shp  0x000007FEFD9B0000  C:\Windows\system32\USERENV.dll
   2.0.1803.100 shp  0x0000000073CC0000  C:\Program
Files\Java\jdk1.6.0_14\jre\bin\sqljdbc_auth.dll
 6.0.6001.18000 shp  0x000007FEFD200000  C:\Windows\system32\CRYPT32.dll
 6.0.6001.18000 shp  0x000007FEFD3F0000  C:\Windows\system32\MSASN1.dll
 6.0.6001.18000 shp  0x000007FEFD070000  C:\Windows\system32\credssp.dll
 6.0.6001.18175 shp  0x000007FEFCC70000  C:\Windows\system32\schannel.dll
 6.0.6001.18157 shp  0x000007FEFD4B0000  C:\Windows\system32\NETAPI32.dll
 6.0.6001.18000 shp  0x000007FEFCF00000  C:\Windows\system32\kerberos.dll
 6.0.6001.18000 shp  0x000007FEFD470000  C:\Windows\system32\cryptdll.dll
 6.0.6001.18000 shp  0x000007FEFD000000  C:\Windows\system32\msv1_0.dll
 6.0.6001.18000 shp  0x000007FEFD3C0000  C:\Windows\system32\ntdsapi.dll


----
All threads are Wait:UserRequest except for the 3 below.  Thread stacks for
each is included via Process Explorer.

TID 7016 in Wait:DelayExecution, stack:
ntoskrnl.exe!ExpInterlockedFlushSList+0x126f
ntoskrnl.exe!KeWaitForMultipleObjects+0xcca
ntoskrnl.exe!KeWaitForMutexObject+0x2da
ntoskrnl.exe!_misaligned_access+0x35
ntoskrnl.exe!MmUnlockPages+0x1160
ntoskrnl.exe!KeWaitForMultipleObjects+0xe61
ntoskrnl.exe!KeWaitForMutexObject+0x2da
ntoskrnl.exe!ProbeForWrite+0x733
ntoskrnl.exe!NtReadFile+0x5ff
ntoskrnl.exe!ZwUnloadKeyEx+0x20d3
ntdll.dll!NtReadFile+0xa
kernel32.dll!ReadFile+0x8a
ADVAPI32.dll!SetServiceStatus+0x436
ADVAPI32.dll!SetServiceStatus+0x1e3
ADVAPI32.dll!I_ScPnPGetServiceName+0x111
tomcat6.exe+0x3a27
tomcat6.exe+0x3c35
tomcat6.exe+0xc311
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x21

TID 6596 in Wait:WrQueue, stack:
ntoskrnl.exe!ExpInterlockedFlushSList+0x126f
ntoskrnl.exe!KeWaitForMultipleObjects+0xcca
ntoskrnl.exe!KeWaitForMutexObject+0x2da
ntoskrnl.exe!_misaligned_access+0x35
ntoskrnl.exe!MmUnlockPages+0x1160
ntoskrnl.exe!KeWaitForMultipleObjects+0xe61
ntoskrnl.exe!KeRemoveQueueEx+0x4fe
ntoskrnl.exe!ObReferenceObjectByHandle+0x3f7
ntoskrnl.exe!FsRtlIncrementCcFastReadWait+0x58d
ntoskrnl.exe!ZwUnloadKeyEx+0x20d3
ntdll.dll!ZwRemoveIoCompletion+0xa
mswsock.dll+0x5a5d
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x21

TID 4740 in Wait:Execute, stack:
ntoskrnl.exe!ExpInterlockedFlushSList+0x126f
ntoskrnl.exe!KeWaitForMultipleObjects+0xcca
ntoskrnl.exe!KeWaitForMutexObject+0x2da
ntoskrnl.exe!_misaligned_access+0x35
ntoskrnl.exe!MmUnlockPages+0x1160
ntoskrnl.exe!KeWaitForMultipleObjects+0xe61
ntoskrnl.exe!KeWaitForMutexObject+0x2da
ntoskrnl.exe!ProbeForWrite+0x733
ntoskrnl.exe!NtReadFile+0x5ff
ntoskrnl.exe!ZwUnloadKeyEx+0x20d3
ntdll.dll!NtReadFile+0xa
kernel32.dll!ReadFile+0x8a
ADVAPI32.dll!SetServiceStatus+0x436
ADVAPI32.dll!SetServiceStatus+0x1e3
ADVAPI32.dll!I_ScPnPGetServiceName+0x111
tomcat6.exe+0x3a27
tomcat6.exe+0x3c35
tomcat6.exe+0xc311
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x21


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Matt Sullivan [mailto:mjdsullivan@hotmail.com]
> Subject: RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)
> 
> Charles, indeed the net stop will fail even with latest version
> 1.6.0_14 as Tomcat's JVM.

Ok, rules that out.  Do any of your webapps make use of JNI?  Might want to use Process Explorer to see what's still going on inside Tomcat.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

Posted by Matt Sullivan <mj...@hotmail.com>.
Charles, indeed the net stop will fail even with latest version 1.6.0_14 as
Tomcat's JVM.

To Marty's q. re: sc query, answer:

SERVICE_NAME: tomcat6
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 3  STOP_PENDING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x4
        WAIT_HINT          : 0x0

/Matt


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: net stop tomcat6 service hangs on Windows 2008 (64-bit)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Matt Sullivan [mailto:mjdsullivan@hotmail.com]
> Subject: net stop tomcat6 service hangs on Windows 2008 (64-bit)
> 
> I'm seeing a pretty consistent issue when stopping Tomcat6, when
> running as a Windows service.

The usual cause is extra non-daemon threads started by a webapp that does not properly manage them; any such extra threads will not allow the JVM to terminate.  However, your thread dump does not show any to be present.

> Java HotSpot(TM) 64-Bit Server VM[nyc-bvtsp-tom:5005] (Suspended)
>       Daemon Thread [http-443-1] (Suspended)
>       Daemon Thread [http-80-1] (Suspended)
>       Daemon Thread [http-443-Acceptor-0] (Suspended)
>       Daemon Thread [http-80-Acceptor-0] (Suspended)
>       Daemon System Thread [Attach Listener] (Suspended)
>       Daemon System Thread [Signal Dispatcher] (Suspended)
>       Daemon System Thread [Finalizer] (Suspended)
>       Daemon System Thread [Reference Handler] (Suspended)
>       Thread [main] (Suspended)

Since all threads are suspended, it's looking a bit like a JVM problem.  I've had no problems starting and stopping a Tomcat 6 service on Vista 64 using any of the Services snap-in, tomcat6w executable, or net start/stop, using JDK 6u14; you might try a later JVM.


 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org