Java应用程序在Linux上的"java.io.UnixFileSystem.getBooleanAttributes0&"处挂起. [英] Java Application Hang on Linux at "java.io.UnixFileSystem.getBooleanAttributes0"

查看:77
本文介绍了Java应用程序在Linux上的"java.io.UnixFileSystem.getBooleanAttributes0&"处挂起.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的客户应用程序似乎因以下堆栈跟踪而挂起:

Our customers application seems to hang with the following stack trace:

  java.lang.Thread.State: RUNNABLE
    at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
    at java.io.UnixFileSystem.getBooleanAttributes(Unknown Source)
    at java.io.File.isFile(Unknown Source)
    at org.tmatesoft.svn.core.internal.wc.SVNFileType.getType(SVNFileType.java:118)
    at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.createUniqueFile(SVNFileUtil.java:299)
    - locked <0x92ebb2a0> (a java.lang.Class for org.tmatesoft.svn.core.internal.wc.SVNFileUtil)
    at org.tmatesoft.svn.core.internal.wc.SVNRemoteDiffEditor.createTempFile(SVNRemoteDiffEditor.java:415)
    at org.tmatesoft.svn.core.internal.wc.SVNRemoteDiffEditor.applyTextDelta(SVNRemoteDiffEditor.java:255)

有人知道是什么原因导致它挂在isFile中吗?

Anyone know what could cause it to hang in isFile?

推荐答案

getBooleanAttributes0 调用 stat (或 stat64 (如果可用)).如果您具有OpenJDK源代码,则该文件列在文件 jdk/src/solaris/native/java/io/UnixFileSystem_md.c 中.

getBooleanAttributes0 calls stat (or stat64, if available). If you have the OpenJDK source code, this is listed in file jdk/src/solaris/native/java/io/UnixFileSystem_md.c.

真正的问题是,为什么 stat 被冻结?例如,正在访问的文件是否是已宕机的服务器上的网络文件?如果这是可重现的问题,则可能希望在冻结之前使用 strace 附加到Java进程.然后在输出中查找对 stat 的调用,以查看正在访问的内容.

So the real question is, why is stat frozen? Is the file being accessed a network file on a server that's down, for example? If this is a reproducible problem, you may wish to use strace to attach to the Java process, just prior to the freezing. Then look in the output for calls to stat, to see what's being accessed.

这篇关于Java应用程序在Linux上的"java.io.UnixFileSystem.getBooleanAttributes0&"处挂起.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆