This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 176321 - profiler doesn't work (Failed to start er_print) if started in SS bin directory
Summary: profiler doesn't work (Failed to start er_print) if started in SS bin directory
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: D-Light (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Andrew Krasny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-09 21:30 UTC by Thomas Preisler
Modified: 2009-11-11 02:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Preisler 2009-11-09 21:30:24 UTC
1) cd to the bin directory where Sun Studio's binaries are including compilers and er_print.
2) start NetBeans
3) run any app with SunStudio profiler configuration on

dlight profiler doesn't work (no details) and many exceptions are thrown:

java.io.IOException: Failed to start er_print
        at org.netbeans.modules.dlight.perfan.storage.impl.ErprintSession.restartAndLock(ErprintSession.java:180)
        at org.netbeans.modules.dlight.perfan.storage.impl.ErprintSession.getExperimentStatistics(ErprintSession.java:199)
        at org.netbeans.modules.dlight.perfan.spi.MonitorsUpdateService$Updater.run(MonitorsUpdateService.java:213)
        at org.netbeans.modules.dlight.util.DLightExecutorService$2.run(DLightExecutorService.java:89)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Comment 1 Thomas Preisler 2009-11-09 21:53:55 UTC
This scenario is actually not very uncommon. The Sun Studio IDE (based on NB6.8) is in the same directory as compilers and er_print, and when I start he IDE, I very often cd to Sun Studio's bin directory and start the IDE with this command: ./sunstudio. And then profiling doesn't work because of this bug.
Comment 2 Thomas Preisler 2009-11-10 09:16:18 UTC
There is a bit more to this bug. er_print is not found when I'm in the bin directory, but it is also not found when I'm in the directory above bin! It works fine if I start sunstudio with 'opt/SUNWspro/bin/sunstudio'.
Comment 3 Andrew Krasny 2009-11-10 14:04:20 UTC
Thomas, 

where I can try to reproduce the bug? Where I can get the Sun Studio IDE (based on NB6.8) ?
Comment 4 Thomas Preisler 2009-11-10 14:50:15 UTC
It has nothing to do with Sun Studio. I could easily reproduce it with plain NetBeans but only if I started Netbeans in the Sun studio bin directory. Sun Studio makes the bug 'worse' because it is more common to start NetBeans (through the SS IDE) in Sun Studio because SS IDE and SS binaries are in same directory. Let me see if I can see the bug in today's NNB build.
Comment 5 Thomas Preisler 2009-11-10 15:05:34 UTC
Try SS in /set/sstrunk/pibareas/ide/master/091109/inst/intel-S2.inst/opt/SUNWspro/bin

1) cd to the above folder
2) start sunstudio
3) run any (Fractal) app and you will see the exceptions when clicking on the CPU details button.

The above build is based on today's NB 6.8.

Just an idea: could the IO exceptions be caused by the fact that the directories here are read only?
Comment 6 Thomas Preisler 2009-11-10 15:40:06 UTC
Something strange is going on. It looks more and more like a race condition somewhere because the bug comes and goes without a clear set of steps to reproduce. I can reproduce it almost every time if I cd to the SS bin directory (which is on a server) and using a new user directory (on a different server).
Comment 7 Andrew Krasny 2009-11-11 02:50:27 UTC
Changeset: http://hg.netbeans.org/cnd-main/rev/0d23a5567ef3
Comment 8 Andrew Krasny 2009-11-11 02:52:49 UTC
As it turned out, the real reason is the length of path to the bin directory of er_print.
I used too small constrains...