Project

General

Profile

Actions

Bug #1136

closed

Saved session generated from lttng 2.8 fail to load on lttng 2.10

Added by Jonathan Rajotte Julien over 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
11/11/2017
Due date:
% Done:

0%

Estimated time:

Description

The following session cannot be loaded and result in the following on lttng load:

Error: Failed to load session saved_trace: Unknown error code
Error: Unknown error code
Error: Command error

After performing some debugging it seems that the error is introduced by cf0bcb51ea857687a353d2851e572dba6cc63cb0.

lttng_channel_create, which was introduced does not seems to support all type of domain. It support only LTTNG_DOMAIN_UST, LTTNG_DOMAIN_KERNEL while the passed value can also be LTTNG_DOMAIN_JUL, LTTNG_DOMAIN_PYTHON, LTTNG_DOMAIN_LOG4J.

This is not triggered by testing since no channels are under those domains in the session files used.

<?xml version="1.0" encoding="UTF-8"?>
<sessions>
    <session>
        <name>saved_trace</name>
        <domains>
            <domain>
                <type>UST</type>
                <buffer_type>PER_UID</buffer_type>
                <channels/>
                <trackers/>
            </domain>
            <domain>
                <type>JUL</type>
                <buffer_type>PER_UID</buffer_type>
                <channels>
                    <channel>
                        <name>lttng_jul_channel</name>
                        <enabled>true</enabled>
                        <overwrite_mode>DISCARD</overwrite_mode>
                        <subbuffer_size>131072</subbuffer_size>
                        <subbuffer_count>4</subbuffer_count>
                        <switch_timer_interval>0</switch_timer_interval>
                        <read_timer_interval>0</read_timer_interval>
                        <output_type>MMAP</output_type>
                        <tracefile_size>0</tracefile_size>
                        <tracefile_count>0</tracefile_count>
                        <live_timer_interval>0</live_timer_interval>
                        <events>
                            <event>
                                <name>hello</name>
                                <enabled>true</enabled>
                                <type>TRACEPOINT</type>
                                <loglevel_type>ALL</loglevel_type>
                                <filter>logger_name == &quot;hello&quot;</filter>
                            </event>
                        </events>
                        <contexts>
                            <context>
                                <app>
                                    <provider_name>myRetriever</provider_name>
                                    <ctx_name>intCtx</ctx_name>
                                </app>
                            </context>
                        </contexts>
                    </channel>
                </channels>
            </domain>
            <domain>
                <type>LOG4J</type>
                <buffer_type>PER_UID</buffer_type>
                <channels>
                    <channel>
                        <name>lttng_log4j_channel</name>
                        <enabled>true</enabled>
                        <overwrite_mode>DISCARD</overwrite_mode>
                        <subbuffer_size>131072</subbuffer_size>
                        <subbuffer_count>4</subbuffer_count>
                        <switch_timer_interval>0</switch_timer_interval>
                        <read_timer_interval>0</read_timer_interval>
                        <output_type>MMAP</output_type>
                        <tracefile_size>0</tracefile_size>
                        <tracefile_count>0</tracefile_count>
                        <live_timer_interval>0</live_timer_interval>
                        <events>
                            <event>
                                <name>hello</name>
                                <enabled>true</enabled>
                                <type>TRACEPOINT</type>
                                <loglevel_type>ALL</loglevel_type>
                                <filter>logger_name == &quot;hello&quot;</filter>
                            </event>
                        </events>
                        <contexts>
                            <context>
                                <app>
                                    <provider_name>myRetriever</provider_name>
                                    <ctx_name>intCtx</ctx_name>
                                </app>
                            </context>
                        </contexts>
                    </channel>
                </channels>
            </domain>
            <domain>
                <type>PYTHON</type>
                <buffer_type>PER_UID</buffer_type>
                <channels/>
            </domain>
        </domains>
        <started>false</started>
        <output>
            <consumer_output>
                <enabled>true</enabled>
                <destination>
                    <path>/tmp/lttng-ivc-w6cdmm16/lttng-traces/saved_trace-20171111-164756</path>
                </destination>
            </consumer_output>
        </output>
    </session>
</sessions>
Actions #1

Updated by Jonathan Rajotte Julien over 6 years ago

  • Subject changed from Saved session generated from lttng 2.8 fail to load on lttng 2.10 with non informative error to Saved session generated from lttng 2.8 fail to load on lttng 2.10
Actions #2

Updated by Jérémie Galarneau almost 6 years ago

  • Status changed from Confirmed to In Progress

Hi Jonathan,

I think this patch addresses the problem:

commit 36d1687c718cc647604741cf21e1ffa0b3459429
Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Date:   Wed May 16 18:32:38 2018 -0400

    Fix: sessions with agent channels fail to load

    Channels of the "agent" types cannot be created directly. They are
    meant to be created implicitly through the activation of events in
    their domain.

    However, a user can override the default channel configuration
    attributes by creating the underlying UST channel before enabling an
    agent domain event.

    Hence, the channel's type is substituted before the creation and
    restored by the time events are created.

    Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

It seems to fix the issue on my end, can you confirm on yours?

Thanks!

Actions #3

Updated by Jonathan Rajotte Julien almost 6 years ago

  • Status changed from In Progress to Resolved

Works on lttng-ivc.

Cheers

Actions

Also available in: Atom PDF