jdk1.7 org.springframework.web.util.UriUtils.decode CPU高

  1.7.0_71-b14下,weblogic偶尔会造成服务器CPU 100%,定位到消耗CPU的线程如下:

"[ACTIVE] ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=10 tid=0x00007fb3ec00c000 nid=0x179c runnable [0x00007fb434f6c000]

   java.lang.Thread.State: RUNNABLE
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:92)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:122)
- locked <0x00000006daf94860> (a java.io.ByteArrayOutputStream)
at org.springframework.web.util.UriUtils.decode(UriUtils.java:376)
at org.springframework.web.util.UrlPathHelper.decodeInternal(UrlPathHelper.java:406)
at org.springframework.web.util.UrlPathHelper.decodeRequestString(UrlPathHelper.java:397)
at org.springframework.web.util.UrlPathHelper.decodeAndCleanUriString(UrlPathHelper.java:379)
at org.springframework.web.util.UrlPathHelper.getRequestUri(UrlPathHelper.java:266)
at org.springframework.web.util.UrlPathHelper.getPathWithinApplication(UrlPathHelper.java:200)
at org.springframework.web.util.UrlPathHelper.getLookupPathForRequest(UrlPathHelper.java:159)
at org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getMatchingCondition(PatternsRequestCondition.java:212)
at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.handleNoMatch(RequestMappingInfoHandlerMapping.java:166)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.lookupHandlerMethod(AbstractHandlerMethodMapping.java:283)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:223)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:56)
at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:298)
at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1091)
at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1076)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:896)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3354)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2238)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2154)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2132)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:312)

at weblogic.work.ExecuteThread.run(ExecuteThread.java:264)

查询metlink说是一个bug:

CAUSE:The issue is known Java defect discussed in https://bugs.openjdk.java.net/browse/JDK-800695

SOLUTION:Upgrade to the latest Java 7 update available. Fix is included in JDK 1.7.0_121+. 

当然最好升级到1.7最后一个小版本

Possible workaround detailed in Doc ID 2235559.1

你可能感兴趣的:(j2ee)