<div dir="ltr">I recreated this problem in RedHat 6.4  installed in a virtual machine where I login as the same user on tty1 and tty2 - the setup for tmp is the same. I also tried with VM running Fedora 19 with 2 terminal windows in the X session. I tried to read files from /tmp/hsperfdata_$username/* from the terminal where I run jstack and I was able to read files (named after java processes pids).<div>

<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 21, 2013 at 2:42 PM, Staffan Larsen <span dir="ltr">&lt;<a href="mailto:staffan.larsen@oracle.com" target="_blank">staffan.larsen@oracle.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It could also be that one of the processes do not have access to /tmp (or that it is mapped differently).<br>
<span class="HOEnZb"><font color="#888888"><br>
/Staffan<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 21 nov 2013, at 14:14, Alan Bateman &lt;<a href="mailto:Alan.Bateman@oracle.com">Alan.Bateman@oracle.com</a>&gt; wrote:<br>
<br>
&gt; On 21/11/2013 13:06, Piotr Bzdyl wrote:<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; I wasn&#39;t sure which OpenJDK mailing list I should choose for my question. As I have issues with jstack SA related group seemed the best place.<br>
&gt;&gt;<br>
&gt;&gt; I have the following issue:<br>
&gt;&gt;<br>
&gt;&gt; On console one (let&#39;s call it pts/1) I start a sample java app (let&#39;s say its pid is 1234). On another console (pts/2) I execute:<br>
&gt;&gt;<br>
&gt;&gt; jstack 1234<br>
&gt;&gt;<br>
&gt;&gt; As a result pts/2 displays:<br>
&gt;&gt; 1234: Unable to open socket file: target process not responding or HotSpot VM not loaded<br>
&gt;&gt; The -F option can be used when the target process is not responding<br>
&gt;&gt;<br>
&gt;&gt; And on pts/1 I see the thread dump printed. I would rather expect that the thread dump will be displayed on pts/2 and nothing will be printed to pts/1. I tried to use different versions of OpenJDK but the result was always the same.<br>


&gt;&gt;<br>
&gt;&gt; Could you provide me any hints what might be wrong?<br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt; Piotr<br>
&gt; Are pts/1 and pts/2 the same user? Alternatively, any special options to the target VM that disables the attach mechanism?<br>
&gt;<br>
&gt; In any case, I suspect the reason that pts/1 is print the stack trace is that the mechanism to start the attach mechanism in the target VM requires signalling the target VM with SIGQUIT, the same signal that is used to get a VM to do a thread dump to its own stdout.<br>


&gt;<br>
&gt; -Alan<br>
<br>
</div></div></blockquote></div><br></div>