Re: jstack and the target output

2013-11-22 Thread Piotr Bzdyl
Thank you Mikael. Now with the is_init_trigger() code I understand that it wasn't the problem with file mask but rather with the file owner (lines 504-507 from http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/file/tip/src/os/linux/vm/attachListener_linux.cpp ). What helped was specyfing uid i gi

Re: jstack and the target output

2013-11-22 Thread Mikael Gerdin
On Friday 22 November 2013 12.59.42 Piotr Bzdyl wrote: > After checking the strace output I notice that the issue was caused by the > file mode for files created on vboxsf mount. By default (when automount > option is used in virtualbox configuration) it creates .attach_pid > with file mode 0770. W

Re: jstack and the target output

2013-11-22 Thread Piotr Bzdyl
After checking the strace output I notice that the issue was caused by the file mode for files created on vboxsf mount. By default (when automount option is used in virtualbox configuration) it creates .attach_pid with file mode 0770. When I manually mounted shared folder specifying fmode=660 jstac

Re: jstack and the target output

2013-11-22 Thread Piotr Bzdyl
Thank you Mikael for the detailed information - I learned a lot about how SA tools attache to the target process. When I was running the test you suggested I noticed one "detail" in my setup which turned out to be the cause of my problems: as I mentioned previously I was running my tests inside a

Re: jstack and the target output

2013-11-22 Thread Mikael Gerdin
Piotr, On Friday 22 November 2013 09.21.56 Piotr Bzdyl wrote: > Is there any other information I could collect to help troubleshoot this > problem? How could I check if VM runs with attach disabled? The comments in http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/tip/src/solaris/classes/sun/tools/a

Re: jstack and the target output

2013-11-22 Thread Piotr Bzdyl
Is there any other information I could collect to help troubleshoot this problem? How could I check if VM runs with attach disabled? I noticed the same behavior when trying to connect to the process using JConsole: JConsole displays the sample app in the list and when I try to connect it finally d

Re: jstack and the target output

2013-11-21 Thread Piotr Bzdyl
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 te

Re: jstack and the target output

2013-11-21 Thread Staffan Larsen
It could also be that one of the processes do not have access to /tmp (or that it is mapped differently). /Staffan On 21 nov 2013, at 14:14, Alan Bateman wrote: > On 21/11/2013 13:06, Piotr Bzdyl wrote: >> Hello, >> >> I wasn't sure which OpenJDK mailing list I should choose for my question.

Re: jstack and the target output

2013-11-21 Thread David Holmes
On 21/11/2013 11:47 PM, Piotr Bzdyl wrote: 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

Re: jstack and the target output

2013-11-21 Thread Piotr Bzdyl
Both (java and jstack) are started using the same user. It happens on some systems and if it happens it does with all java versions I checked (java 7 & java 8). On systems where ptrace_scope is available it is set to 0. Best regards, Piotr On Thu, Nov 21, 2013 at 2:14 PM, Alan Bateman wrote: >

Re: jstack and the target output

2013-11-21 Thread Alan Bateman
On 21/11/2013 13:06, Piotr Bzdyl wrote: Hello, I wasn'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. I have the following issue: On console one (let's call it pts/1) I start a sample java app (let's sa

Re: jstack and the target output

2013-11-21 Thread Alan Bateman
On 21/11/2013 14:47, David Holmes wrote: I can recreate this using the minimal VM, which doesn't support libattach. So it definitely seems like something is going wrong in the attach process, but I can't say what. Not sure what debugging hooks we have for the attach mechanism ?? The first att