[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8024055: serviceability/attach/AttachWithStalePidFile.java createJavaPidFile() fails
From:       Jaroslav Bachorik <jaroslav.bachorik () oracle ! com>
Date:       2014-10-27 9:31:09
Message-ID: 544E10DD.5070706 () oracle ! com
[Download RAW message or body]

Hi Peter,

On 10/24/2014 03:39 PM, Peter Allwin wrote:
> Hello!
>
> This patch fixes two intermittent issues seen over the past year:
>
>    a) Possible failure where an existing pid-file is not owned by the
> test user
>    b) Race during startup where we try to attach to the target before
> it's ready (removed arbitrary 5sec sleep)
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8024055
> Webrev: http://cr.openjdk.java.net/~allwin/8024055/webrev.00/

test/serviceability/attach/AttachWithStalePidFile.java
---
Couldn't you use ProcessTools.startProcess(name, processBuilder, 
readyPredicate) to start the test process and make sure it prints 
"ready" line before continuing?


test/serviceability/attach/AttachWithStalePidFileTarget.java
---
Instead of waiting here for a really long time you could block on 
reading from stdin. The driver application would then just send a 
shutdown message over pipe when it is safe for the test application to die.

-JB-

>
> Tested locally on my Mac.
>
> Thanks!
> /peter

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic