how to kill an orphaned matlab.exe process?

조회 수: 6 (최근 30일)
Mike
Mike 2012년 4월 12일
Hi, (this is all under windows 7, matlab 2011b and guide) I'm working with matlab gui-s and I get the evil java heap error. I have increased the java heap memory.
If I get this error, matlab crashes and leaves an orphaned matlab.exe process running. I cannot kill the process with task manager or taskkill, only rebooting windows. Does anyone know how to kill this zombie? If I just restart matlab I end up with 2 processes.
What happenes before the red scrolling error text often enough is the system/matlab starts slowing down, I realize I am going to get the evil red java heap error. I try to save what I'm doing and some times it does, others it doesn't, or it saves half, screwing up the works and crashing. Then, using task manager, I find that matlab.exe is still a process running. I cannot use taskmanager to kill the process. If I start matlab again, I have 2 of these running. When I go to a windows 7 command prompt as admin, I try taskkill /f /im matlab.exe the result is it finds a PID number, but it says the process does not exist. The only way I've found to kill the process is to reboot windows.... If I don't, I get 2 matlab.exe and since I'm using the COM/USB port stays locked and cannot be acessed... Hence, reboot.. ugh...
Thanks!
Does anyone know how to kill the orphaned matlab.exe process other than rebooting windows?
  댓글 수: 2
Jan
Jan 2012년 4월 19일
I have deleted my answer about killing the process in the taskmanager, because it was accepted by accident. Looking like a solved problem reduces the interest of other readers.
Geoff
Geoff 2012년 4월 20일
Interesting... I've seen similar behaviour in Windows 7 before, when I was developing an in-house application in C++, which spat its debug output via the ConsoleWindow. If my process crashed, it would zombie but only if the ConsoleWindow was open at the time. I never figured out how to kill that process. I was quite impressed with Win7 up until that point, then I started missing XP-64.

댓글을 달려면 로그인하십시오.

답변 (2개)

Jason Ross
Jason Ross 2012년 4월 12일
When I've found that the normal utilities don't work, I reach for the PStools.
Try using "pskill"
  댓글 수: 2
Mike
Mike 2012년 4월 18일
I have tried this now and it was not effective. I also tried it on a national instruments hung process and it didn't work either.. Thanks for the idea!
Jason Ross
Jason Ross 2012년 4월 18일
No problem. There is another utility in there called Process Explorer that lays out the relationships between the various things that are running. You might be able to kill a sub-process and then work your way up the tree.

댓글을 달려면 로그인하십시오.


Jan
Jan 2012년 4월 20일
  1. Install resource kit.
  2. tlist -t
  3. kill name or id
  4. If this does not work: kill -F name or id
  5. If this does not work perform this through the AT command to get the system privilegs:
AT <time> /INTERACTIVE CMD /C KILL -F <process name or id>
  1. If you still have no success, change the thread's privilegs by PVIEW.
  댓글 수: 1
Jan
Jan 2012년 4월 20일
Of course the last point is "6." and not "1.". The formatting power is suboptimal.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by