pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41986?usp=email )
Change subject: logging: Also Avoid infinite loop/deadlock in log_check_level()
......................................................................
logging: Also Avoid infinite loop/deadlock in log_check_level()
A LOG() macro being called inside an already-logging path will first
call log_check_level() before calling osmo_vlogp(). Since calling
happens with the mutex hold, it has been seen to deadlock in eg.
osmo-hnbgw.
Change-Id: I0098629b335b3aa174b49fd79c33d22b04bc4785
---
M src/core/logging.c
1 file changed, 9 insertions(+), 1 deletion(-)
Approvals:
jolly: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/core/logging.c b/src/core/logging.c
index 60634af..db5433e 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -753,7 +753,8 @@
if (OSMO_UNLIKELY(log_thread_state.logging_active)) {
/* Avoid re-entrant logging: If logging to log target generates
* extra logging (eg. an error log line due to some wqueue being full),
- * we may end up in an infinite loop. */
+ * we may end up in an infinite loop, or deadlock trying to re-acquire
+ * this same lock. */
return;
}
log_thread_state.logging_active = true;
@@ -1397,6 +1398,13 @@
/* TODO: The following could/should be cached (update on config) */
+ if (OSMO_UNLIKELY(log_thread_state.logging_active)) {
+ /* Avoid re-entrant logging: If logging to log target generates
+ * extra logging (eg. an error log line due to some wqueue being full),
+ * we may end up in an infinite loop, or deadlock trying to re-acquire
+ * this same lock. */
+ return 0;
+ }
log_tgt_mutex_lock();
llist_for_each_entry(tar, &osmo_log_target_list, entry) {
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41986?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: I0098629b335b3aa174b49fd79c33d22b04bc4785
Gerrit-Change-Number: 41986
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
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: jolly, pespin, tnt.
laforge has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/osmo-e1d/+/41139?usp=email )
Change subject: Add Channel-Associated Signalling (CAS) support
......................................................................
Patch Set 5: Code-Review+1
(1 comment)
File src/mux_demux.c:
https://gerrit.osmocom.org/c/osmo-e1d/+/41139/comment/46b929be_4b90375b?usp… :
PS3, Line 397: if (!line->cas.rx.buf_valid[line->cas.rx.frame_count + 14] ||
> I do not need to iterate over all time slots, because the CAS event is already triggered in the rece […]
Acknowledged
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/41139?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Ib4f5e6ef02c9b0d1eec2a86d9c48376112805972
Gerrit-Change-Number: 41139
Gerrit-PatchSet: 5
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: tnt <tnt(a)246tNt.com>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 02 Feb 2026 08:39:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: jolly <andreas(a)eversberg.eu>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/41990?usp=email )
Change subject: logging_file: Request up to 8 iofd write buffers if available
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41990?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: Ia88b27948922d278e0f72fc2aac4b4ae88465b4d
Gerrit-Change-Number: 41990
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 02 Feb 2026 08:38:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/41989?usp=email )
Change subject: osmo_io: Allow fetching maximum value allowed by osmo_iofd_set_io_buffers()
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41989?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: Id3d8413c119eb3d9b60aa068295a59561236938c
Gerrit-Change-Number: 41989
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 02 Feb 2026 08:38:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/41988?usp=email )
Change subject: osmo_io: Remove outdated comment in API doc of osmo_iofd_set_io_buffers()
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41988?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: I9b75f3597081c6cd7e24f75f0e289b93edb3aa86
Gerrit-Change-Number: 41988
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 02 Feb 2026 08:38:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/41987?usp=email )
Change subject: osmo_io: Introduce API osmo_iofd_get_txqueue_max_length()
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41987?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: I92526aa554fc87734fae3fac0ad650d17bf52bb5
Gerrit-Change-Number: 41987
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 02 Feb 2026 08:36:43 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes