JDK-8022203 - Intermittent test failures in demo/jvmti/hprof
Sergei Kovalev
sergei.kovalev at oracle.com
Mon Feb 10 01:45:45 PST 2014
Staffan,
Thank you for pointing this. You are right. Instead of the first
argument we can slightly modify second one, and invocation commands will
look like:
hprof = new DemoRun("hprof", "cpu=old,depth=0,file=options.txt");
hprof = new DemoRun("hprof", "depth=0,file=options1.txt");
Does it work for you?
--
With best regards,
Sergei
07.02.2014 23:16, Staffan Larsen wrote:
> Yes, using different output files for the different runs sounds like a good approach. I don’t think the argument to DemoRun() specifies the output file name, though.
>
> /Staffan
>
> On 7 feb 2014, at 11:10, Sergei Kovalev <sergei.kovalev at oracle.com> wrote:
>
>> Hello everyone,
>>
>> I'm working for https://bugs.openjdk.java.net/browse/JDK-8022203.
>>
>> The issue reproducible only on the host where it was initially discovered.
>>
>> For testing I chose demo/jvmti/hprof/OptionsTest.java test. I identified that failure occurs only with below sequence:
>>
>> hprof = new DemoRun("hprof", "cpu=times,depth=0");
>> hprof = new DemoRun("hprof", "cpu=old,depth=0");
>>
>> here second line leads to fail with probability 1/10000. Using process monitor "ProcMon" by Sysinternals I discovered that issue caused by slippage in delete operation. According event log:
>>
>> Normal file system operations looks like:
>> "3:21:16.7185415 AM","java.exe","3532","CreateFile","C:\Users\aurora\jdk\sk_jdk\JTwork\scratch\java.hprof.txt","SUCCESS","Desired Access: Generic Write, Read Attributes, Disposition: OverwriteIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Created"
>>
>> Operation that leads to fail:
>> "3:52:30.6024647 AM","java.exe","3924","CreateFile","C:\Users\aurora\jdk\sk_jdk\JTwork\scratch\java.hprof.txt","*DELETE PENDING*","Desired Access: Generic Write, Read Attributes, Disposition: OverwriteIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0"
>>
>> So this is not the test issue.
>> To avoid IO operation failures I propose to use unique file name for each iteration. In this case test would not overwrite file and would not depend on filesystem performance.
>> For example above code will looks like:
>>
>> hprof = new DemoRun("options", "cpu=old,depth=0");
>> hprof = new DemoRun("optins1", "depth=0");
>>
>> Please let me know if you have any comments or suggestion.
>>
>> --
>> With best regards,
>> Sergei
More information about the hotspot-dev
mailing list