lp:~lttng/babeltrace/trunk

Created by Ubuntu LTTng and last modified
Get this branch:
bzr branch lp:~lttng/babeltrace/trunk

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Ubuntu LTTng
Project:
Babeltrace
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://git.efficios.com/babeltrace.git.

The next import is scheduled to run .

Last successful import was .

Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 15 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 15 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 15 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 20 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 10 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 15 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 15 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 15 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 20 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 20 seconds — see the log

Recent revisions

4334. By Simon Marchi <email address hidden>

Fix: bt2: autodisc: remove thread error while inserting status in map

If something fails in `bt_bt2_auto_discover_source_components`, we
append an error cause and we go to the error label. This function
returns a bt_value map containing the return status code and the auto-discovery results, if it was successful.
So we then run into:

 if (result) {
  insert_entry_status = bt_value_map_insert_signed_integer_entry(result, "status", status);
  if (insert_entry_status != BT_VALUE_MAP_INSERT_ENTRY_STATUS_OK) {
   BT_VALUE_PUT_REF_AND_RESET(result);
   PyErr_NoMemory();
  }
 }

However, since there is an error on the current thread, we fail this
precondition:

    06-30 11:27:11.697 3948806 3948806 F LIB/ASSERT-COND <email address hidden>:64 Babeltrace 2 library precondition not satisfied.
    06-30 11:27:11.697 3948806 3948806 F LIB/ASSERT-COND <email address hidden>:66 ------------------------------------------------------------------------
    06-30 11:27:11.697 3948806 3948806 F LIB/ASSERT-COND <email address hidden>:67 Condition ID: `pre:value-map-insert-signed-integer-entry:no-error`.
    06-30 11:27:11.697 3948806 3948806 F LIB/ASSERT-COND <email address hidden>:69 Function: bt_value_map_insert_signed_integer_entry().
    06-30 11:27:11.697 3948806 3948806 F LIB/ASSERT-COND <email address hidden>:70 ------------------------------------------------------------------------
    06-30 11:27:11.697 3948806 3948806 F LIB/ASSERT-COND <email address hidden>:71 Error is:
    06-30 11:27:11.697 3948806 3948806 F LIB/ASSERT-COND <email address hidden>:73 API function called while current thread has an error: function=bt_value_map_insert_signed_integer_entry
    06-30 11:27:11.697 3948806 3948806 F LIB/ASSERT-COND <email address hidden>:76 Aborting...

Change the function to temporarily remove the current thread error,
while inserting the status in the map. In the unlikely event where the
insertion fail because of a memory error, then we just release the error
and it gets lost.

Change-Id: I1b54fb7c8cb0f719fee867e7385dd6a3949cbde4
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8512
Reviewed-by: Philippe Proulx <email address hidden>

4333. By Simon Marchi <email address hidden>

tests: src.ctf.fs: add test for metadata with invalid syntax

It looks like we don't have any test for a metadata file with a syntax
error in it. Add one.

It could be argued that we should not error out in that case, as there
may be unrelated files called `metadata`, and if they don't parse as CTF
1 metadata files, we should just skip over them. But erroring out is
the current behavior of Babeltrace 2, so it should be tested to ensure
it doesn't change by mistake.

Change-Id: I82cae8ebc5df984592205c28041276cc861f30df
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8511
Reviewed-by: Philippe Proulx <email address hidden>

4332. By Francis Deslauriers <email address hidden>

Remove `skip-string-normalization` in Python formatter config

Initially, this option was added to follow existing coding style of
the project. It was recently agreed upon that relying on `black`
completely would be simpler.

Signed-off-by: Francis Deslauriers <email address hidden>
Change-Id: Ic4f7fc672502d512c10f107c254cec18c28a7710
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8518
CI-Build: Simon Marchi <email address hidden>
Tested-by: jenkins <email address hidden>
Reviewed-by: Simon Marchi <email address hidden>

4331. By Simon Marchi <email address hidden>

configure: disable -Wmaybe-uninitialized

gcc produces the following warning at -O2, breaking the CI:

      CXX msg-iter.lo
    /home/simark/src/babeltrace/src/plugins/ctf/common/src/msg-iter.cpp: In member function 'virtual void ctf::src::internal::MsgIterItemVisitor::visit(const ctf::src::PktInfoItem&)':
    /home/simark/src/babeltrace/src/plugins/ctf/common/src/msg-iter.cpp:132:87: error: '*(nonstd::optional_lite::optional<long long unsigned int>::value_type*)((char*)&prevPacketEndDefClkVal + offsetof(nonstd::optio
    nal_lite::optional<long long unsigned int>,nonstd::optional_lite::optional<long long unsigned int>::contained))' may be used uninitialized [-Werror=maybe-uninitialized]
      132 | msg = bt_message_discarded_packets_create_with_default_clock_snapshots(
          | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
      133 | _mSelfMsgIter, _mLibStream.libObjPtr(), *prevPacketEndDefClkVal,
          | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      134 | *_mPacketBeginDefClkVal);
          | ~~~~~~~~~~~~~~~~~~~~~~~~
    /home/simark/src/babeltrace/src/plugins/ctf/common/src/msg-iter.cpp:76:42: note: '*(nonstd::optional_lite::optional<long long unsigned int>::value_type*)((char*)&prevPacketEndDefClkVal + offsetof(nonstd::optiona
    l_lite::optional<long long unsigned int>,nonstd::optional_lite::optional<long long unsigned int>::contained))' was declared here
       76 | nonstd::optional<unsigned long long> prevPacketEndDefClkVal = _mPacketEndDefClkVal;
          | ^~~~~~~~~~~~~~~~~~~~~~

I don't see anything wrong with the code, the compiler just seems
unhappy with the fact that the value part of the optional will possibly
be uninitialized.

I tried to disable -Wmaybe-uninitialized at specific spots, but it's too
difficult. We get different spurious warnings on different
architectures, at different optimization levels, so it's going to end up
as a whack-a-mole game. My previous experience is that this warning
generates a lot of noise and rarely leads to real bug fixes anyway.

Change-Id: Ia013447ee3659954d010b0c4e29b567bc40b6ee7
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8351
Reviewed-by: Philippe Proulx <email address hidden>

4330. By Simon Marchi <email address hidden>

CONTRIBUTING.adoc: remove BT_LIB_LOGF_APPEND_CAUSE

This does not exist.

Change-Id: Ieb1f5ee16c02cf90e68ca7419ff3dd335c295639
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7565
Reviewed-by: Philippe Proulx <email address hidden>

4329. By Simon Marchi <email address hidden>

Fix: common: handle missing status in bt_common_func_status_string

bt_common_func_status_string does not handle __BT_FUNC_STATUS_NO_MATCH,
trying to use it leads to an abort.

Add it, and reorder the cases to be in the same order as the statuses
are listed in include/babeltrace2/func-status.h, to make it easier to
see that none is missing.

Change-Id: I1c1da11b0e9a0694c96b67a4d1e6efb8e4da55d7
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7564
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4328. By Simon Marchi <email address hidden>

tests: remove spurious print in test_field_class.py

Change-Id: I147b027b835520e39148938eff1b930e28768eec
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8350
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4327. By Simon Marchi <email address hidden>

configure: enable -Wsuggest-override

Change-Id: I4d90271476258a22390ecbf3b4f7637c77cf2389
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8334
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4326. By Simon Marchi <email address hidden>

configure: enable -Wshadow-field-in-constructor

Change-Id: I049672c0fe73fd7a0cc31e4aa9f750e64ee8ad70
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8333
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4325. By Simon Marchi <email address hidden>

ctf: rename identifiers ERROR and DEBUG_PROCESS

When trying to use src/cpp-common/bt2/trace-ir.hpp, the build fails on
Windows (MinGW64) with:

      CXX viewer-connection.o
    In file included from /usr/x86_64-w64-mingw32/include/windows.h:71,
                     from /usr/x86_64-w64-mingw32/include/winsock2.h:23,
                     from /home/smarchi/src/babeltrace/src/compat/socket.h:15,
                     from /home/smarchi/src/babeltrace/src/plugins/ctf/lttng-live/viewer-connection.cpp:23:
    /home/smarchi/src/babeltrace/src/cpp-common/bt2/trace-ir.hpp:1081:9: error: expected identifier before numeric constant
     1081 | ERROR = BT_EVENT_CLASS_LOG_LEVEL_ERROR,
          | ^~~~~

This is because there is an "ERROR" macro defined in wingdi.h:

    https://github.com/mirror/mingw-w64/blob/7da5597116c5335e9a0f1154d171750bd2531baf/mingw-w64-headers/include/wingdi.h#L75

Same thing with DEBUG_PROCESS. Rename to ERROR to ERR and DEBUG_PROCESS
to DEBUG_PROC.

Change-Id: I31ed7578e84ce1bee883f0d9f121c1ea47e8a679
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8368
Reviewed-by: Philippe Proulx <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers