title: Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException: cannot open binary file
body: <p>When I use jmap to get the heap info about a process, I got error like that:</p>
  
  <pre><code>$jmap -heap process_id
  
  Attaching to process ID process_id, please wait...
  Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException: cannot open binary
  file
  sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerException:
  cannot open binary file    
  </code></pre>
  
  <p>OS: Ubuntu 14.04</p>
  
  <p>I have solved another error (<code>DebuggerException: Can't attach to the process</code>) by updating <code>kernel.yama.ptrace_scope = 0</code>.</p>
  
  <p>See: <a href="https://bugs.openjdk.java.net/browse/JDK-7050524" rel="noreferrer">https://bugs.openjdk.java.net/browse/JDK-7050524</a></p>