Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-03-11 Thread Gary Adams
- *Von:* serviceability-dev im Auftrag von gary.ad...@oracle.com *Gesendet:* Freitag, Februar 15, 2019 12:07 PM *An:* Thomas Stüfe; David Holmes; Chris Plummer *Cc:* OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-19 Thread David Holmes
*Von:* serviceability-dev im Auftrag von gary.ad...@oracle.com *Gesendet:* Freitag, Februar 15, 2019 12:07 PM *An:* Thomas Stüfe; David Holmes; Chris Plummer *Cc:* OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills pro

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-19 Thread Chris Plummer
-- *Von:* serviceability-dev im Auftrag von gary.ad...@oracle.com *Gesendet:* Freitag, Februar 15, 2019 12:07 PM *An:* Thomas St�fe; David Holmes; Chris Plummer *Cc:* OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-19 Thread gary.ad...@oracle.com
ttp://bernd.eckenfels.net ------------ *Von:* Gary Adams *Gesendet:* Freitag, Februar 15, 2019 2:19 PM *An:* gary.ad...@oracle.com *Cc:* Bernd Eckenfels; OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-jav

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread David Holmes
p://bernd.eckenfels.net ------------ *Von:* Gary Adams *Gesendet:* Freitag, Februar 15, 2019 2:19 PM *An:* gary.ad...@oracle.com *Cc:* Bernd Eckenfels; OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-jav

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Chris Plummer
Von: Gary Adams Gesendet: Freitag, Februar 15, 2019 2:19 PM An: gary.ad...@oracle.com Cc: Bernd Eckenfels; OpenJDK Serviceability Betreff: Re: RFR: JDK-8149461: jmap kills process if

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Gary Adams
-- *Von:* Gary Adams *Gesendet:* Freitag, Februar 15, 2019 2:19 PM *An:* gary.ad...@oracle.com *Cc:* Bernd Eckenfels; OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line On a linux system with 1 Java

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Daniel D. Daugherty
d Gruss Bernd -- http://bernd.eckenfels.net *Von:* Gary Adams *Gesendet:* Freitag, Februar 15, 2019 2:19 PM *An:* gary.ad...@oracle.com *Cc:* Bernd Eckenfels; OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills p

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Gary Adams
-dev im Auftrag von gary.ad...@oracle.com *Gesendet:* Freitag, Februar 15, 2019 12:07 PM *An:* Thomas Stüfe; David Holmes; Chris Plummer *Cc:* OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line Let me clarify a few things about

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Daniel D. Daugherty
Freitag, Februar 15, 2019 2:19 PM *An:* gary.ad...@oracle.com *Cc:* Bernd Eckenfels; OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line On a linux system with 1 Java process and 500 non-Java processes, /tmp is not tmpfs mou

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Thomas Stüfe
esendet:* Freitag, Februar 15, 2019 2:19 PM > *An:* gary.ad...@oracle.com > *Cc:* Bernd Eckenfels; OpenJDK Serviceability > *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-java pid is > specified in the command line > > On a linux system with 1 Java process and 500 non-J

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Thomas Stüfe
; function). It’s not the best Situation if your diagnostic attempts are slow >> down in such a situation. >> >> Also in the past not all VMs might be recognized by the list function, a >> more targeted attach could still succeed. Is that addressed since the >> container-PID cha

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Gary Adams
enfels.net *Von:* Gary Adams *Gesendet:* Freitag, Februar 15, 2019 2:19 PM *An:* gary.ad...@oracle.com *Cc:* Bernd Eckenfels; OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line On a linux system with 1 Java process and 50

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread David Holmes
On 15/02/2019 11:28 pm, Gary Adams wrote: On 2/15/19, 8:18 AM, David Holmes wrote: On 15/02/2019 8:04 pm, gary.ad...@oracle.com wrote: Let me clarify a few things about the proposed fix. The VirtualMachine.list() mechanism is based on Java processes that are up and running. During VM startup w

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Bernd Eckenfels
: Freitag, Februar 15, 2019 2:19 PM An: gary.ad...@oracle.com Cc: Bernd Eckenfels; OpenJDK Serviceability Betreff: Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line On a linux system with 1 Java process and 500 non-Java processes, /tmp is not tmpfs mounted, 20 runs

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Gary Adams
On 2/15/19, 8:18 AM, David Holmes wrote: On 15/02/2019 8:04 pm, gary.ad...@oracle.com wrote: Let me clarify a few things about the proposed fix. The VirtualMachine.list() mechanism is based on Java processes that are up and running. During VM startup when agent libraries are loaded, the fact is

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Gary Adams
enJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line Let me clarify a few things about the proposed fix. The VirtualMachine.list() mechanism is based on Java processes that are up and running. During VM startup when agent libraries

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread David Holmes
On 15/02/2019 8:04 pm, gary.ad...@oracle.com wrote: Let me clarify a few things about the proposed fix. The VirtualMachine.list() mechanism is based on Java processes that are up and running. During VM startup when agent libraries are loaded, the fact is recorded in the filesystem that a Java pr

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Gary Adams
/bernd.eckenfels.net *Von:* serviceability-dev im Auftrag von gary.ad...@oracle.com *Gesendet:* Freitag, Februar 15, 2019 12:07 PM *An:* Thomas Stüfe; David Holmes; Chris Plummer *Cc:* OpenJDK Serviceability *Betreff:* Re: RFR: JDK-8149461: jmap kills process if non-java pid is spec

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Bernd Eckenfels
im Auftrag von gary.ad...@oracle.com Gesendet: Freitag, Februar 15, 2019 12:07 PM An: Thomas Stüfe; David Holmes; Chris Plummer Cc: OpenJDK Serviceability Betreff: Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line Let me clarify a few things about the

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread gary.ad...@oracle.com
Let me clarify a few things about the proposed fix. The VirtualMachine.list() mechanism is based on Java processes that are up and running. During VM startup when agent libraries are loaded, the fact is recorded in the filesystem that a Java process is eligible for an attach request. This is a m

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Thomas Stüfe
On Fri, Feb 15, 2019 at 3:26 AM David Holmes wrote: > Gary, > > What is the overhead of doing the validation? How do we list VMs? Do we > need to examine every running process to get the list of VMs? Wouldn't > it be better to check the given process is a VM rather than checking all > potential V

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-14 Thread David Holmes
Gary, What is the overhead of doing the validation? How do we list VMs? Do we need to examine every running process to get the list of VMs? Wouldn't it be better to check the given process is a VM rather than checking all potential VM processes? I think there is an onus of responsibility on

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-14 Thread Chris Plummer
Looks good to me. You could also take on Thomas' suggestion, but I'm not sure if there are any common use cases that it would be protecting us from accidentally killing a process (other than the ones you are already fixing). Chris On 2/14/19 11:12 AM, Gary Adams wrote: The following commands

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-14 Thread Thomas Stüfe
Hi Gary, thanks for taking this on. I have occasionally killed a foreign process with jcmd and it is a bit embarrassing :) I think your patch is okay, but I wonder whether a check directly in libattach would be simpler and cover all uses of the attach framework. Such a test could be e.g. simply

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-14 Thread Gary Adams
The following commands present a similar kill process behavior: jcmd jinfo jmap jstack The following commands do not attach. jstat sun.jvmstat.monitor.MonitorException "not found" jps no pid arguments This update moves the checkJavaPid method into the common/ProcessArgumentsMa

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-14 Thread Chris Plummer
Hi Gary, What about the other tools that attach to a user specified process. Do they also have this issue? thanks, Chris On 2/14/19 8:35 AM, Gary Adams wrote: There is an old reported problem that using jmap on a process that is not running Java could cause the process to terminate. This is

RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-14 Thread Gary Adams
There is an old reported problem that using jmap on a process that is not running Java could cause the process to terminate. This is due to the SIGQUIT used when attaching to the process. It is a fairly simple operation to validate that the pid matches one of the known running Java processes u