| Summary: | Fatal error message from valgrind process is not properly reported in Eclipse tooling | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] Linux Tools | Reporter: | Martin Oberhuber <mober.at+eclipse> | ||||||||
| Component: | Valgrind | Assignee: | Roland Grunberg <rgrunber> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | blocker | ||||||||||
| Priority: | P3 | CC: | ebaron | ||||||||
| Version: | 0.8.1 | ||||||||||
| Target Milestone: | 0.9.0 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux-GTK | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 204743 [details]
test project ZIP
Created attachment 204744 [details]
.log from my workspace showing Linuxtools exception
The log I see in Eclipse:
!ENTRY org.eclipse.core.jobs 4 2 2011-10-07 13:14:27.553
!MESSAGE An internal error occurred during: "Launching thruput-test Debug".
!STACK 0
java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:85)
at org.eclipse.linuxtools.internal.valgrind.core.ValgrindCoreParser.<init>(ValgrindCoreParser.java:74)
at org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchConfigurationDelegate.parseLogs(ValgrindLaunchConfigurationDelegate.java:202)
at org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchConfigurationDelegate.launch(ValgrindLaunchConfigurationDelegate.java:164)
Let's try to get this fixed for 0.9.0. I've confirmed and found a fix for this. I'll post a patch here to be reviewed. Created attachment 204768 [details]
Patch
The output from running valgrind during this error is in a parseable format, and so can be displayed in the valgrind view as an error/problem.
What's the plan for getting the patch into master ? I've heard that today (friday) is 0.9.0 cutoff for IP disclosures, so in case Roland is not a Linuxtools committer ... could you add a legal message here on bugzilla please, similar to what I put on bug 360085 comment 7 (see "Legal Message:") I am a committer so this won't be an issue. I've tested this patch and it solves the behaviour in question, so assuming there are no objections I will commit this to master. Commited as 2fb0fc0bdb11b596a319d049a228b115a7566dbb. Fixed. |
Build ID: Linuxtools-0.8.1 on RHEL5.3 x86_64 host CQ:WIND00309298 When running the Massif tool from Eclipse, and the underlying valgrind process runs into a fatal error (such as out-of-memory), that fatal error is not properly reported in Eclipse. The valgrind commandline tool prints a nice and very verbose message when running out of memory, but the Eclipse tooling runs into an "EmptyStackError" instead. This is confusing for end users and especially problematic when running valgrind on remote embedded targets, where main memory is often scarce - Valgrind does need an awful lot of main memory, so this use-case is relatively common. Not reporting the error is a major loss of functionality since as a user I can't understand what's the problem and how to address it so my original goal (valgrind profiling) can't be performed. Expected behavior: When the valgrind commandline process exits with a non-zero exitcode, logfile parsing should not be performed and the process output (stderr) should be shown to the end user such that they can understand the problem. Steps to reproduce: 1. Limit maximum available virtual memory, e.g. by running this command in bash: ulimit -v 1024000 2. Launch Eclipse and import attached project 3. Build if not on x86_64 (binary is in the ZIP but rebuild may be needed) 4. Profile > Profile configurations.. and run the Massif Launch that's stored in the Project --> EmptyStackError is shown. 5. For reference / comparison, you can run the "mass.sh" shellscript on commandline, to see the commandline output. Or, in the Debug View show Properties of the Valgrind launch and copy-and-paste the commandline.