Attention is currently required from: osmith, pespin.
Hello Jenkins Builder, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-uecups/+/40788?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by osmith, Verified+1 by Jenkins Builder
Change subject: gtp_endpoint: Avoid deadlocks logging while thread is cancelled
......................................................................
gtp_endpoint: Avoid deadlocks logging while thread is cancelled
We cannot garantee that LOGP will not end up calling a syscall which can
be a cancellation point. Since the syscall will be probably called while
having the logging mutex locked, an eventual cancellation of the thread
would leave the logging mutex locked forever, hence making all other
threads deadlock as soon as they try to write anything to the log.
Similar to what's already done in tun_device_thread().
Change-Id: I1e141175440402a7db34f3d246104c6ea38031fb
---
M daemon/gtp_endpoint.c
1 file changed, 25 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-uecups refs/changes/88/40788/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-uecups/+/40788?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-uecups
Gerrit-Branch: master
Gerrit-Change-Id: I1e141175440402a7db34f3d246104c6ea38031fb
Gerrit-Change-Number: 40788
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: jolly, laforge.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40725?usp=email )
Change subject: Automatically increase io_uring, if too small.
......................................................................
Patch Set 6:
(2 comments)
Patchset:
PS6:
> Due to the comments I wrote I still personally believe this is shooting us in the foot, it's not the […]
More thoughts on this: With my proposal where we queue iofds waiting for an SQE we could end up in some sort of starvation or even deadlock, because we may end up with tons of fds/sockets with pending READs and nothing external (eg. a packet arriving) triggering a READ from it, leaving outside from the reading set some socket which may already contain some data to be read.
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/bf6415a1_10d4d758?… :
PS6, Line 172: sqe = io_uring_get_sqe(&g_ring->ring);
> In the end, they are all empty msgb's waiting for some incoming data
Aren't we using it from read()? Then it's not simply empty msgbs waiting for packets, but buffers being filled from an in-order stream of bytes which needs to be kept in order when usbmitting the msgbs to upper layers (or when resegmenting internally).
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40725?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: Id9230146acc8d54bfd44834e783c31b37bd64bca
Gerrit-Change-Number: 40725
Gerrit-PatchSet: 6
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 31 Jul 2025 15:00:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-uecups/+/40794?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: cups_client: Add cups_client_alloc/free functions
......................................................................
cups_client: Add cups_client_alloc/free functions
This makes it easier to figure out where lifecycle happens, and makes it
obvious now that some fields are not being properly destroyed. This will
be fixed in a follow-up patch.
Change-Id: Ic3145ba2a6ecd5d165a024947f8ff7d9ab397e54
---
M daemon/cups_client.c
1 file changed, 40 insertions(+), 20 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/daemon/cups_client.c b/daemon/cups_client.c
index 868480c..f85ad4a 100644
--- a/daemon/cups_client.c
+++ b/daemon/cups_client.c
@@ -611,24 +611,53 @@
return rc;
}
+static void cups_client_free(struct cups_client *cc);
+
static int cups_client_closed_cb(struct osmo_stream_srv *conn)
{
struct cups_client *cc = osmo_stream_srv_get_data(conn);
- struct gtp_daemon *d = cc->d;
- struct subprocess *p, *p2;
LOGCC(cc, LOGL_INFO, "UECUPS connection lost\n");
-
- /* kill + forget about all subprocesses of this client */
- /* We need no locking here as the subprocess list is only used from the main thread */
- llist_for_each_entry_safe(p, p2, &d->subprocesses, list) {
- if (p->cups_client == cc)
- subprocess_destroy(p, SIGKILL);
- }
- llist_del(&cc->list);
+ cups_client_free(cc);
return 0;
}
+static struct cups_client *cups_client_alloc(struct gtp_daemon *d, struct osmo_stream_srv_link *link, int fd)
+{
+ struct cups_client *cc;
+
+ cc = talloc_zero(d, struct cups_client);
+ if (!cc)
+ return NULL;
+
+ cc->d = d;
+ osmo_sock_get_name_buf(cc->sockname, sizeof(cc->sockname), fd);
+ cc->srv = osmo_stream_srv_create(cc, link, fd, cups_client_read_cb, cups_client_closed_cb, cc);
+ if (!cc->srv) {
+ talloc_free(cc);
+ return NULL;
+ }
+
+ llist_add_tail(&cc->list, &d->cups_clients);
+ return cc;
+}
+
+static void cups_client_free(struct cups_client *cc)
+{
+ struct subprocess *p, *p2;
+
+ if (!cc)
+ return;
+
+ /* kill + forget about all subprocesses of this client */
+ /* We need no locking here as the subprocess list is only used from the main thread */
+ llist_for_each_entry_safe(p, p2, &cc->d->subprocesses, list) {
+ if (p->cups_client == cc)
+ subprocess_destroy(p, SIGKILL);
+ }
+
+ llist_del(&cc->list);
+}
/* the control/user plane separation server bind/accept fd */
static int cups_accept_cb(struct osmo_stream_srv_link *link, int fd)
@@ -636,21 +665,12 @@
struct gtp_daemon *d = osmo_stream_srv_link_get_data(link);
struct cups_client *cc;
- cc = talloc_zero(d, struct cups_client);
+ cc = cups_client_alloc(d, link, fd);
if (!cc)
return -1;
- cc->d = d;
- osmo_sock_get_name_buf(cc->sockname, sizeof(cc->sockname), fd);
- cc->srv = osmo_stream_srv_create(cc, link, fd, cups_client_read_cb, cups_client_closed_cb, cc);
- if (!cc->srv) {
- talloc_free(cc);
- return -1;
- }
LOGCC(cc, LOGL_INFO, "Accepted new UECUPS connection\n");
- llist_add_tail(&cc->list, &d->cups_clients);
-
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-uecups/+/40794?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-uecups
Gerrit-Branch: master
Gerrit-Change-Id: Ic3145ba2a6ecd5d165a024947f8ff7d9ab397e54
Gerrit-Change-Number: 40794
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-uecups/+/40793?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: cups_client: Log conn lost before tear down subprocesses
......................................................................
cups_client: Log conn lost before tear down subprocesses
Change-Id: I32b56fddc32b95cf15c30b2c9cfc272a8678857b
---
M daemon/cups_client.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
osmith: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/daemon/cups_client.c b/daemon/cups_client.c
index b72ebd7..868480c 100644
--- a/daemon/cups_client.c
+++ b/daemon/cups_client.c
@@ -617,14 +617,14 @@
struct gtp_daemon *d = cc->d;
struct subprocess *p, *p2;
+ LOGCC(cc, LOGL_INFO, "UECUPS connection lost\n");
+
/* kill + forget about all subprocesses of this client */
/* We need no locking here as the subprocess list is only used from the main thread */
llist_for_each_entry_safe(p, p2, &d->subprocesses, list) {
if (p->cups_client == cc)
subprocess_destroy(p, SIGKILL);
}
-
- LOGCC(cc, LOGL_INFO, "UECUPS connection lost\n");
llist_del(&cc->list);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-uecups/+/40793?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-uecups
Gerrit-Branch: master
Gerrit-Change-Id: I32b56fddc32b95cf15c30b2c9cfc272a8678857b
Gerrit-Change-Number: 40793
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-uecups/+/40795?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: cups_client: Fix memleak during conn closed
......................................................................
cups_client: Fix memleak during conn closed
Change-Id: Ic4d4da7ecbf5a7903a46558482b66cdc22767c4b
---
M daemon/cups_client.c
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
diff --git a/daemon/cups_client.c b/daemon/cups_client.c
index f85ad4a..ae17595 100644
--- a/daemon/cups_client.c
+++ b/daemon/cups_client.c
@@ -657,6 +657,9 @@
}
llist_del(&cc->list);
+ if (cc->srv)
+ osmo_stream_srv_destroy(cc->srv);
+ talloc_free(cc);
}
/* the control/user plane separation server bind/accept fd */
--
To view, visit https://gerrit.osmocom.org/c/osmo-uecups/+/40795?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-uecups
Gerrit-Branch: master
Gerrit-Change-Id: Ic4d4da7ecbf5a7903a46558482b66cdc22767c4b
Gerrit-Change-Number: 40795
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, pespin.
Hello Jenkins Builder, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-uecups/+/40793?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: cups_client: Log conn lost before tear down subprocesses
......................................................................
cups_client: Log conn lost before tear down subprocesses
Change-Id: I32b56fddc32b95cf15c30b2c9cfc272a8678857b
---
M daemon/cups_client.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-uecups refs/changes/93/40793/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-uecups/+/40793?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-uecups
Gerrit-Branch: master
Gerrit-Change-Id: I32b56fddc32b95cf15c30b2c9cfc272a8678857b
Gerrit-Change-Number: 40793
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>