Bug 47705 - ArithmeticException: / by zero when expiring sessions via manager
Summary: ArithmeticException: / by zero when expiring sessions via manager
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Manager application (show other bugs)
Version: 6.0.18
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-19 00:12 UTC by fitness_mania
Modified: 2009-09-07 07:57 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fitness_mania 2009-08-19 00:12:52 UTC
Received ArithmeticException: / by zero when expiring sessions via Tomcat manager webapp.

This exception was thrown only if session-timeout is set as -1 on webapp web.xml. Moreover, the exception was also thrown regardless of the idle parameter value (/expire?path=/xxx&idle=mm) as long as session-timeout = -1.

Result:
Exception stacktrace:
ERROR: 19/08/2009 00:18:22 [http-80-exec-33] (org.apache.catalina.core.ApplicationContext:669) HTMLManager: ManagerServlet.sessions[/contextpath]
java.lang.ArithmeticException: / by zero
        at org.apache.catalina.manager.ManagerServlet.sessions(ManagerServlet.java:1133)
        at org.apache.catalina.manager.HTMLManagerServlet.sessions(HTMLManagerServlet.java:573)
        at org.apache.catalina.manager.HTMLManagerServlet.expireSessions(HTMLManagerServlet.java:660)
        at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:118)
        at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:157)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:880)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2081)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Comment 1 Tim Funk 2009-08-31 07:20:36 UTC
Fixed in trunk

http://svn.apache.org/viewvc?rev=809603&view=rev
Comment 2 Mark Thomas 2009-09-07 07:57:30 UTC
This has been fixed in 6.0.x and will be included in 6.0.21 onwards.