Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXmuB-0002Pt-QY for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Dec 2018 12:49:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gXmu8-00043e-TR for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Dec 2018 12:49:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXmu8-00043B-MZ for pgsql-hackers@lists.postgresql.org; Fri, 14 Dec 2018 12:49:20 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXmu5-0000UR-7h for pgsql-hackers@lists.postgresql.org; Fri, 14 Dec 2018 12:49:19 +0000 Received: by mail-wm1-x331.google.com with SMTP id m1so5579627wml.2 for ; Fri, 14 Dec 2018 04:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/Gy4dscfPeB8MFxsfGrSfkYnE7ZM27ERhO2D8QEgahc=; b=DnIq4FFbqoPduCmYr+jS2k2ojM7X+u1hI11D08SrsDnEK6JqZhYeDTx7kIjPv+0RA1 Joe0039rp4OwtotBdS9XMJ3n0nMzPkPOFuLGhfBzSSzCqGo5dBBLO6ksubpxj71T9XXk aKIa8TZW5x+2HlBpR8QyIiWFDXBCzoow2IRQKj6djfD5lBrrSUTDTUPHjDbKOYjujlp2 cqkB1JL/cfan61csWhjJhS0WSchD5upmJuce55o1Q4v71K/0/tqom84/32j9vQVsVKaN /Kiph43hfYLCmH/cEDoT8ysUNfliWla6HMjdetNZdMOaC020w0rOfX4bwsYp6+Me9itx RFVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/Gy4dscfPeB8MFxsfGrSfkYnE7ZM27ERhO2D8QEgahc=; b=YxZ0fSCOhtgoRPIx8c4Ng71VtfH1FZAu8YMwntxv7jDQsY5/0HNLQb7r0rzsmgfUZ/ pT+vUSxCEd16q2wqsmGvRv/MBIghkrDlkUfdKDL8MmotBN2rs6+7o/zbsG5USmH6eNwM v8c7Alvco/SY50lmQGUbrtqjKRBz9zB8dH68x51hjvnjjamUTzAjzQdcJjHQ84wtyY+9 edoC0rC3q2+Z9Kz1QbQ06/HG0iOHazjE4cbRzp0L68nAKL7VObBKlyWe4Dw4/NywDhmX Rjwe+lxTO6F9+ukFzShvIdO+Pd3fEJ6vf18uKrkgLqOF7Kf6UG8wamr/X6rGlU1uMVTt wnjQ== X-Gm-Message-State: AA+aEWZ2vqH9vVUmh8UgjiCn7ZWMGV71NpdNJTClFWcPMKxbOLEumvn1 bXLuHVp801WKS1klX3WplRQqiYn070maCMLmh/SU+OJ0iYT1u0G8SXyw6xNcqwp+YpIg49XDW2p +L3DfJKIFx/mIADsiyAer3IJVxXaRx/O7/jHBxRop1/t0QDWxt1icBjuLnUoATs0DyVjbIK58aE bYfdQYu6+O1ErZNycuMDHIaq+e X-Google-Smtp-Source: AFSGD/UYuKtkQW/dt8FXueB/joabVCJc41wP1D96n7KChtyb7Hjc/ZPzQyaFTTWuqodFYSdt8VlFDw== X-Received: by 2002:a1c:f319:: with SMTP id q25mr3145985wmq.151.1544791755008; Fri, 14 Dec 2018 04:49:15 -0800 (PST) Received: from [10.137.2.21] (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id h17sm2860369wrt.59.2018.12.14.04.49.13 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 04:49:14 -0800 (PST) Subject: Re: valgrind issues on Fedora 28 To: Tom Lane Cc: Alvaro Herrera , pgsql-hackers@lists.postgresql.org References: <20181106173527.omm63tiaguxft7mg@alvherre.pgsql> <23c8e539-6777-1793-0939-12e73cb98314@2ndquadrant.com> <9063c043-83cd-b439-a928-622a743edd2c@2ndquadrant.com> <16353.1544760625@sss.pgh.pa.us> From: Tomas Vondra Message-ID: <4721dbaf-b922-9e30-e635-00f06512edac@2ndquadrant.com> Date: Fri, 14 Dec 2018 13:49:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <16353.1544760625@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/14/18 5:10 AM, Tom Lane wrote: > Tomas Vondra writes: >> On 11/8/18 1:07 PM, Tomas Vondra wrote: >>> Not sure what to do about this - maybe we should wildcard this first >>> frame, to accept all wcsnlen variants. Opinions? > >> I've committed this with the first frame wirldcarded, and backpatched it >> all the way back to 9.4. > > So I just got around to trying to do some valgrind testing for the first > time in a couple of months, and what I find is that this patch completely > breaks valgrind for me: it exits immediately with complaints like > > ==00:00:00:00.222 14821== FATAL: in suppressions file "/home/postgres/pgsql/src/tools/valgrind.supp" near line 227: > ==00:00:00:00.222 14821== unknown tool suppression type > ==00:00:00:00.222 14821== exiting now. > > After a bit of hair-pulling I found that the line number report is > a lie, and what it's really unhappy about is the "Memcheck:Addr32" > specification on line 236. This is not terribly surprising perhaps > considering that "Addr32" isn't even documented on what should be > the authoritative page: > http://valgrind.org/docs/manual/mc-manual.html#mc-manual.suppfiles > Hmm :-( FWIW the Addr32 comes directly from valgrind itself, which explicitly suggested to add suppression like this: { Memcheck:Addr32 fun:__wcsnlen_avx2 fun:wcsrtombs fun:wcstombs fun:wchar2char fun:str_tolower fun:lower fun:DirectFunctionCall1Coll fun:Generic_Text_IC_like ... } My guess is that documentation is either somewhat obsolete, or is meant more like a general description than an exhaustive and authoritative source of truth regarding suppressions. > This is valgrind 3.8.1 (RHEL6's version), so not bleeding edge exactly, > but we have very little evidence about how far back the committed patch > works. I'm inclined to think we can't use this solution. > Fedora 28 has 3.14.0, so this seems to be due to some improvements since 3.8.1. I'm not sure how to deal with this - surely we don't want to just revert the change because that would start generating noise again. For a moment I thought we might wildcard the error type somehow, so that it would accept Memcheck:* but AFAICs that is not supported. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services