jstack - 众所周知的文件不安全 [英] jstack - well-known file is not secure

查看:124
本文介绍了jstack - 众所周知的文件不安全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用32位Oracle Java 1.6.0在x86_64 CentOS 5.7上运行tomcat 5.5。

I am running tomcat 5.5 on x86_64 CentOS 5.7 using 32-bit Oracle Java 1.6.0.

tomcat使用的JVM进程有6421 pid。 Tomcat工作正常。

JVM process used by tomcat has 6421 pid. Tomcat is working fine.

当运行 jstack 时,它失败了:

[root@mybox ~]# jstack 6421
6421: well-known file is not secure

要获得任何合理的输出,我需要使用强制选项:

To get any reasonable output, I need to use force option:

[root@mybox ~]# jstack -F 6421
Attaching to process ID 6421, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 17.0-b16
Deadlock Detection:

No deadlocks found.
(...)

问题是:


  1. 错误消息众所周知的文件不安全是什么意思?

  2. 什么是知名文件?

  3. 为什么/什么时候 jstack 命令不能在没有强制选择?

  1. what does the error message "well-known file is not secure" mean?
  2. what is the "well-known" file?
  3. why/when does the jstack command not work without a force option?

提前致谢。

推荐答案

这可能是由于/ tmp中的文件用于与具有与 jstack 获得的权限不同的权限的进程进行通信。有问题的文件是/ tmp / hsperfdata_ $ USER / $ PID。

This is probably due to the file in /tmp used to communicate with the process having different permissions than the one the jstack gets. The file in question is /tmp/hsperfdata_$USER/$PID.

不知道为什么它适用于-F,因为手册页只是说强制堆栈当'jstack [-l] pid'没有响应时转储。

Don't know why it works with -F as the man page just says "Force a stack dump when 'jstack [-l] pid' does not respond."

这篇关于jstack - 众所周知的文件不安全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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