From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B6D37430407 for ; Sun, 16 Aug 2020 23:58:45 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Sun, 16 Aug 2020 23:58:43 +0300 Message-Id: <6d7c812486f707fec0e8c653c8a98b893d655d1a.1597611447.git.avtikhon@tarantool.org> Subject: [Tarantool-patches] [PATCH v1] Output for sockets issues cuts its names in logs List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin , Alexander Turenko Cc: tarantool-patches@dev.tarantool.org 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