Skip to content

diag: remove debug logging from functions setting diag#11937

Merged
locker merged 1 commit intotarantool:masterfrom
nshy:gh-11840-log-fix-recursive-reconnect
Oct 17, 2025
Merged

diag: remove debug logging from functions setting diag#11937
locker merged 1 commit intotarantool:masterfrom
nshy:gh-11840-log-fix-recursive-reconnect

Conversation

@nshy
Copy link
Contributor

@nshy nshy commented Oct 15, 2025

When we fail to write a log message to syslog to try to reconnect and write it again in write_to_syslog(). If reconnecting failed and log level is debug we log error but this involves another reconnecting attempt and so on. As result Tarantool is crashed due to stack overflow.

Let's remove logging error in diag_set() and diag_add(). Is not considered useful. Debug logging produces a lot of messages, to make it helpful we are going support turning logging on by module. In this case logging all errors in diag.h will not be helpful.

Closes #11840

See also https://github.com/tarantool/tarantool-ee/pull/1499 PR required after these changes.

@nshy nshy requested a review from a team as a code owner October 15, 2025 13:50
@coveralls
Copy link

coveralls commented Oct 15, 2025

Coverage Status

coverage: 87.626% (-0.01%) from 87.639%
when pulling 9bba744 on nshy:gh-11840-log-fix-recursive-reconnect
into cfec474
on tarantool:master
.

@nshy nshy requested a review from locker October 15, 2025 14:07
@locker locker assigned nshy and unassigned locker Oct 15, 2025
@nshy nshy force-pushed the gh-11840-log-fix-recursive-reconnect branch from 17c2066 to cca18b9 Compare October 16, 2025 08:32
When we fail to write a log message to syslog to try to reconnect and
write it again in `write_to_syslog()`. If reconnecting failed and log
level is debug we log error but this involves another reconnecting
attempt and so on. As result Tarantool is crashed due to stack overflow.

Let's remove logging error in `diag_set()` and `diag_add()`. Is not
considered useful. Debug logging produces a lot of messages, to make it
helpful we are going support turning logging on by module. In this case
logging all errors in diag.h will not be helpful.

Closes tarantool#11840

NO_DOC=bugfix
@nshy nshy force-pushed the gh-11840-log-fix-recursive-reconnect branch from cca18b9 to 9bba744 Compare October 16, 2025 09:39
@nshy nshy changed the title say: do not recursively reconnect to syslog diag: remove debug logging from functions setting diag Oct 16, 2025
@nshy nshy assigned locker and unassigned nshy Oct 16, 2025
@locker locker assigned nshy and unassigned locker Oct 16, 2025
@nshy nshy added the full-ci Enables all tests for a pull request label Oct 17, 2025
@nshy nshy assigned locker and unassigned nshy Oct 17, 2025
@locker locker merged commit 9b3bec0 into tarantool:master Oct 17, 2025
59 checks passed
@nshy nshy deleted the gh-11840-log-fix-recursive-reconnect branch October 17, 2025 08:04
@locker
Copy link
Member

locker commented Oct 17, 2025

Cherry-picked to 3.2, 3.3, 3.4, 3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Enables all tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

log: Recursive call of say_default function

4 participants