Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367505 - Perf hangs when clicking on or creating a configuration
Summary: Perf hangs when clicking on or creating a configuration
Status: VERIFIED FIXED
Alias: None
Product: Linux Tools
Classification: Tools
Component: perf (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Daniel Henrique Barboza CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-23 11:47 EST by Roland Grunberg CLA
Modified: 2012-01-03 09:43 EST (History)
3 users (show)

See Also:


Attachments
Patch to fix the p.waitFor() problem found (1.93 KB, application/octet-stream)
2011-12-26 13:12 EST, Daniel Henrique Barboza CLA
obusatto: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Grunberg CLA 2011-12-23 11:47:38 EST
Tested on :
Fedora 15 Eclipse 3.7.1
Perf plugin master branch
perf version 3.1.4.4-1.fc15.i686

Steps to reproduce :
1) Right click on a C Project and go to profile configurations.
2) Double click to create a new perf profile configuration
(Alternatively you can click on an already existing perf configuration from a default launch)

The UI will hang.

The issue seems to be that at perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/perf/PerfCore.java:78 we wait for termination of "perf list" for processing. However the output is in less format, and so the command doesn't actually terminate on its own. This seems to be the behaviour for perf versions 3.1.4.4-1.fc15.i686 and 3.1.5-6.fc16.i686.
Comment 1 Daniel Henrique Barboza CLA 2011-12-26 07:27:16 EST
I'm using Fedora 14 with perf version 2.6.35.14-106.fc14.x86_64. Issuing "perf list" also gives a less format output, but somehow it doesn't break.

Probably there is something else going on with the output of the newer versions. I'll try to update the perf version of my box and see the bug happening.
Comment 2 Daniel Henrique Barboza CLA 2011-12-26 13:11:45 EST
I've fixed this problem by removing the problematic p.waitFor() call (which does not provide any timeout option) and now the plug-in is doing a verification of stdout and stderr streams to be ready instead.

I've tested it on my Fedora 14 and we've tested it on a Ubuntu machine (to check if I didn't break the stderr version of Perf) and it's all good, but I would like to ask Roland to take a look at it and see if it fixes the problem for the perf versions he mentioned.
Comment 3 Daniel Henrique Barboza CLA 2011-12-26 13:12:41 EST
Created attachment 208806 [details]
Patch to fix the p.waitFor() problem found
Comment 4 Otavio Pontes CLA 2011-12-27 06:43:18 EST
Resolved in commit d94bf7de749e400a420d18aacdf2a96661d6e61a
Comment 5 Roland Grunberg CLA 2012-01-03 09:43:48 EST
This fixes the issue for me. Resolving as verified.