简体   繁体   中英

Deadlock in Tomcat server running on Eclipse within Logging

I'm running repeatedly into deadlock issues on Tomcat in Eclipse. 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). The exception may be dynatree; it seems to have gotten worse after setting up lazy load of a dynatree file tree.

When it fails I see multiple ajax calls all pending.

If I debug in Eclipse, open the server, and pause, I see:

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.

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. In some cases it hangs trying to create a database statement.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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