Bug 496864 - CallStackView does not show name of functions for which a human readable name is displayed in the trace "Function location"
Summary: CallStackView does not show name of functions for which a human readable name...
Status: RESOLVED FIXED
Alias: None
Product: Tracecompass
Classification: Tools
Component: Core (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Linux
: P3 normal
Target Milestone: 2.0.1   Edit
Assignee: Alexandre Montplaisir CLA
QA Contact: Project Inbox CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-27 13:30 EDT by Andrea Bernabei CLA
Modified: 2016-08-05 10:58 EDT (History)
3 users (show)

See Also:


Attachments
callstack view showing function addresses, trace view showing readable function name (133.41 KB, image/png)
2016-06-27 14:00 EDT, Andrea Bernabei CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Bernabei CLA 2016-06-27 13:30:53 EDT
As title says :)

Environment: Ubuntu 16.04 Xenial Xurus

I have a trace that I got from an ARM device, I imported all the libraries from the target and the debuginfo resolution is working properly in the "trace" events list, while the callstack view is not showing human readable names for most of the functions.
Comment 1 Andrea Bernabei CLA 2016-06-27 13:59:20 EDT
I should have been clearer.

Callstack is showing the function addresses
while the trace view is showing the demangled function name
Comment 2 Andrea Bernabei CLA 2016-06-27 14:00:00 EDT
Created attachment 262731 [details]
callstack view showing function addresses, trace view showing readable function name
Comment 3 Matthew Khouzam CLA 2016-06-27 14:13:45 EDT
The trace is question is located here http://bernabei.me/auto-20160627-164106.tar.gz
Comment 4 Eclipse Genie CLA 2016-06-27 18:55:39 EDT
New Gerrit change created: https://git.eclipse.org/r/76060
Comment 5 Alexandre Montplaisir CLA 2016-06-27 19:12:29 EDT
I was able to reproduce the problem, and also the bug that was also mentioned that upon re-opening the trace it would throw NegativeArraySize exceptions.

After some investigation it turns out there is a problem regarding string length limits in the state system. There is an implicit limit of 127 bytes for each encoded string, but it is never actually checked or enforced. The trace in question had a file system path for example that made exactly 128 bytes!

In the patch I attached the limit is raised to 2^15 bytes instead, which should allow for most reasonable use cases, and it should now correctly report an error if an analysis tries to store strings over that size.
Comment 6 Andrea Bernabei CLA 2016-06-28 09:07:41 EDT
I verified that the proposed change fixes the bug! \o/

Thank you so much people! What a quick fix! :)

PS I have just removed the trace from my server, so you won't be able to access it anymore. Let me know if you need it again :)
Comment 8 Alexandre Montplaisir CLA 2016-06-29 17:07:39 EDT
Patch was merged to master. Thanks for testing it!
Comment 9 Andrea Bernabei CLA 2016-06-30 05:00:20 EDT
I think I'm still seeing this problem in my traces, although it does not always happen :/
Comment 10 Alexandre Montplaisir CLA 2016-06-30 11:01:43 EDT
Which problem are you still seeing? The NegativeArraySize exception? The names being shown in the table but not in the view? Both?
Comment 11 Andrea Bernabei CLA 2016-06-30 11:04:44 EDT
the latter
Comment 12 Andrea Bernabei CLA 2016-06-30 11:05:27 EDT
As in, some function names are shown in the callstack view, some are not.

I fix that by closing and reopening the trace until it works
Comment 13 Alexandre Montplaisir CLA 2016-06-30 13:40:33 EDT
> I fix that by closing and reopening the trace until it works

Hmm, ok, so the information really does exist, it's just not shown sometimes.

Have you tried scrolling around in the view and the table and see if that ends up displaying the names? Mind you, that would still be a bug ;) but we could see if it's a refresh bug, or if it's the trace that gets stuck in a weird state.

Could you share a screenshot of the problem happening?

Also a tip, if you use my "staging/next" branch, you can use the Properties view, with a trace event selected, to show the full Binary Location, Source Location, etc. paths more easily.