[lttng-dev] lttng-analysis error

Kienan Stewart kstewart at efficios.com
Tue Oct 31 15:36:15 EDT 2023

Hi Tao,

based on a quick test I performed, there may be a work-around that will 
work for you.

The issue that I see is that at least the 
`lttng_statedump_file_descriptor` events no longer have a pid field 
which the older lttng-analyses code assumes is present.

To find this out
When running the manual recording steps, could you add the following 
command before running `lttng start`:

lttng add-context --kernel --type=pid

To pinpoint the source of the error, I used the `--debug` parameter for 
`lttng-analyses` as follows:

# lttng-schedtop --debug 
Checking the trace for lost events... 

Traceback (most recent call last): 
                            ] ETA:  --:--:--
line 73, in _run_step

line 365, in _run_analysis

line 81, in process_event
line 33, in process_event

line 91, in _process_lttng_statedump_file_descriptor
     pid = event['pid']
"/usr/local/lib/python3.7/dist-packages/babeltrace/babeltrace.py", line 
912, in __getitem__
     raise KeyError(field_name) 

KeyError: 'pid' 

Error: Cannot run analysis: 'pid'


On 2023-10-31 07:44, 姜涛 Tao(AD) via lttng-dev wrote:
> Hi everyone, I use lttng-analysis tools to parse the trace files but get 
> error as below:
> I try two methods to catch the trace data: “automatic” using 
> lttng-analysis-record and “manual” using lttng 
> create/enable-event/start/stop/destroy, but always get the errors when 
> using lttng-analysis tools(0.6.0 and 0.6.1 version).
> I load the lttng modules(2.12.14 version) successfully:
> 文本 描述已自动生成
> The environment is as below: Ubuntu20.04 aarch64, kernel version: 
> 5.10.120 rt patch.
> Any help will be appreciated! Thanks!
> 免责声明:本邮件所包含信息发给指定个人或机构,邮件可能包含保密或专属信 
> 息。未经接收者许可,不得阅读、转发或传播邮件内容,或根据邮件内容采取任何 
> 相关行动。如果错误地收到了此邮件,请与收件人联系并自行删除邮件内容。 
> Disclaimer:The information transmitted is intended only for the person 
> or entity to which it is addressed and may contain confidential and/or 
> privileged material. Any review, retransmission, dissemination or other 
> use of, or taking of any action in reliance upon, this information by 
> persons or entities other than the intended recipient is prohibited. If 
> you received this in error , please contact the sender and delete the 
> material from any computer.
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

More information about the lttng-dev mailing list