Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v1] Output for sockets issues cuts its names in logs
@ 2020-08-16 20:58 Alexander V. Tikhonov
  0 siblings, 0 replies; only message in thread
From: Alexander V. Tikhonov @ 2020-08-16 20:58 UTC (permalink / raw)
  To: Kirill Yukhin, Alexander Turenko; +Cc: tarantool-patches

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-16 20:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-16 20:58 [Tarantool-patches] [PATCH v1] Output for sockets issues cuts its names in logs Alexander V. Tikhonov

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