pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41297?usp=email )
Change subject: tests/osmo_io_test (io_uring): test_segmentation: Fix infinite loop in read_cb rc=0
......................................................................
tests/osmo_io_test (io_uring): test_segmentation: Fix infinite loop in read_cb rc=0
Under linux 6.17.6-arch1-1 & liburing 2.12-1, once we finish reading
from the pipe (rc=0) because the write peer was closed and data has been
consumed, we end up in some sort of infinite loop in the uring due to
re-adding a sqe in iofd_uring_handle_recv()->iofd_uring_submit_recv()
path and immediatelly consuming a cqe from the uring, without going
through the poll() loop.
The user is expected to close the fd once rc=0 is received anyway, which
was not being done in this test. Doing so successfully unregisters the
iofd and fixes the infinite loop.
Fixes: 086ee51de416ae5276b4b185c055831e16c0ef85
Change-Id: I47b5fff04c601cd08ab2d46b88336247b2193808
---
M tests/osmo_io/osmo_io_test.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
jolly: Looks good to me, but someone else must approve
diff --git a/tests/osmo_io/osmo_io_test.c b/tests/osmo_io/osmo_io_test.c
index 693c428..0812ea8 100644
--- a/tests/osmo_io/osmo_io_test.c
+++ b/tests/osmo_io/osmo_io_test.c
@@ -280,6 +280,7 @@
} else {
OSMO_ASSERT(rc == 0);
file_eof_read = true;
+ osmo_iofd_close(iofd);
}
talloc_free(msg);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41297?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I47b5fff04c601cd08ab2d46b88336247b2193808
Gerrit-Change-Number: 41297
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41300?usp=email )
Change subject: io_uring: Avoid extra reads if iofd becomes unregistered by user
......................................................................
io_uring: Avoid extra reads if iofd becomes unregistered by user
The user callback (read_cb, segmentation_cb, etc.) may decide to
unregister the iofd instead of closing it. In this scenario, we should
avoid calling the callback further until the iofd is registered again.
Change-Id: I231d5a16768b730f67089090c244bcc10dc69c3a
---
M src/core/osmo_io_uring.c
M tests/osmo_io/osmo_io_test.c
2 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
jolly: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c
index 01b8063..e4a87ad 100644
--- a/src/core/osmo_io_uring.c
+++ b/src/core/osmo_io_uring.c
@@ -359,7 +359,7 @@
}
/* Check for every iteration, because iofd might get unregistered/closed during receive function. */
- if (iofd->u.uring.read.enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
+ if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED) && iofd->u.uring.read.enabled)
iofd_handle_recv(iofd, msg, chunk, msghdr);
else
msgb_free(msg);
@@ -372,7 +372,7 @@
msghdr->msg[idx] = NULL;
}
- if (iofd->u.uring.read.enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
+ if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED) && iofd->u.uring.read.enabled)
iofd_uring_submit_recv(iofd, msghdr->action);
iofd_msghdr_free(msghdr);
diff --git a/tests/osmo_io/osmo_io_test.c b/tests/osmo_io/osmo_io_test.c
index 0812ea8..06491a7 100644
--- a/tests/osmo_io/osmo_io_test.c
+++ b/tests/osmo_io/osmo_io_test.c
@@ -280,7 +280,7 @@
} else {
OSMO_ASSERT(rc == 0);
file_eof_read = true;
- osmo_iofd_close(iofd);
+ osmo_iofd_unregister(iofd);
}
talloc_free(msg);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41300?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I231d5a16768b730f67089090c244bcc10dc69c3a
Gerrit-Change-Number: 41300
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/41300?usp=email )
Change subject: io_uring: Avoid extra reads if iofd becomes unregistered by user
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41300?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: I231d5a16768b730f67089090c244bcc10dc69c3a
Gerrit-Change-Number: 41300
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 06 Nov 2025 13:01:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria, jolly, laforge.
Hello Jenkins Builder, fixeria, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/41359?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: Add ER-GSM band support to all relevant applications
......................................................................
Add ER-GSM band support to all relevant applications
ER-GSM band expands the R-GSM band by additional 15 channels.
Mobile application allows to turn on or off the support of these 15
channels. ER-GSM band is supported by default.
Change-Id: I71baa3317df685cf6479b6e20e6ae078911aa24f
---
M doc/examples/mobile/mobile.cfg
M doc/examples/mobile/multi_ms.cfg
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/include/osmocom/bb/common/support.h
M src/host/layer23/src/common/settings.c
M src/host/layer23/src/common/support.c
M src/host/layer23/src/common/sysinfo.c
M src/host/layer23/src/misc/bcch_scan.c
M src/host/layer23/src/misc/cell_log.c
M src/host/layer23/src/mobile/gsm48_rr.c
M src/host/layer23/src/mobile/vty_interface.c
M src/shared/libosmocore/src/gsm/gsm_utils.c
M src/target/firmware/apps/rssi/main.c
13 files changed, 41 insertions(+), 24 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/59/41359/3
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/41359?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I71baa3317df685cf6479b6e20e6ae078911aa24f
Gerrit-Change-Number: 41359
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: lynxis lazus.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/libosmocore/+/41362?usp=email )
Change subject: tests/testsuite.at: fix invalid if-endif syntax
......................................................................
Patch Set 1:
(1 comment)
File tests/testsuite.at:
https://gerrit.osmocom.org/c/libosmocore/+/41362/comment/b00c708a_7b0cd54e?… :
PS1, Line 86: AT_SKIP_IF([test ! -e $abs_top_builddir/tests/msgfile/msgfile_test])
> Checking the file might be problematic, because old artifact might be still present. […]
Well, we already do this kind of checking in several projects. Checking variables is more complicated because they do not magically materialize here. You would need to define `tests/atlocal.in` like libosmocore.git does for the `sim_test`.
It's always a good practice to do `make distclean` before building the project with different configure flags, so I don't see a big problem here...
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41362?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: I81e044dc0bda4674c0d0dc46118d46816712a76c
Gerrit-Change-Number: 41362
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 06 Nov 2025 12:31:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: fixeria.
lynxis lazus has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/libosmocore/+/41362?usp=email )
Change subject: tests/testsuite.at: fix invalid if-endif syntax
......................................................................
Patch Set 1:
(1 comment)
File tests/testsuite.at:
https://gerrit.osmocom.org/c/libosmocore/+/41362/comment/89a4794f_8c41eafd?… :
PS1, Line 86: AT_SKIP_IF([test ! -e $abs_top_builddir/tests/msgfile/msgfile_test])
Checking the file might be problematic, because old artifact might be still present.
I'm trying to check if we can use the same test as used in configure.ac to check if it enabled by using the define/variable
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41362?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: I81e044dc0bda4674c0d0dc46118d46816712a76c
Gerrit-Change-Number: 41362
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 06 Nov 2025 12:27:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No