RFR 8037274 (Round 0): sun.tools.attach.WindowsVirtualMachine#createPipe() needs more descriptive message when pipe creation fails

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Thu Mar 13 13:29:46 UTC 2014


On 13.3.2014 13:55, Alan Bateman wrote:
> On 13/03/2014 12:29, Jaroslav Bachorik wrote:
>> Please, take a look at this patch.
>>
>> Issue : https://bugs.openjdk.java.net/browse/JDK-8037274
>> Webrev: http://cr.openjdk.java.net/~jbachorik/8037274/webrev.00/
>>
>> This patch adds an additional info to the error message issued when an
>> attempt to create a named pipe fails. This is supposed to help when
>> identifying the failure cause. The fix is pretty simple but the code I
>> produced might not be exactly aligned with the general C coding style
>> in JDK source base. If you see any violation, please, let me know.
> This looks very odd. Does FormatMessage not give a useful message?

Currently the exception log looks like

[2014-01-09T04:04:53.61] java.io.IOException: CreateNamedPipe failed
[2014-01-09T04:04:53.61] 	at 
sun.tools.attach.WindowsVirtualMachine.createPipe(Native Method)
[2014-01-09T04:04:53.61] 	at 
sun.tools.attach.WindowsVirtualMachine.execute(WindowsVirtualMachine.java:85)
[2014-01-09T04:04:53.61] 	at 
sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(HotSpotVirtualMachine.java:58)
[2014-01-09T04:04:53.61] 	at 
sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(HotSpotVirtualMachine.java:79)
[2014-01-09T04:04:53.61] 	at 
nsk.share.aod.AgentsAttacher.tryToLoadAgent(AgentsAttacher.java:71)
[2014-01-09T04:04:53.61] 	at 
nsk.share.aod.AgentsAttacher.attachAgents(AgentsAttacher.java:48)
[2014-01-09T04:04:53.61] 	at 
nsk.share.aod.AODTestRunner.doTestActions(AODTestRunner.java:63)
[2014-01-09T04:04:53.61] 	at 
nsk.share.aod.AODTestRunner.runTest(AODTestRunner.java:116)
[2014-01-09T04:04:53.61] 	at 
nsk.share.aod.AODTestRunner.main(AODTestRunner.java:163)

And the failure cause is lost somewhere.

-JB-

>
> -Alan



More information about the serviceability-dev mailing list