Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » Error loading control flow pane(LTTng )
Re: Error loading control flow pane [message #655598 is a reply to message #655582] Mon, 21 February 2011 21:36 Go to previous messageGo to next message
Francois Chouinard is currently offline Francois ChouinardFriend
Messages: 28
Registered: July 2009
Junior Member
Hi Bill,

Let me get this straight:

1. You start your Eclipse
2. You switch to the LTTng perspective
3. You get a NulPointerException

Is this correct?

Which version of LTTng are you using? The one delivered with Linux Tools 0.7?

Re: Error loading control flow pane [message #655636 is a reply to message #655598] Tue, 22 February 2011 04:24 Go to previous messageGo to next message
Bill is currently offline BillFriend
Messages: 5
Registered: February 2011
Junior Member
Hi Francois,

That is correct. The LTTng version is 0.2.0.201009101021 which comes straight from the "Eclipse IDE for C/C++ Linux Developers (includes Incubating components)" I downloaded yesterday.

I'm starting to think it is related to the gnome installation. I also have this error from liblttvtraceread.so: undefined symbol: g_strcmp0. This terminates eclipse immediately after trying to load a sample trace.

Perhaps the setup is just too old. I ran the exact same setup on Fedora 14 without any issues. Any ideas?

Thanks,
Bill

Re: Error loading control flow pane [message #655791 is a reply to message #655636] Tue, 22 February 2011 16:15 Go to previous messageGo to next message
Francois Chouinard is currently offline Francois ChouinardFriend
Messages: 28
Registered: July 2009
Junior Member
Hi Bill,

It seems that my earlier reply didn't make it for some reason. I guess I clicked the wrong button...

[1] liblttvtraceread

The symbol "g_strcmp0" appeared in glibc 1.6 or so. If the symbol is not defined, you are likely to get a SIGSEGV upon loading the library and the app will crash in full glory.

The easy workaround is to replace "g_strcmp0" by the plain old "strcmp" in the lib source code and re-compile. That should do the trick. Let me know if you need help on this one.

BTW, we are working on providing a full Java version of the lib but don't hold your breath: it won't be ready before the fall and will only support the upcoming trace file format (including the improved UST - User Space Tracing).


[2] LTTng

LTTng v0.2.2 is a bit old and quite buggy. You should upgrade to v0.3.0 which is more stable. The preferred way to upgrade is to use the Eclipse Update Manager. The update site URL: http://download.eclipse.org/technology/linuxtools/update.

You can also find general instructions at http://www.eclipse.org/linuxtools/downloads.php.


[3] NPE

The NPE is caused by a missing check in checkForSWTBugItemHeightAdjustement(). This function retrieves the environment variable DESKTOP_SESSION and checks if it is either "gnome" or "kde" and provides a corresponding height adjustment to align ControlFlow process entries with their Gantt chart (this is to address an SWT issue).

My guess is that DESKTOP_SESSION is not defined in your environment and this results in an NPE. I will open a bug and provide the fix shortly.

As a workaround, I suggest that you define that variable and assign it any value you see fit. So far, we only tested t5his with "gnome" and "kde" but It would be interesting to know which environment you are using.


BTW, I realize I never asked: What is your environment?

Re: Error loading control flow pane [message #655818 is a reply to message #655791] Tue, 22 February 2011 17:35 Go to previous messageGo to next message
Francois Chouinard is currently offline Francois ChouinardFriend
Messages: 28
Registered: July 2009
Junior Member
Oops mistake:

The symbol "g_strcmp0" appeared in glibc *2.16* or so....

Sorry.
Re: Error loading control flow pane [message #655838 is a reply to message #655791] Tue, 22 February 2011 19:10 Go to previous messageGo to next message
Bill is currently offline BillFriend
Messages: 5
Registered: February 2011
Junior Member
Hi Francois,

I followed all of your steps:

1. export DESKTOP_SESSION=gnome
2. Update lttng to 0.3.0
3. Change g_strcmp0 to strcmp. I found only one instance in each library.

Everything is working until I try to open an experiment with the sample traces. Nothing seems to load. This step works on my Fedora 14 setup, but not the Red Hat 5.4 setup that is the "real" setup.

I'm so close right now. Any more ideas? I really appreciate the help you have given me on this. I never would have made it this far without your help!

Thanks,
Bill
Re: Error loading control flow pane [message #655882 is a reply to message #655838] Wed, 23 February 2011 01:12 Go to previous messageGo to next message
Bill is currently offline BillFriend
Messages: 5
Registered: February 2011
Junior Member
Hi Francois,

I fixed the problem. I needed to load the 2.3 library to view the sample traces. I thought I would get an error message in this case, but it looks like the errors showed up on stderr and I saw them when I exited eclipse.

Thanks for all your help!
Bill
Re: Error loading control flow pane [message #655886 is a reply to message #655882] Wed, 23 February 2011 01:52 Go to previous messageGo to next message
Francois Chouinard is currently offline Francois ChouinardFriend
Messages: 28
Registered: July 2009
Junior Member
Hi Bil,

I presume you no longer get an NPE but that now nothing shows up when you load an experiment.

It would help if you started your Eclipse from a shell and checked if you have libraries report any error when you try to load a trace. If you get an error, please post it so I can give it a look.

Also, try an experiment with a single trace or, even better, just double-click on a trace (i.e. no experiment).


Off the top of my head, here are a few things that can go wrong if you are not extra careful (this whole library thing is quite brittle and has to be revisited - once you get it working you never have to worry about it again but it can be painful to get there).

[1] Library build order

This could be caused by the order in which you compiled the libraries (BTW, we are fully aware that this procedure is quite error prone...)

After the compilation, your lib directory should look like this:

-rwxr-xr-x 1 francois francois 204813 2010-07-27 20:01 liblttvtraceread-2.3.so
-rwxr-xr-x 1 francois francois 206955 2010-07-27 20:01 liblttvtraceread-2.5.so
-rwxr-xr-x 1 francois francois 207115 2010-07-27 20:02 liblttvtraceread-2.6.so
-rw-r--r-- 1 francois francois 310864 2010-07-27 20:02 liblttvtraceread.a
-rwxr-xr-x 1 francois francois 1147 2010-07-27 20:02 liblttvtraceread.la
-rwxr-xr-x 1 francois francois 106425 2010-07-27 20:01 liblttvtraceread_loader-2.3.so
-rwxr-xr-x 1 francois francois 106425 2010-07-27 20:01 liblttvtraceread_loader-2.5.so
-rwxr-xr-x 1 francois francois 106425 2010-07-27 20:02 liblttvtraceread_loader-2.6.so
-rw-r--r-- 1 francois francois 141922 2010-07-27 20:02 liblttvtraceread_loader.a
-rwxr-xr-x 1 francois francois 1196 2010-07-27 20:02 liblttvtraceread_loader.la
lrwxrwxrwx 1 francois francois 30 2010-07-27 20:02 liblttvtraceread_loader.so -> liblttvtraceread_loader-2.6.so
lrwxrwxrwx 1 francois francois 23 2010-07-27 20:02 liblttvtraceread.so -> liblttvtraceread-2.6.so

Notice that the loader (liblttvtraceread_loader.so) and the default lib (liblttvtraceread.so) are soft links to the latest lib version.

The way the loaders are coded, they check if the trace can be parsed with the "current" version and *downgrade* if the check failed. The checking order (for now) is v2.6 -> v2.5 -> v2.3. If the soft link doesn't point to v2.6, the trace format might not be recognized... (BTW, if you are using the sample traces, they are at v2.5)


[2] Your LD_LIBRARY_PATH is not set correctly

The other possibility is that the libs might not be on your lib path (I understand that this is quite unlikely since the libs with the bad symbol were found previously but just in case...)

Try starting your Eclipse the following way:

LD_LIBRARY_PATH=<full path to your liblttvtraceread libs>:$LD_LIBRARY_PATH eclipse


You probably already tried these but I mention them just in case.

Anyway, I will try to get hold of RH 5.4 and "exercise" it Smile
Re: Error loading control flow pane [message #655887 is a reply to message #655886] Wed, 23 February 2011 01:54 Go to previous message
Francois Chouinard is currently offline Francois ChouinardFriend
Messages: 28
Registered: July 2009
Junior Member
Well, I guess you were still at it when I was replying Smile

Glad I could help.

Take care.
Previous Topic:importing files as links
Next Topic:Can events be filtered?
Goto Forum:
  


Current Time: Thu Dec 18 21:52:00 GMT 2014

Powered by FUDForum. Page generated in 0.01744 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software