Skip to content

Commit 0f34c14

Browse files
TApplencourtclaude
andcommitted
ci: build the 2.16 stack, which needs no work-around patches
THAPI records raw bytes as lttng-ust 2.16 BLOB fields, so the two halves of the old work-around are gone: `55cca69.diff`, which made lttng-ust write an array of text in full rather than stopping at the first NUL, and babeltrace's null-character patch, which let the reader run past that NUL. Neither is wanted now, and the babeltrace one is actively wrong on a blob-era build -- it makes a genuine ctf_string read past its terminator. lttng-tools and babeltrace still come from the ANL branches, since those carry the pause/resume commands and the archive component class that upstream does not have; they are simply rebased onto 2.16.0 and 2.1.2. The anl-ms3-v2.1.2 branch also now carries the fix for the crash behind `# TODO use anl-ms3-v2.1.2 when ctf.archive.reader doesn't segfault anymore`, so that comment goes with it. babeltrace_thapi resolved `source.ctf.lttng-archive` on every invocation, which fails on a build without archive support: that component class is an ANL addition, and `~archive` links a plain babeltrace2. Resolve it only when a graph names it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 1d147b9 commit 0f34c14

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

‎.github/actions/setup-thapi/action.yml‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,8 @@ runs:
6666
shell: bash
6767
if: steps.efficios_dep.outputs.cache-hit != 'true'
6868
run: |
69-
git clone https://github.com/lttng/lttng-ust -b v2.14.0
69+
git clone https://github.com/lttng/lttng-ust -b v2.16.0
7070
cd lttng-ust
71-
wget https://raw.githubusercontent.com/argonne-lcf/THAPI-spack/a57eb4fa1b2b8621bb0e83a6ec25e48e3a761d15/packages/lttng-ust/55cca69.diff
72-
patch -p1 < 55cca69.diff
7371
./bootstrap
7472
./configure --disable-man-pages --prefix=$HOME/efficios_dep/
7573
make -j$(nproc)
@@ -78,7 +76,7 @@ runs:
7876
shell: bash
7977
if: steps.efficios_dep.outputs.cache-hit != 'true'
8078
run: |
81-
git clone https://github.com/argonne-lcf/lttng-tools.git -b anl-v2.14.0
79+
git clone https://github.com/argonne-lcf/lttng-tools.git -b anl-v2.16.0
8280
cd lttng-tools
8381
./bootstrap
8482
./configure --disable-man-pages --disable-bin-lttng-crash --prefix=$HOME/efficios_dep
@@ -88,15 +86,11 @@ runs:
8886
shell: bash
8987
if: steps.efficios_dep.outputs.cache-hit != 'true'
9088
run: |
91-
git clone https://github.com/argonne-lcf/babeltrace.git -b anl-ms3
92-
# TODO use anl-ms3-v2.1.2 when ctf.archive.reader doesn't segfault anymore
89+
git clone https://github.com/argonne-lcf/babeltrace.git -b anl-ms3-v2.1.2
9390
cd babeltrace
9491
# Fix include path
9592
wget https://raw.githubusercontent.com/argonne-lcf/THAPI/4418916620496fd66cde0b3d5e241bed0a4c18a3/.github/workflows/bt_makefile.patch
9693
patch -p1 < bt_makefile.patch
97-
# Null char
98-
wget https://raw.githubusercontent.com/argonne-lcf/THAPI-spack/ddc9a12a498331a7c312941df0d4e7078d03ae93/packages/babeltrace2/0001-Prevent-null-character-from-stopping-string-decoding.patch
99-
patch -p1 < 0001-Prevent-null-character-from-stopping-string-decoding.patch
10094
./bootstrap
10195
./configure --disable-man-pages --prefix=$HOME/efficios_dep
10296
make -j$(nproc)

‎utils/babeltrace_thapi.in‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,21 @@ def get_components(names)
132132
components_classes = {
133133
'source.ctf.fs' => BT2::BTPlugin.find('ctf').get_source_component_class_by_name('fs'),
134134
'source.ctf.lttng_live' => BT2::BTPlugin.find('ctf').get_source_component_class_by_name('lttng-live'),
135-
'source.ctf.lttng_archive' => BT2::BTPlugin.find('ctf').get_source_component_class_by_name('lttng-archive'),
136135
'filter.utils.muxer' => BT2::BTPlugin.find('utils').get_filter_component_class_by_name('muxer'),
137136
'sink.text.pretty' => BT2::BTPlugin.find('text').get_sink_component_class_by_name('pretty'),
138137
'sink.ctf.fs' => BT2::BTPlugin.find('ctf').get_sink_component_class_by_name('fs'),
139138
'sink.utils.dummy' => BT2::BTPlugin.find('utils').get_sink_component_class_by_name('dummy'),
140139
}
141140

141+
# `lttng-archive` is an ANL addition rather than an upstream component class,
142+
# and a build without archive support links a plain babeltrace2 that does not
143+
# have it. Resolve it only when a graph actually names it, so every other
144+
# mode keeps working.
145+
if names.include?('source.ctf.lttng_archive')
146+
components_classes['source.ctf.lttng_archive'] =
147+
BT2::BTPlugin.find('ctf').get_source_component_class_by_name('lttng-archive')
148+
end
149+
142150
# THAPI components
143151
thapi_plugins = BT2::BTPlugin.find_all_from_dir(File.join('@prefix@', 'lib', '@PACKAGE@', 'bt2'))
144152
thapi_plugins.map do |pg|

0 commit comments

Comments
 (0)