Attention is currently required from: fixeria, osmith.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/docker-playground/+/41778?usp=email )
Change subject: ttcn3-bts-test: bpftrace: filter by executable name
......................................................................
Patch Set 2:
(1 comment)
File ttcn3-bts-test/bpftrace/ksys_write_delay.bt:
https://gerrit.osmocom.org/c/docker-playground/+/41778/comment/09ad4edc_c90… :
PS2, Line 28: kretprobe:ksys_write / comm == str($1) && @start[tid] /
> I also thought so, but now I am not sure anymore. […]
AFAIK, TIDs are considered globally unique like PID values. They of course also wrap eventually, just like PIDs. So if you have one long-running thread, and lots of threads respawning all the time, eventually it will probably wrap.
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/41778?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I04c2e36806534a8ca650733bacf521ea57950692
Gerrit-Change-Number: 41778
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 13 Jan 2026 09:40:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, osmith.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/docker-playground/+/41778?usp=email )
Change subject: ttcn3-bts-test: bpftrace: filter by executable name
......................................................................
Patch Set 2:
(1 comment)
File ttcn3-bts-test/bpftrace/ksys_write_delay.bt:
https://gerrit.osmocom.org/c/docker-playground/+/41778/comment/c0e8de4a_ac8… :
PS2, Line 28: kretprobe:ksys_write / comm == str($1) && @start[tid] /
> I also thought so, but now I am not sure anymore. […]
AFAIR I read that it should be unique: "the BPF kernel program will get the PID as seen from the init namespace.".
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/41778?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I04c2e36806534a8ca650733bacf521ea57950692
Gerrit-Change-Number: 41778
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 13 Jan 2026 09:16:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith, pespin.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/docker-playground/+/41778?usp=email )
Change subject: ttcn3-bts-test: bpftrace: filter by executable name
......................................................................
Patch Set 2:
(1 comment)
File ttcn3-bts-test/bpftrace/ksys_write_delay.bt:
https://gerrit.osmocom.org/c/docker-playground/+/41778/comment/bf230abe_efb… :
PS2, Line 28: kretprobe:ksys_write / comm == str($1) && @start[tid] /
> This change is not needed, since the other condition can only be true already when comm == str($1)
I also thought so, but now I am not sure anymore. Without proper pid filtering `kretprobe:ksys_write` triggers for all processes, not only for osmo-bts-trx. And there's a possibility that it triggers for another process with the same `tid` (thread ID) earlier than for osmo-bts. Unless thread IDs are guaranteed to be globally unique, are they?
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/41778?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I04c2e36806534a8ca650733bacf521ea57950692
Gerrit-Change-Number: 41778
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 13 Jan 2026 08:45:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, laforge, neels, pespin.
Hello Jenkins Builder, fixeria, neels, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
to look at the new patch set (#7).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: Add Emscripten build support and JS callback logging backend
......................................................................
Add Emscripten build support and JS callback logging backend
This change enables building libosmocore for sandboxed, non-POSIX environments such as WebAssembly targets produced via the Emscripten toolchain.
In such environments, common OS facilities assumed by existing build and platform detection logic are unavailable, which currently prevents libosmocore from being built without targeted, build-time adjustments.
As part of this groundwork, a minimal callback-based logging hook is introduced.
When building for Emscripten, this hook allows forwarding log messages to an external environment via a user-provided JS callback. For all other build targets, the hook resolves to a no-op implementation and does not affect existing logging behavior.
No new runtime behavior or protocol changes are introduced. All changes are limited to build-time and platform-specific paths and are only active when targeting Emscripten. Native builds and existing deployment scenarios remain unaffected.
Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
---
M configure.ac
M include/osmocom/core/logging.h
M src/core/Makefile.am
M src/core/libosmocore.map
A src/core/logging_emscripten.c
M src/core/netdev.c
M src/core/osmo_io_internal.h
M src/core/socket.c
M src/core/stats_tcp.c
M src/core/tun.c
M src/vty/Makefile.am
M src/vty/logging_vty.c
A src/vty/telnet_interface_dummy.c
13 files changed, 263 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/41813/7
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
Gerrit-Change-Number: 41813
Gerrit-PatchSet: 7
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria, laforge, neels, pespin.
Timur Davydov has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email )
Change subject: Add Emscripten build support and JS callback logging backend
......................................................................
Patch Set 6:
(1 comment)
Patchset:
PS5:
> While I'm personally not a big believer in the "let's run SDR software and/or telecom protocol stack […]
Thanks a lot for the thorough review and for the positive assessment of the patch cleanliness — really appreciate it!
I get the skepticism about browser-based SDR/telecom stacks — it's niche and has clear trade-offs.
Still, I see value in it for education, quick prototyping, client-side analysis, and zero-setup experimentation.
**On the CI side:**
I fully agree — some form of build verification is essential to prevent regressions.
Nightly testing of master (with email notifications on failure) seems like the best low-impact compromise. It avoids bloating Gerrit verification times while still catching issues early.
A quick note on the current Emscripten build setup:
To make libosmocore buildable under Emscripten/WebAssembly:
- We use Emscripten as the toolchain.
- The main dependency issue is talloc (from Samba), which lacks official Emscripten support and a static-library-only mode (needed for WASM).
- Forking talloc long-term with patches is undesirable (upstream divergence + extra maintenance).
Instead, I apply the necessary adjustments at build time using a custom Conan 2 recipe for talloc — this keeps upstream sources untouched while enabling reproducible static builds for Emscripten.
I also prepared a small auxiliary shell script locally (for development/testing only) that:
- sets up a Python venv,
- installs Conan 2,
- builds talloc via the Emscripten recipe,
- then compiles libosmocore with the required flags.
Clarification: neither the Conan recipe nor the script are included in this patchset.
Happy to share them separately if useful for CI setup.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
Gerrit-Change-Number: 41813
Gerrit-PatchSet: 6
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 13 Jan 2026 01:25:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: fixeria, neels, pespin.
Timur Davydov has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email )
Change subject: Add Emscripten build support and JS callback logging backend
......................................................................
Patch Set 5:
(15 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/c8fae8a5_871cf07b?… :
PS5, Line 7: Add Emscripten build support and JS callback logging backend
> Why is this needed? How is this used? What's the context? I'm missing a good description here for a […]
Thanks for pointing this out.
The purpose of this patch is to make libosmocore usable in sandboxed, non-POSIX environments, specifically WebAssembly targets built with the Emscripten toolchain.
In such environments, a number of assumptions made by libosmocore (process model, availability of standard OS interfaces, and I/O mechanisms) do not hold, which currently prevents the library from being built and used at all. This patch introduces the minimal platform-specific adjustments required to enable successful builds and basic runtime integration in that context.
The intended use case is running Osmocom protocol and control components inside a WebAssembly runtime, where interaction with the outside world is mediated by the host environment rather than direct OS access.
All changes are limited to Emscripten-specific build paths and are inactive for native targets, leaving existing deployments and behavior unchanged.
I will update the commit message to better reflect this context.
File include/osmocom/core/logging.h:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/61a177af_16eba50d?… :
PS5, Line 285: LOG_TGT_TYPE_WEB, /*!< Web logging */
> AFAIU this is not "web generic" but "emscripten" specific, so let's please rename to something more […]
Thanks for the clarification. You are right — the current naming suggests a generic “web” abstraction, while in practice this mechanism is only enabled for Emscripten builds.
I will rename the API accordingly and update the commit message to better explain the intended scope and usage. I will send an updated patch shortly.
File src/core/netdev.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/9b4fa443_a0750960?… :
PS5, Line 67: #if (!EMBEDDED) && !defined(__EMSCRIPTEN__)
> I'd say better do this logic inside configure. […]
Fully agree, that's cleaner and more in line with the rest of the library.
I went ahead and added a new configure option `ENABLE_NETDEV` in configure.ac.
For EMBEDDED and EMSCRIPTEN builds it is explicitly set to `false`
Right now it fails to compile
File src/core/osmo_io_internal.h:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/3e3463c3_a1fc752c?… :
PS5, Line 7: HAVE_LIBSCTP
> Indeed config.h should be at the top.
Thanks for catching this!
You're right — I completely missed that config.h is included after this block
File src/core/serial.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/e06b29b5_62274514?… :
PS5, Line 27: #if !defined(__EMSCRIPTEN__)
> Again, I'd say better add a HAVE_SERIAL or alike in configure.ac. […]
Thanks for the note!
After taking a closer look at configure.ac, I noticed the project already uses `ENABLE_SERIAL` to conditionally skip compiling the serial.c file.
The file compiles without issues, but in emscripten/web environments there's simply no need for serial support at all.
File src/core/socket.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/db2155dc_fb4f7485?… :
PS5, Line 2050: #ifdef HAVE_LIBSCTP
> missing explanation for this change. It may be a separate patch.
Explained in the comment for the function `osmo_sock_multiaddr_get_ip_and_port`
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/1dc18b36_a3750508?… :
PS5, Line 1928: #ifdef HAVE_LIBSCTP
> Why this change? I'm lacking any rationale here. Also, looks like this may be a separate patch.
About functions `osmo_sock_multiaddr_get_ip_and_port`, `osmo_multiaddr_ip_and_port_snprintf` and `osmo_sock_multiaddr_get_name_buf`:
These functions were previously conditionally compiled only under `HAVE_LIBSCTP`. However, `libosmo-netif` uses some of them without the same `HAVE_LIBSCTP` guards, leading to link failures when libsctp is disabled.
Additionally, the implementations already included a fallback to legacy (single-address) behavior, so they do not strictly depend on SCTP/multi-homing features.
Refactoring done as follows:
- `osmo_sock_multiaddr_get_ip_and_port` was slightly adjusted for better fallback handling.
- `osmo_multiaddr_ip_and_port_snprintf` and `osmo_sock_multiaddr_get_name_buf` were moved outside the `HAVE_LIBSCTP` conditional block, as they do not depend on libsctp at all.
File src/vty/Makefile.am:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/b1057c93_11cc95e4?… :
PS5, Line 36: libosmovty_la_SOURCES += telnet_interface_dummy.c
> This for sure also needs an explanation.
In Emscripten there are no sockets so `telnet_interface.c` fails to compile.
However, completely excluding the file from the build leads to link errors (undefined references to the telnet functions).
To resolve this, I added a new file `telnet_interface_dummy.c` with stub/empty implementations of the required functions.
I considered adding many `#ifdef __EMSCRIPTEN__` blocks directly inside telnet_interface.c, but decided that separate dummy stubs are the cleaner approach.
File src/vty/logging_vty.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/69d27735_c443c3fd?… :
PS5, Line 907: #if !defined(__EMSCRIPTEN__)
> this also needs explanation.
The conditional compilation here was added by mistake — it's not needed in this place.
This spot was accidentally affected when I removed the file logging parts (Emscripten only emulates files via IndexedDB with no native operations, so file logging isn't usable anyway).
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/8d31850a_a69015c0?… :
PS5, Line 1038: DEFUN(cfg_log_web, cfg_log_web_cmd,
> #if defined(__EMSCRIPTEN__)
Thanks — added conditional compilation `#if defined(__EMSCRIPTEN__)`
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/d7daf5db_e7550d3b?… :
PS5, Line 1047: vty_out(vty, "%% Unable to create WEB log for %s", VTY_NEWLINE);
> this string end looks wrong
Thanks, fixed
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/35256656_e28f4c34?… :
PS5, Line 1067: vty_out(vty, "%% Unable to find WEB log target for %s", VTY_NEWLINE);
> this string end looks wrong
Thanks, fixed
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/446e4480_df154fdc?… :
PS5, Line 1130:
> No need for a space here.
Thanks, fixed
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/f04400fe_0e2783cd?… :
PS5, Line 1361: install_lib_element(CONFIG_NODE, &cfg_log_web_cmd);
: install_lib_element(CONFIG_NODE, &cfg_no_log_web_cmd);
> I assume these commands are only relevant for emscripten? […]
Thanks — added conditional compilation `#if defined(__EMSCRIPTEN__)`
File src/vty/telnet_interface_dummy.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/6ab07699_cea1ec23?… :
PS5, Line 18: #include <sys/socket.h>
: #include <netinet/in.h>
: #include <errno.h>
: #include <stdlib.h>
: #include <stdio.h>
: #include <string.h>
: #i
> (Not critical) Most if the includes are not needed here and can be removed?
Thanks for pointing that out!
You're right — many of the includes here are indeed not needed anymore (leftover from copy-paste)
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
Gerrit-Change-Number: 41813
Gerrit-PatchSet: 5
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 13 Jan 2026 00:40:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: Timur Davydov, neels, pespin.
Hello Jenkins Builder, fixeria, neels, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed:
Code-Review-1 by pespin, Verified+1 by Jenkins Builder
Change subject: Add Emscripten build support and JS callback logging backend
......................................................................
Add Emscripten build support and JS callback logging backend
This change enables building libosmocore for sandboxed, non-POSIX environments such as WebAssembly targets produced via the Emscripten toolchain.
In such environments, common OS facilities assumed by existing build and platform detection logic are unavailable, which currently prevents libosmocore from being built without targeted, build-time adjustments.
As part of this groundwork, a minimal callback-based logging hook is introduced.
When building for Emscripten, this hook allows forwarding log messages to an external environment via a user-provided JS callback. For all other build targets, the hook resolves to a no-op implementation and does not affect existing logging behavior.
No new runtime behavior or protocol changes are introduced. All changes are limited to build-time and platform-specific paths and are only active when targeting Emscripten. Native builds and existing deployment scenarios remain unaffected.
Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
---
M configure.ac
M include/osmocom/core/logging.h
M src/core/Makefile.am
M src/core/libosmocore.map
A src/core/logging_emscripten.c
M src/core/netdev.c
M src/core/osmo_io_internal.h
M src/core/socket.c
M src/core/stats_tcp.c
M src/core/tun.c
M src/vty/Makefile.am
M src/vty/logging_vty.c
A src/vty/telnet_interface_dummy.c
13 files changed, 276 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/41813/6
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
Gerrit-Change-Number: 41813
Gerrit-PatchSet: 6
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com>