Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

568
Visualizações
Can't determine target's VM version : field "_reserve_for_allocation_prefetch" while using jmap or jstat

I get the following error when i try using jmap, jinfo etc and try connecting to a running jvm.

For example

[x@y bin]$ jmap -heap 3848

Attaching to process ID 3848, please wait...
Error attaching to process: java.lang.RuntimeException: can't determine target's VM version : field "_reserve_for_allocation_prefetch" not found in type Abstract_VM_Version
sun.jvm.hotspot.debugger.DebuggerException: java.lang.RuntimeException: can't determine target's VM version : field "_reserve_for_allocation_prefetch" not found in type Abstract_VM_Version
    at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:435)
    at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:305)
    at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:140)
    at sun.jvm.hotspot.tools.Tool.start(Tool.java:185)
    at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
    at sun.jvm.hotspot.tools.HeapSummary.main(HeapSummary.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.tools.jmap.JMap.runTool(JMap.java:201)
    at sun.tools.jmap.JMap.main(JMap.java:130)
Caused by: java.lang.RuntimeException: can't determine target's VM version : field "_reserve_for_allocation_prefetch" not found in type Abstract_VM_Version
    at sun.jvm.hotspot.runtime.VM.<init>(VM.java:291)
    at sun.jvm.hotspot.runtime.VM.initialize(VM.java:370)
    at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:431)
    ... 11 more

What could be the problem?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The jmap command being used might be of a version that is lower than the jdk version used to spawn the process.

First check your jdk version

java -version

Then, one can quickly check the jdk version of the jvm by figuring out the launch command for that pid.

ps -p {your_jvm_id} -f

The output should look something like this.

UID        PID   PPID  C STIME TTY          TIME     CMD
x.y+       3848  3786  7 Nov18 tty2         20:29:41 /apps/progs/ideaIC-2020.2.3/idea-IC-202.7660.26/jbr/bin/java -classpath /apps/progs/ideaIC-2020.2.3/idea-IC-202.7660.26/lib/bootstrap.jar:/apps/progs/ideaIC-2020.2

In the CMD column, you should see the path of the java executable used to launch the process. Try getting the version of that executable.

For example:

/apps/progs/ideaIC-2020.2.3/idea-IC-202.7660.26/jbr/bin/java -version

openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment JBR-11.0.8.10-944.34-jcef (build 11.0.8+10-b944.34)
OpenJDK 64-Bit Server VM JBR-11.0.8.10-944.34-jcef (build 11.0.8+10-b944.34, mixed mode)

Notice the difference between the versions

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda