Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313636 - Cannot aquire heapdump
Summary: Cannot aquire heapdump
Status: RESOLVED FIXED
Alias: None
Product: MAT
Classification: Tools
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Krum Tsvetkov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-19 18:43 EDT by Benjamin Muskalla CLA
Modified: 2010-06-16 03:50 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2010-05-19 18:43:08 EDT
Using MAT 1.0.0.20100514

When I try to aquire a heapdump, MAT always fails in the last step of the wizard:


Heap dump file was not created. jmap exit code = 0
stdout:
Dumping heap to /home/bmuskalla/Apps/mat-1.0/"/home/bmuskalla/rapdumps/initial" ...
No such file or directory

/home/bmuskalla/Apps/mat-1.0/ is my MAT installation
/home/bmuskalla/rapdumps/initial is the target path I entered in the wizard

According to the log, it seems it wants to execute jmap with the right path but the heapdump is not written.
!ENTRY org.eclipse.mat.ui 1 0 2010-05-20 00:37:24.242
!MESSAGE Executing: /usr/lib/jvm/java-6-sun-1.6.0.16/bin/jmap -dump:format=b,file="/home/bmuskalla/rapdumps/initial" 9260
Comment 1 Krum Tsvetkov CLA 2010-05-20 03:56:54 EDT
I was able to reproduce this. When I first saw it I though we log one thing and execute another one. But this is not true, indeed what you see in the log is the line which is passed in the Runtime.exec(). 
For some reason it works fine if I paste it in a console, but when executed through Runtime.exec() it adds the tool root directory.
I guess it has something to do with the quotes, which I have to admit I added in the last moment because otherwise paths with blank spaces didn't work on Win. Then I just tried in the console if quoting the path will work also on Linux...
I'll look into this and try to fix it.
Comment 2 Krum Tsvetkov CLA 2010-05-20 05:38:40 EDT
I was able to fix this. Now both files with and without spaces work both on Win and Linux. As the problem will appear to anybody who tries to dump with MAT/jmap on a non-win system, I'll try to update our RCPs available for download in the next days already. Thanks for pointing to the problem!
Comment 3 Benjamin Muskalla CLA 2010-05-20 06:37:35 EDT
Thanks Krum for fixing this that fast. Just tried svn trunk and it works as expected. Thanks!
Comment 4 Krum Tsvetkov CLA 2010-06-16 03:50:25 EDT
Closing this one as fixed.