关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、418799587 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 5755|回复: 2

[环境搭建] jeecg maven 3.7.8 运行一段时间出现死锁问题

[复制链接]
发表于 2018-10-25 20:45:27 | 显示全部楼层 |阅读模式
本帖最后由 gouweicao 于 2018-10-25 20:47 编辑

环境:
JDK8
tomcat7.0.86
jeecg maven 3.7.8

项目运行几天后,通过conslog 监控会出现以下死锁进程:
  1. 名称: http-nio-80-exec-12
  2. 状态: org.apache.log4j.spi.RootLogger@7f26ac14上的BLOCKED, 拥有者: http-nio-80-exec-2
  3. 总阻止数: 1, 总等待数: 0

  4. 堆栈跟踪:
  5. org.apache.log4j.Category.callAppenders(Category.java:205)
  6. org.apache.log4j.Category.forcedLog(Category.java:391)
  7. org.apache.log4j.Category.info(Category.java:666)
  8. com.fenxiao.controller.wechat.WeixinOauth2Controller.goWeixinIndex(WeixinOauth2Controller.java:98)
  9. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  10. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  11. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  12. java.lang.reflect.Method.invoke(Method.java:498)
  13. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
  14. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
  15. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
  16. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:747)
  17. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:676)
  18. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
  19. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
  20. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
  21. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
  22. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
  23. javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
  24. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
  25. javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
  26. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
  27. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  28. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  29. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  30. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  31. com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
  32. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  33. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  34. org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:114)
  35. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  36. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  37. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  38. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  39. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  40. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  41. org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
  42. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  43. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  44. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  45. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
  46. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
  47. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
  48. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
  49. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  50. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
  51. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
  52. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
  53. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
  54. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
  55. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775)
  56. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734)
  57.    - 已锁定 org.apache.tomcat.util.net.NioChannel@78dca81d
  58. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  59. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  60. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  61. java.lang.Thread.run(Thread.java:748)
复制代码
把 logger注释掉,用system.out.println 输出日志,则出现以下死锁
  1. 名称: http-nio-80-exec-2
  2. 状态: java.io.PrintStream@71f2aac3上的BLOCKED, 拥有者: http-nio-80-exec-7
  3. 总阻止数: 2, 总等待数: 701

  4. 堆栈跟踪:
  5. java.io.PrintStream.println(PrintStream.java:806)
  6. org.apache.tomcat.util.log.SystemLogHandler.println(SystemLogHandler.java:264)
  7. com.fenxiao.controller.wechat.WeixinOauth2Controller.weChatOauth2Redirect(WeixinOauth2Controller.java:178)
  8. sun.reflect.GeneratedMethodAccessor430.invoke(Unknown Source)
  9. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  10. java.lang.reflect.Method.invoke(Method.java:498)
  11. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
  12. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
  13. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
  14. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:747)
  15. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:676)
  16. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
  17. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
  18. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
  19. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
  20. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
  21. javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
  22. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
  23. javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
  24. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
  25. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  26. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  27. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  28. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  29. com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
  30. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  31. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  32. org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:114)
  33. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  34. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  35. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  36. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  37. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  38. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  39. org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
  40. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  41. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  42. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  43. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
  44. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
  45. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
  46. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
  47. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  48. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
  49. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
  50. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
  51. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
  52. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
  53. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775)
  54. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734)
  55.    - 已锁定 org.apache.tomcat.util.net.NioChannel@62746cdd
  56. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  57. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  58. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  59. java.lang.Thread.run(Thread.java:748)
复制代码
请问对tomcat 和 jdk 版本有什么要求?在配置tomcat的时候有哪些参考?这种死锁可能是什么原因造成的?谢谢
发表于 2018-10-26 10:03:14 | 显示全部楼层
下载最新版本  3.8   使用  jdk 1.7   再运行试试
 楼主| 发表于 2018-10-29 21:15:40 | 显示全部楼层
fly1206 发表于 2018-10-26 10:03
下载最新版本  3.8   使用  jdk 1.7   再运行试试

jeecg支持1.8吗,谢谢
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表