简体   繁体   English

日志记录中在Eclipse上运行的Tomcat服务器中的死锁

[英]Deadlock in Tomcat server running on Eclipse within Logging

I'm running repeatedly into deadlock issues on Tomcat in Eclipse. 我反复遇到Eclipse中Tomcat上的死锁问题。 I'm calling JAX-RS services from a Chrome browser from a JSP page using JQuery.ajax calls (although I'm not sure the calling mechanism is really an issue other than being multiple async calls occurring simultaneously). 我正在使用JQuery.ajax调用从JSP页面的Chrome浏览器中调用JAX-RS服务(尽管除了同时发生多个异步调用之外,我不确定调用机制确实是一个问题)。 The exception may be dynatree; 可能是动态树。 it seems to have gotten worse after setting up lazy load of a dynatree file tree. 设置dynatree文件树的延迟加载后,情况似乎变得更糟。

When it fails I see multiple ajax calls all pending. 当它失败时,我会看到多个未决的ajax调用。

If I debug in Eclipse, open the server, and pause, I see: 如果我在Eclipse中调试,请打开服务器并暂停,我会看到:

Daemon Thread [http-bio-8080-exec-1] (Suspended)
 owns: WebappClassLoader (id=53)
 waiting for: FileHandler (id=50)
   owned by: Daemon Thread [http-bio-8080-exec-7] (Suspended)
  FileHandler.publish(LogRecord)
  Logger.log(LogRecord)
  Logger.doLog(LogRecord)

Daemon Thread [http-bio-8080-exec-7] (Suspended)
 owns: FileHandler (id=50)
 waiting for: WebappClassLoader (id=53)
   owned by: Daemon Thread [http-bio-8080-exec-1] (Suspended)
  RequestScope$Instance.toString() line: 531
  MessageFormat.subformat(...)
  MessageFormat.format(...)
  ...
  SimpleFormatter...
  FileHandler(StreamHandler).publish(LogRecord)
  FileHandler.publish(LogRecord)
  Logger.log(LogRecord)

So very much seems to be a deadlock, all within logging to some extent or other. 因此,在某种程度上或所有程度的日志记录中,这似乎是一个僵局。 But I've no idea why this occurs or what to do about it. 但是我不知道为什么会这样或怎么做。 Internally I'm just using java.util.logging. 在内部,我只是使用java.util.logging。

Any help or insight would be appreciated. 任何帮助或见解将不胜感激。

Given additional investigation, it appears that this is actually a problem with the Derby database driver, possibly a known bug. 经过进一步调查,看来这实际上是Derby数据库驱动程序存在的问题,可能是已知的错误。 In some cases it hangs trying to create a database statement. 在某些情况下,它挂起尝试创建数据库语句。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM