Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp734527rwo; Wed, 2 Aug 2023 03:25:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlFoXSu17e++yzyiPJVR6tbdWe4jXC0VKALsUmLg9HGDweumxmEq+sU1zQtXyNUvNSqtWTQC X-Received: by 2002:a05:6a00:2314:b0:67b:a681:4ab2 with SMTP id h20-20020a056a00231400b0067ba6814ab2mr16433713pfh.25.1690971937422; Wed, 02 Aug 2023 03:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690971937; cv=none; d=google.com; s=arc-20160816; b=sx3tfVlkqwBjWRjfSCab9yLRysZQgT43E5Fvkt2p+xnM2FtG37cZFcf0BAftLmEdhq h3JwAArC4EwV75PNKp1Ng62PdDhjBuxelIfizkQUofoi3Vo7iFT4BiboqNUfdp9DX/uQ aXJSfI/BpPBSQ8kVaO4cj4Pwoc8XP9XzE3dxgq8nfQd6iy5In3azhbl/lmNYw5bjzOe6 TgmDvmvVR0ZvVJxn8RLeRcRFJdtU9zjZ4NS7Q1GYh2+p2pbIoLUelx0Z9qY40ZI29nQl atS//hvswLRUTuoOYSUyZ93A15mcQXO7btX1pyF835oNyrIjl78OxWAixnSkVpIRZW41 NWHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cZ2+p1HAKUFXdo5GIijCANs0wzQQxMi4o3dwPlsWfcA=; fh=GLHNOtIlJUKYxVCzS0fx/KP97OWjXtDkwceaFE6vZy0=; b=RJD/Dj6Cg2M/6q5nEXclFLB5ooaKeh9b41TUIE2TAJeXAgR+wKP817p8/xXT/h+EiE 3gSIIAoH1znn+qYGs/bSSu8WsIeRxi+8Aaui+Zt/si8c4Si+S/FaIYbnIOjFGOFzOpO7 knIbHCAHyTKYQsqr5/QqhOwihoUZcrMcnVVNs+Dlq20sU3HZZdnRpNylsaAwQScVOjzC LlhUudBF46z0yOnNkz88K8ulEsBEXZHt6w9WpnUbNaEr1N3eJwaeNqYuLzJFBlj1BflU rZpyA03dnp6FoTAvvcQyfbj6IlOO5JqbzBDskfkY/7Ss7x3e3tYGmnjnrH6T6hhfEA/5 ythg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a0SxWMrQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fj7-20020a056a003a0700b00686b62a6dc4si3939317pfb.145.2023.08.02.03.25.25; Wed, 02 Aug 2023 03:25:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a0SxWMrQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234038AbjHBJV7 (ORCPT + 99 others); Wed, 2 Aug 2023 05:21:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230396AbjHBJVz (ORCPT ); Wed, 2 Aug 2023 05:21:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49060AC; Wed, 2 Aug 2023 02:21:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B10CD618BF; Wed, 2 Aug 2023 09:21:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 249FEC433C8; Wed, 2 Aug 2023 09:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690968112; bh=J2tG/ScQRlNnbtP1aLVjnAnya21Uxa58M8ute6dFW0c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=a0SxWMrQPIaK7W+vyl8W74wM/RpUfkJYTI89L0qS0ZML7dpEglRtG5r+jcxC1IT2e Z+fEknXE4N0Ip+NFG8Qly4pBAHpAlhJ6R2j48D9MjdcD43qrSWgNNn7nM6kGqZ1/zS yNyB4NH7rRIo6BSWKP2Vud3xznCRi3WhspWPVAsDYasVkqLtXKugQToGQahuVIaq+M tHuiuIlsX1U85iahLWnXmSiCLnvepittiz3axvYsvqFiiFhDDTvfxxo/kYNTguwus3 wpN1WPf0b3A64En2R534kwhsysetABQ47XPJW1SLQLThyVQQXoQKcv7hvvOdT6hCby efjqgYxjs2keQ== Received: by mail-ot1-f52.google.com with SMTP id 46e09a7af769-6b9e478e122so5787814a34.1; Wed, 02 Aug 2023 02:21:52 -0700 (PDT) X-Gm-Message-State: ABy/qLZI3KvFmJc5bfMzFrpSOnRwNdtiDvR1jkxSQJe/7imEayZTmEyf YoHJgBi0/OdZYtpxHuC4KTU312lTJVpXcxEAUpg= X-Received: by 2002:a05:6870:9107:b0:1bb:7f9f:2fc5 with SMTP id o7-20020a056870910700b001bb7f9f2fc5mr17842152oae.17.1690968111305; Wed, 02 Aug 2023 02:21:51 -0700 (PDT) MIME-Version: 1.0 References: <20220109181529.351420-1-masahiroy@kernel.org> <20220109181529.351420-3-masahiroy@kernel.org> <20230623144544.GA24871@lxhi-065> <20230719190902.GA11207@lxhi-064.domain> <20230725092433.GA57787@lxhi-064.domain> In-Reply-To: <20230725092433.GA57787@lxhi-064.domain> From: Masahiro Yamada Date: Wed, 2 Aug 2023 18:21:14 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/5] kbuild: rename cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd22} To: Eugeniu Rosca Cc: Nicolas Schier , SzuWei Lin , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Matthias.Thomae@de.bosch.com, yyankovskyi@de.adit-jv.com, Dirk.Behme@de.bosch.com, Eugeniu Rosca Content-Type: multipart/mixed; boundary="0000000000009b1ced0601ed3171" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000009b1ced0601ed3171 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 25, 2023 at 6:24=E2=80=AFPM Eugeniu Rosca wrote: > > Hello Yamada-san, > > Appreciate your willingness to support. Some findings below. > > On Sun, Jul 23, 2023 at 01:08:46AM +0900, Masahiro Yamada wrote: > > On Thu, Jul 20, 2023 at 4:09=E2=80=AFAM Eugeniu Rosca wrote: > > > On Fri, Jun 23, 2023 at 04:45:44PM +0200, Eugeniu Rosca wrote: > > [..] > > > > > I will continue to increase my understanding behind what's happenin= g. > > > > In case there are already any suggestions, would appreciate those. > > > > > > JFYI, we've got confirmation from Qualcomm Customer Support interface > > > that reverting [1] heals the issue on QC end as well. However, it loo= ks > > > like none of us has clear understanding how to properly > > > troubleshoot/trace/compare the behavior before and after the commit. > > > > > > I would happily follow any suggestions. > > > > > > > [1] https://android.googlesource.com/kernel/common/+/bc6d3d83539512 > > > > ("UPSTREAM: kbuild: rename cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd2= 2}") > > > > > > > > [2] https://lore.kernel.org/linux-kbuild/20230616194505.GA27753@lxh= i-065/ > > [..] > > > Please backport 64d8aaa4ef388b22372de4dc9ce3b9b3e5f45b6c > > and see if the problem goes away. > > Unfortunately, the problem remains after backporting the above commit. > > After some more bisecting and some more trial-and-error, I finally came > up with a reproduction scenario against vanilla. It also shows that > after reverting 7ce7e984ab2b21 ("kbuild: rename > cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd22}"), the problem goes away. > > It takes <30 seconds to reproduce the issue on my machine (on 2nd run). > > In order to make the test self-sufficient, it also clones the Linux > sources (only during 1st run, with --depth 1, for minimal footprint), > hence ~1.8 GB free space is required in /tmp . > > The repro.sh script: > =3D> https://gist.github.com/erosca/1372fdc24126dc98031444613450c494 > > Output against vanilla on 1st run (always OK, matches real-life case): > =3D> https://gist.github.com/erosca/0f5b8e0a00a256d80f0c8a6364d81568 > > Output against vanilla on 2nd/Nth run (NOK: Argument list too long): > =3D> https://gist.github.com/erosca/e5c2c6479cc32244cc38d308deea4cf5 > > Output against vanilla + revert_of_7ce7e984ab2b2 on Nth run (always OK): > =3D> https://gist.github.com/erosca/57e114f92ea20132e19fc7f5a46e7c65 > > Would it be possible to get your thoughts on the above? > > -- > Best regards, > Eugeniu Rosca Indeed, reverting 7ce7e984ab2b218d6e92d5165629022fe2daf9ee makes qcom's external module build successfully (but rebuilding is super slow). Interestingly, revert 7ce7e984ab2b218d6e92d5165629022fe2daf9ee then apply the attached patch, then 'Argument list too long' will come back. So, this is unrelated to the actual build commands. I suspect bare 'export', which expands all variables while apparently most of them are not meant exported. Insert the following in your reproducer, then it will work. # qcom's audio-kernel sprinkles 'export' everywhere. # Remove bare use of 'export' find "$ABS_KMOD" -name Kbuild | xargs sed -i '/export$/d' -- Best Regards Masahiro Yamada --0000000000009b1ced0601ed3171 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Add-dummy-commands-to-make-qcom-s-external-module-fa.patch" Content-Disposition: attachment; filename="0001-Add-dummy-commands-to-make-qcom-s-external-module-fa.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lktimmix0 RnJvbSBhMWQ2NDEyMzg4NTFkYmRlMDBhMzdiN2IyMDNiMTEwZTc4NmVkZDFkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXNhaGlybyBZYW1hZGEgPG1hc2FoaXJveUBrZXJuZWwub3Jn PgpEYXRlOiBXZWQsIDIgQXVnIDIwMjMgMTg6MTE6MzIgKzA5MDAKU3ViamVjdDogW1BBVENIXSBB ZGQgZHVtbXkgY29tbWFuZHMgdG8gbWFrZSBxY29tJ3MgZXh0ZXJuYWwgbW9kdWxlIGZhaWwKClJl dmVydCA3Y2U3ZTk4NGFiMmIyMThkNmU5MmQ1MTY1NjI5MDIyZmUyZGFmOWVlIGFuZAphcHBseSB0 aGlzIGluc3RlYWQuCgpJIHNlZQoKL2Jpbi9zaDogQXJndW1lbnQgbGlzdCB0b28gbG9uZwoKU2ln bmVkLW9mZi1ieTogTWFzYWhpcm8gWWFtYWRhIDxtYXNhaGlyb3lAa2VybmVsLm9yZz4KLS0tCiBz Y3JpcHRzL01ha2VmaWxlLmxpYiB8IDMzICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KwogMSBmaWxlIGNoYW5nZWQsIDMzIGluc2VydGlvbnMoKykKCmRpZmYgLS1naXQgYS9zY3JpcHRz L01ha2VmaWxlLmxpYiBiL3NjcmlwdHMvTWFrZWZpbGUubGliCmluZGV4IDIyNzBlZDgxOWEyOS4u YzQ4MTAxOGQxYjVmIDEwMDY0NAotLS0gYS9zY3JpcHR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RACisgICAgICBjbWRfZHVtbXk3ID0gY2F0ICQocmVhbC1wcmVyZXFzKSA+ICRACisKK3F1aWV0 X2NtZF9kdW1teTggPSBGT08gICAgJEAKKyAgICAgIGNtZF9kdW1teTggPSBjYXQgJChyZWFsLXBy ZXJlcXMpID4gJEAKKworcXVpZXRfY21kX2R1bW15OSA9IEZPTyAgICAkQAorICAgICAgY21kX2R1 bW15OSA9IGNhdCAkKHJlYWwtcHJlcmVxcykgPiAkQAotLSAKMi4zOS4yCgo= --0000000000009b1ced0601ed3171--