# HG changeset patch # User gadams # Date 1522066676 14400 # Node ID 6790b1077a3fc7711963d0e4483898efa739d105 # Parent cc63a8331f9172affcb48816cf75c50e4c3c7023 8057732: sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java: Invalid PerfMemory size Reviewed-by: cjplummer diff -r cc63a8331f91 -r 6790b1077a3f src/jdk.attach/windows/classes/sun/tools/attach/VirtualMachineImpl.java --- a/src/jdk.attach/windows/classes/sun/tools/attach/VirtualMachineImpl.java Mon Mar 26 09:27:24 2018 -0700 +++ b/src/jdk.attach/windows/classes/sun/tools/attach/VirtualMachineImpl.java Mon Mar 26 08:17:56 2018 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -80,9 +80,19 @@ assert args.length <= 3; // includes null // create a pipe using a random name - int r = (new Random()).nextInt(); - String pipename = "\\\\.\\pipe\\javatool" + r; - long hPipe = createPipe(pipename); + Random rnd = new Random(); + int r = rnd.nextInt(); + String pipeprefix = "\\\\.\\pipe\\javatool"; + String pipename = pipeprefix + r; + long hPipe; + try { + hPipe = createPipe(pipename); + } catch (IOException ce) { + // Retry with another random pipe name. + r = rnd.nextInt(); + pipename = pipeprefix + r; + hPipe = createPipe(pipename); + } // check if we are detached - in theory it's possible that detach is invoked // after this check but before we enqueue the command. diff -r cc63a8331f91 -r 6790b1077a3f test/jdk/ProblemList.txt --- a/test/jdk/ProblemList.txt Mon Mar 26 09:27:24 2018 -0700 +++ b/test/jdk/ProblemList.txt Mon Mar 26 08:17:56 2018 -0400 @@ -768,7 +768,6 @@ sun/tools/jstat/jstatClassloadOutput1.sh 8173942 generic-all -sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java 8057732 generic-all ############################################################################