Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Kirill Yukhin <kyukhin@tarantool.org>,
	Alexander Turenko <alexander.turenko@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v1] Output for sockets issues cuts its names in logs
Date: Sun, 16 Aug 2020 23:58:43 +0300	[thread overview]
Message-ID: <6d7c812486f707fec0e8c653c8a98b893d655d1a.1597611447.git.avtikhon@tarantool.org> (raw)

Found issue in log files:

  2020-08-10 11:47:07.191 [73298] iproto sio.c:268 !> SystemError writev(1), called on fd 31, aka unix/:/Users/tntmac01.tarantool.i/tnt/test/var/001_r: Broken pipe

when it cut the socket name. The length of the socket name based on:

  src/lib/core/sio.h:enum { SERVICE_NAME_MAXLEN = 32 };
  src/lib/core/sio.c:	int name_size = 2 * SERVICE_NAME_MAXLEN;

Decided to increase multiplication of the name_size from 2 to 4.

Closes #5246
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-5246-logs-output-length
Issue: https://github.com/tarantool/tarantool/issues/5246

 src/lib/core/sio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/core/sio.c b/src/lib/core/sio.c
index 97a512eee..631f792e8 100644
--- a/src/lib/core/sio.c
+++ b/src/lib/core/sio.c
@@ -51,7 +51,7 @@ sio_socketname(int fd)
 {
 	/* Preserve errno */
 	int save_errno = errno;
-	int name_size = 2 * SERVICE_NAME_MAXLEN;
+	int name_size = 4 * SERVICE_NAME_MAXLEN;
 	char *name = static_alloc(name_size);
 	int n = snprintf(name, name_size, "fd %d", fd);
 	if (fd >= 0) {
-- 
2.17.1

                 reply	other threads:[~2020-08-16 20:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d7c812486f707fec0e8c653c8a98b893d655d1a.1597611447.git.avtikhon@tarantool.org \
    --to=avtikhon@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=kyukhin@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1] Output for sockets issues cuts its names in logs' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox