From nobody Mon Oct 04 08:02:32 2021 X-Original-To: freebsd-chromium@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ED91417ECC43 for ; Mon, 4 Oct 2021 08:02:45 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-20.consmr.mail.gq1.yahoo.com (sonic302-20.consmr.mail.gq1.yahoo.com [98.137.68.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4HNCr45GgSz3rHq for ; Mon, 4 Oct 2021 08:02:44 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1633334557; bh=ElPad3rwo2Y7AwiW7ZyAvcLIsy/A6iyMTDmDh2HLHRE=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=kX1UX3+A9ad0DlPoc1xshq4GYm/2WW4gQySqN/vA/4eQ1obc9Q1fpgVyG2MErIGefgFuvprDISMHuuiin5UODcrlK0sHNh2PPU2q3W3Mt6FUPkvV4z4xOAAmjgl+dkoaCRqdmfdoJzORGsbv3I4yiU7EL3zSW2PlCG3GKa8JFppJuZ+x6oI/kUGh5xK9uq/k5mBhG87PUOHSgPyCcBn/A8AsAlx0o6O7r4aEzzQE5c1LFQejmXMLwJRoZz9ZxgDzbuCwVpdcpOci+78cZZBJ+IX2Iv1yjkih9VJCBPsSHeIHjlEt82k9NPc0TdkVtTdAt/CrVxOQO6Azj8qC2XXBjA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1633334557; bh=VGmwpItYEJmpam1/7hkthOeGX7Q2SlK7SCropDB00jQ=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=Sxmp+i6SZkffw+y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JgSBxHsb._JtS_wl2i3I5E35xS jOKeVgBkoE1MTIuD4PTrfgVqzXQZz7Fw9v_kcEfx7jls0BVjsOzQXzZYbklZI4KCB7BnQbmMDnyt R0oBFCzSDFdvZCgx70gEJ.zgAMZz5RjQyajHbActXgNe1nBMujBEdyZv8qHgiMpwfwapgt0vhdsH XIQfkFxDLwsaguRFKDtHfChLXMbOLpMA95NBHgEopELR_N0rYHByWVlct1GpoeXNxleJL70g7LHT rMdijBUpGAf82Mz74wX.q9IgqYkCW0GxFZAATES14mBM38P4SDRMA.N9Cal9gXIdc81WxdYbJXfP DA5kIV04Jp_sVwTWPm96KiD8ZVc3yCY0WwOcmCsRg_WdaB.BAAFPVO4ikOxbruXL.MNPwg6EPQHO 9V2igvZcCvTpqhxkE.EH8oPxmc6q7sZkHsnF.t0baUepPYAomrHMOREdAlamHx3YPKpTgsiIzYBF t7RjjOsgaMysP3GWI6jKR3pKGundLO4wg5VlRpreFZ9yTei9PxDHAzY.ekZ0xYTVEP6n6RGsMGvf nGpP0inZFCrQn0D.Q43gUbnL0Cg8HerM8igIdCjBCRb37J5CCi6037d3dkd6.SnKAdMp3kngtalP siznt9Lpwo0UZ.hrwoxsIfYgox2mKzP4sAE5D1jz5NKsT8GRWVEc- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Mon, 4 Oct 2021 08:02:37 +0000 Received: by kubenode513.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 5385fda26af2b6f317d597b53e882b51; Mon, 04 Oct 2021 08:02:32 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: FreeBSD-specific Chromium issues List-Archive: https://lists.freebsd.org/archives/freebsd-chromium List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-chromium@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: chromium-92.0.4515.159/buildtools/freebsd/clang-format and python bytes/bytarray vs. str failures in poudriere-devel based builds Message-Id: <60E22109-144E-4A31-814F-D0055FF25B2A@yahoo.com> Date: Mon, 4 Oct 2021 01:02:32 -0700 To: freebsd-chromium@freebsd.org X-Mailer: Apple Mail (2.3654.120.0.1.13) References: <60E22109-144E-4A31-814F-D0055FF25B2A.ref@yahoo.com> X-Rspamd-Queue-Id: 4HNCr45GgSz3rHq X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=kX1UX3+A; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.146 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.146:from]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.146:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim] Reply-To: marklmi@yahoo.com From: Mark Millard via freebsd-chromium X-Original-From: Mark Millard X-ThisMailContainsUnwantedMimeParts: N When I try to build www/chromium via poudriere-devel I get errors of the form: Traceback (most recent call last): File = "/wrkdirs/usr/ports/www/chromium/work/chromium-92.0.4515.159/buildtools/fr= eebsd/clang-format", line 34, in stdout, stderr =3D proc.communicate(input=3Dcontents) File "/usr/local/lib/python3.8/subprocess.py", line 1028, in = communicate stdout, stderr =3D self._communicate(input, endtime, timeout) File "/usr/local/lib/python3.8/subprocess.py", line 1848, in = _communicate input_view =3D memoryview(self._input) When I look at: = /wrkdirs/usr/ports/www/chromium/work/chromium-92.0.4515.159/buildtools/fre= ebsd/clang-format I see (in part): . . . contents =3D '' if '-' in args or not inputfiles: contents =3D sys.stdin.read() . . . proc =3D subprocess.Popen( ['clang-format'] + args, stdin=3Dsubprocess.PIPE, stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.PIPE, env=3Denv) stdout, stderr =3D proc.communicate(input=3Dcontents) . . . Which looks to me to be passing a str, not a bytes nor a bytearray nor a None. Also Popen.stdin is documented with: QUOTE Popen.stdin If the stdin argument was PIPE, this attribute is a writeable stream = object as returned by open(). If the encoding or errors arguments were = specified or the universal_newlines argument was True, the stream is a text = stream, otherwise it is a byte stream. If the stdin argument was not PIPE, this attribute is None. END QUOTE So, if I gather correctly, stdin ends up being a byte stream acording to the documenation. proc.communicate is documented with "If streams were opened in text mode, input must be a string. Otherwise, it must be bytes." as well. And that in turn involves: /usr/local/lib/python3.8/subprocess.py has: def communicate(self, input=3DNone, timeout=3DNone): . . . stdout, stderr =3D self._communicate(input, endtime, = timeout) . . . So input still seems to be a str for the following: def _communicate(self, input, endtime, orig_timeout): . . . self._save_input(input) =20 if self._input: input_view =3D memoryview(self._input) . . . but self._input need not be. This is where: def _save_input(self, input): # This method is called from the _communicate_with_*() = methods # so that if we time out while communicating, we can continue # sending input if we retry. if self.stdin and self._input is None: self._input_offset =3D 0 self._input =3D input if input is not None and self.text_mode: self._input =3D = self._input.encode(self.stdin.encoding, self.stdin.errors) The implication of the error would seem to be that the encode did not happen and, so, either self.stdin and self._input is None was false or: self.text_mode was false (and it appears to be the later). This fits with the stdin being a byte stream but input being a str --and so the error report from memoryview. But I still have no clue why the FreeBSD server builds of chromium do not end up with such an error report. Note: I've duplicated the failure in my aarch64 and amd64 contexts. For reference: # pwd /usr/ports # ~/fbsd-based-on-what-commit.sh branch: main merge-base: 59611d61d70a85f4418f3f701db1b7baf58560ba merge-base: CommitDate: 2021-09-29 09:39:17 +0000 59611d61d70a (HEAD -> main, freebsd/main, freebsd/HEAD) = databases/postgresql14-server: fix openssl dependency n560161 (--first-parent --count for merge-base) # uname -apKU FreeBSD CA72_16Gp_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #12 = main-n249019-0637070b5bca-dirty: Tue Aug 31 02:24:20 PDT 2021 = root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm6= 4.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1400032 1400032 I do not see such a failure in the likes of: = http://ampere2.nyi.freebsd.org/data/main-arm64-default/p5f5c0fe00a09_s3fcb= de5e88/logs/chromium-92.0.4515.159_2.log =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)