3

I encounter some very strange behavior and I don't know how to handle it. I suspect that the behavior started to reproduce after last Windows upgrade. But I am not sure if it has anything related to it. (I discovered it when I tried to run maven, which uses java)

The behavior is the following: when run java (e.g. java.exe -version) from command line, it does nothing (like below). The process looks like it is hanged. enter image description here

I did the following tests:

  1. make a clone of java.exe (e.g. jv.exe) and run it. It works.enter image description here
  2. rename another application to java.exe (e.g. processmonitor.exe to java.exe). When run application, it doesn't open.enter image description here
  3. renamed java.exe to java.exe.bkp and make a link 'java.exe' to 'jv.exe' (which works), and the process is hanged.
  4. make another link java1.exe to jv.exe and it works.enter image description here
  5. did all the operations with&without network, and no difference (java.exe doesn't work, the others work)
  6. restart windows in 'save mode' (+/- network) and java.exe works
  7. I disabled the firewall from windows, and/or I added rules for java.exe. It doesn't work.

Initially I had many JVMs installed. I uninstalled all of them and installed only the one in images. All above tests are made after new installation.

Also, I observed that every time I run java.exe (but not when I run jv.exe or java1.exe) there is a new file java.exe.XXX.dat created in c:\Users\user.name\AppVerifierLogs.enter image description here Searching on google, it seems that is some kind of log file, which can be viewed with this application (https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/application-verifier) but I don't find the standalone application. Maybe it is already installed in the system, but I don't know where or how to enable it.

It seems that for some reason, the Windows is blocking all processes named 'java', no matter if it is actually the java program or any other application. But I'm out of ideas regarding what could be the cause, or how to continue to investigate.

If anyone can help me, I will be grateful to him.

Thank you.

mihaic
  • 31
  • 2
  • Which version of Windows and are you running in administrator or user mode? – Gilbert Le Blanc Apr 06 '21 at 13:52
  • It is 'Microsoft Windows [Version 10.0.19041.867]', and I run it in user mode. But in admin mode the behavior is the same. – mihaic Apr 06 '21 at 14:23
  • I've just checked my `c:\Users\user.name\AppVerifierLogs` and it does contain logs for some executables, but I never installed appverifier nor did I encounter blocked applications. A search found 2 `appverif.exe` in my Windows folder subfolders. I ran these and the appeared appverifier GUI did not show any executables to test in applications list. Search for `appverif.exe`, run them and figure out if `java.exe` is in the applications list (the list in the right part of the GUI). – nevilad Apr 06 '21 at 16:38
  • Mine is here c:\Windows\System32\appverif.exe (the other one is for x32), but when I execute it, no GUI is displayed. Did you do something special? – mihaic Apr 06 '21 at 18:32
  • Can you copy some other console application as "java.exe" and see if that hangs? – Erik Knowles Apr 06 '21 at 19:32
  • I checked also other console applications, and didn't hang. Only 'java.exe' hangs. Is any way to find if Windows (or firewall) is hanging a process, by name? – mihaic Apr 06 '21 at 21:05
  • @mihaic No, I didnt nothing special. Running both executables shows a GUI. Have yo ran the x32 version? What does it show? Application verifier is a microsoft tool for catching memory leaks, resource leaks and other errors in applications. To do this, it intercepts many things during the execution and this can potentially lead to hangs. Can you open the hung java.exe in processexplorer, open threads tab, open their stack windows and check if there are some appverifier dlls in the stack? – nevilad Apr 07 '21 at 09:49
  • 1
    Look through the Event Log to see if there is anything about this. Also, run java.exe and, while it's hanging, use [Process Explorer](https://learn.microsoft.com/en-gb/sysinternals/downloads/process-explorer) and search for processes that have the file java.exe open. – k314159 Apr 07 '21 at 10:23
  • Hi, @nevilad I have run x64 (c:\Windows\System32\appverif.exe). It behaves like a console application(https://i.stack.imgur.com/HiPhx.png). Checking help, it displays various parameters like it supports instructing an executable to add various details in xxx.dat file (at least this is what I understood). I don't know why it doesn't display a GUI. – mihaic Apr 07 '21 at 14:37
  • 1
    Do you use an antivirus? – dan1st Apr 07 '21 at 14:52
  • Hi all, These are printscreens with process explorer and process monitor. (I have many JDKs installed; one is 1.7 and one is 1.8) https://i.stack.imgur.com/cRjKv.png and https://i.stack.imgur.com/Ipabm.png And indeed, in stack-trace there is an antivirus that appears (Trend Micro). But I don't know if and why it would block the 'java.exe' It is a new install, so it shouldn't be affected by a virus. Not to mention that if I rename java.exe to jv.exe everything works fine. – mihaic Apr 07 '21 at 15:18

0 Answers0