From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id ABA1B6EC56; Tue, 4 May 2021 19:03:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org ABA1B6EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1620144221; bh=wh5zL521Sh7zm/lmJwAqXISI8sE/ZBtmNgvFPjoV4gY=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=RUJurY0agmZSMIrhxvgpnIBkOR1HdUY3dY+5/SEg5vNncZjBc5YkBKOBzzR1PEhMi 61PykD2U9RHZRY2czwnzJ/cjhTkPJlQBoR2Mge/mGWiREjv5tID7L5Yw9wZg9ZaPAV EFcZ8Y4S82+0Q7KjCZ9lJeAHCST3bISPryvP3iVE= Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 057AF6EC56 for ; Tue, 4 May 2021 19:01:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 057AF6EC56 Received: by mail-lj1-f179.google.com with SMTP id w4so3122468ljw.9 for ; Tue, 04 May 2021 09:01:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WhVT4pyiDGFyM3pTHCWZ0OyXoXQHgrQDkRS0rw7ilgA=; b=d+zT/Y4YR5hVdt1v9TFIL+H1Ckh7LpHmd55KT8tHdQrjBesjUGi2AdCL1sBiRw4d1Z j6Qixfd+P2ZCuiuRg028PzDSGfLVJdeTm2fVNzxUgzAWPo7sSb1EgJSuM4i5ngRWnPlf B6plSL7MlXYWYf9TVgfSIMZR+mNWNcxHdsRuac9asBrk1y71Wgnzqj6IJ7mxlp/ChrYE ihOAwlFhAWfF9ebP1AnJOlYFqBZwB2/eJHToL5kFl3HidxjPB7al+EwzbxoZfAQCoacQ KbGFSri6h42oTion+w99KJ3/IrjiKN5WNNEUaoA4o//k2RVKU+3RT+EJlHn924QYz8Il evTA== X-Gm-Message-State: AOAM530I+sqKiz42DMfNJiVGXB7FF52ldQIcnKpNyslRb2b8gUtwEv5K 70t4VDg+YcaVcRP75+3nMRMAcCRye8o= X-Google-Smtp-Source: ABdhPJxI4pSEugIGr+y34NMv6XzRZD1222wM3Q1dB5Qw3UNZ06+3OujVKFz1JiuwZXAi1Pk9NVyYnQ== X-Received: by 2002:a2e:8891:: with SMTP id k17mr18141391lji.11.1620144115968; Tue, 04 May 2021 09:01:55 -0700 (PDT) Received: from grain.localdomain ([5.18.199.94]) by smtp.gmail.com with ESMTPSA id q12sm298366lfu.59.2021.05.04.09.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 May 2021 09:01:54 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id EB42C560097; Tue, 4 May 2021 18:58:20 +0300 (MSK) To: tml Date: Tue, 4 May 2021 18:58:09 +0300 Message-Id: <20210504155819.290874-1-gorcunov@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v3 00/10] fix say_x format and rework fibers X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" We've been notified that if tarantool instance is running for long time slice the logger start to print weird lines such as | main/-244760339/cartridge.failover.task I> Instance state changed where fiber's ID represented as a negative number. Eventually we discovered a few issues - a bunch of say_x called with wrong specificators but compiler simply ignored it - fiber IDs are wrapping and this is inconvenient - CFORMAT simply doesn't work In the series we fix all these issues. Note that using simplified form for unsigned arguments such as "%llu", (long long)(uint64_t) is pretty fine becase signed/unsiged values are counterpart of each other guaranteed by standart. issue https://github.com/tarantool/tarantool/issues/5846 branch gorcunov/gh-5846-fid-name-3 Cyrill Gorcunov (10): fiber: use uint64_t for fiber IDs popen: fix say_x format arguments raft: fix say_x arguments box/error: fix argument for CustomError xlog: fix say_x format box/vynil: fix say_x format txn: fix say_x format limbo: fix say_x format wal: fix say_x format say: fix CFORMAT specification changelogs/unreleased/gh-5846-cformat.md | 12 +++++++++ changelogs/unreleased/gh-5846-fiber-id.md | 4 +++ src/box/error.cc | 2 +- src/box/txn.c | 3 ++- src/box/txn_limbo.c | 2 +- src/box/vy_scheduler.c | 2 +- src/box/wal.c | 17 ++++++------ src/box/xlog.c | 4 +-- src/lib/core/fiber.c | 30 ++++++++++----------- src/lib/core/fiber.h | 8 +++--- src/lib/core/popen.c | 4 +-- src/lib/core/say.c | 8 +++--- src/lib/core/say.h | 2 +- src/lib/raft/raft.c | 5 ++-- src/lua/fiber.c | 33 ++++++++++++----------- 15 files changed, 79 insertions(+), 57 deletions(-) create mode 100644 changelogs/unreleased/gh-5846-cformat.md create mode 100644 changelogs/unreleased/gh-5846-fiber-id.md base-commit: 4500547d7a177c0b49bff35c922286b4f21c8719 -- 2.30.2