RE: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-08-17 Thread Chris Plummer
Hi TJ, JDK-8179498 is assigned to me. I've been playing around with your changes to make sure they work fine, and plan on sponsoring the commit. I did run into one issue. It ended up being user error, but highlights a gap in the jcmd docker support. More specifically, "jcmd -l" and "jcmd "

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-08-09 Thread Bernd Eckenfels
Hello, Just wanted to come back to this: I noticed that with systemd on Linux there is a recommended option for longrunning daemons cause PrivateTmp*. This will make the systemd manager generate a new mount namespace for this new service process and bind-mount /tmp to an isolated subdirectory

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-05-03 Thread TJ Fontaine
On Tue, May 02, 2017 at 02:16:09PM +1000, David Holmes wrote: > Hi TJ, > > On 1/05/2017 10:22 AM, TJ Fontaine wrote: > > Hey, > > > > I’ve attached a version rebased on jdk10, it also (currently) applies > > cleanly to jdk9. > > I have filed: > >

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-05-03 Thread TJ Fontaine
On Wed, May 03, 2017 at 03:14:29PM +0200, Erik Gahlin wrote: > I noticed thatgetNamespacePid throws IOException and InvalidPathException. > Perhaps we want to catch those, so we can default to the original pid if > there is a I/O related problem. That seems reasonable, I'll add that. > > Erik >

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-05-03 Thread Erik Gahlin
I noticed thatgetNamespacePid throws IOException and InvalidPathException. Perhaps we want to catch those, so we can default to the original pid if there is a I/O related problem. Erik Hey, I’ve attached a version rebased on jdk10, it also (currently) applies cleanly to jdk9. While there

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-05-03 Thread serguei.spit...@oracle.com
Hi TJ, The fix looks good to me, modulo the suggestion from David about the comment at L345. However, I'm not an expert in the namespaces area. It'd be nice to hear from other people. This has to be tested at least when the namespaces are not present. Testing should include the J*tools (jcmd,

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-05-02 Thread Erik Gahlin
I am not a (R)eviewer, so I can't give it my blessings, but I can sponsor it. I will create a webrev so it easier to review. Erik I have attached a patch that allows jcmd to work against a java process running inside a Docker container. Apologies if this is not in the correct format. It was

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-05-01 Thread David Holmes
Hi TJ, On 1/05/2017 10:22 AM, TJ Fontaine wrote: Hey, I’ve attached a version rebased on jdk10, it also (currently) applies cleanly to jdk9. I have filed: https://bugs.openjdk.java.net/browse/JDK-8179498 and have hosted your patch at: http://cr.openjdk.java.net/~dholmes/8179498/webrev/

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-04-30 Thread TJ Fontaine
Hey, I’ve attached a version rebased on jdk10, it also (currently) applies cleanly to jdk9. While there is no supplied test or harness for this patch, how I built and tested is available at https://github.com/tjfontaine/jdkbuild (there’s also a preview of my follow on patch for pathmap_open

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-04-28 Thread TJ Fontaine
I had no doubt we’d end up on the conversation of 10 -> 9 -> 8u, I started with 8u merely because it was representative of today’s customer pain. I’ll be sure to work on retargeting it as well. Thanks! TJ On 4/28/17, 3:42 PM, "David Holmes" wrote: Hi TJ,

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-04-28 Thread David Holmes
Hi TJ, Thanks for the patch (I haven't looked at it yet). FYI at the moment, unless this is considered a high priority bug for JDK 9 it has to be targeted to JDK 10, and then possibly backported to 9 and 8u. Cheers, David On 29/04/2017 8:23 AM, TJ Fontaine wrote: I have attached a patch