question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Broken pipe" error when using VirtualMachine API emulation

See original GitHub issue

We provide a utility for remote attachment of our agent that relies on ByteBuddy’s VirtualMachine emulation feature. The current version we use is greater than 1.10.1, where there is a mention of “broken pipe” in the release notes.

We have a user reporting getting the broken pipe error using the following environment:

  • Oracle JVM 1.8.0_74 (using the same JRE to run the app and the attachment utility)
  • Centos Linux release 7.4
  • SELinux is disabled
  • Running both the app and the attachment utility as root

Here is the relevant part of the stack trace:

Caused by: com.sun.jna.LastErrorException: [32] Broken Pipe
at com.sun.jna.Native.invokeInt(Native Method)
at com.sun.jna.Function.invoke(Function.java:426)
at com.sun.jna.Function.invoke(Function.java:361)
at com.sun.jna.Library$Handler.invoke(Library.java:265)
at net.bytebuddy.agent.$Proxy0.write(Unknown Source)
at net.bytebuddy.agent.VirtualMachine$ForHotSpot$Connection$ForJnaPosixSocket.write(VirtualMachine.java:735)
at net.bytebuddy.agent.VirtualMachine$ForHotSpot$Connection$ForJnaPosixSocket.write(VirtualMachine.java:686)
at net.bytebuddy.agent.VirtualMachine$ForHotSpot$Connection$OnPersistentByteChannel.execute(VirtualMachine.java:592)
at net.bytebuddy.agent.VirtualMachine$ForHotSpot.load(VirtualMachine.java:361)
at net.bytebuddy.agent.VirtualMachine$ForHotSpot.loadAgent(VirtualMachine.java:335)

Do you know what could cause this kind of errors ?

  • from the stack trace, creating the temporary file in working directory and opening the socket is not the issue
  • issue is triggered when trying to write to the socket using JNA, is broken pipe a generic issue for JNA, or does it provide any meaningful indication about the root cause ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
raphwcommented, May 4, 2020

Yes, would be interesting to check its chmod for being 600.

0reactions
eyalkorencommented, May 4, 2020

They could also try to set the permissions of the socket file manually.

Is that the .attach_pid<pid> file? They looked at the .java_pid<pid> permissions and they seemed correct.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Error: Could not open /dev/vmmon: Broken pipe, whi...
Error : Could not open /dev/vmmon: Broken pipe, while launching the Virtual Machine (80467). Jump to solution. I have tried everything suggested on...
Read more >
1619019 – [v2v] Broken pipe (Errno 32) occurs during multiple ...
Bug 1619019 - [v2v] Broken pipe (Errno 32) occurs during multiple VMs conversion ... Actual results: RHV upload plugin fails with 'Broken pipe'...
Read more >
HFSS Completion and Broken Pipe Errors - Ansys Learning Forum
Some users encounter a "Communication Failure: System 0" when running their simulation. Other users encounter a Broken Pipe error. This is using the...
Read more >
Common Error Messages - Sauce Labs Documentation
This is a rare but known error. It indicates that the OnDemand portion of the Sauce Labs service lost its connection with the...
Read more >
what caused IOException and Broken pipe - Stack Overflow
'Broken pipe' means you have written data to a connection that had already been closed by the peer. Solution ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found