From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6552866560629800960 X-Received: by 2002:a2e:2c08:: with SMTP id s8-v6mr856657ljs.2.1526289682976; Mon, 14 May 2018 02:21:22 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:7005:: with SMTP id l5-v6ls1630431ljc.14.gmail; Mon, 14 May 2018 02:21:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqK9rvXiJ3mrUKtk+DiWGPeevhgQ9QLR11F+8vx8wT+6hLS82IHUZQIW/5n9FmfyyESCyDW X-Received: by 2002:a2e:21da:: with SMTP id h87-v6mr858438lji.21.1526289682383; Mon, 14 May 2018 02:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526289682; cv=none; d=google.com; s=arc-20160816; b=GuMUZ2Ll6bWsR1my9Mp1NWFPzXhuhT8mNtyQamALQhmmo4dU1tgHVesOg+soDMGU0o 6Ari0x2d/ZEyzPD4hOUWmzuqZ/bDMIe3oM9MmFoH9ARD1bUaARVrC6FNcgtNPHa2gTcs fEezzShFCOIr8IEOuT9uHbFTWwgiEFiC54X5x7NltfE9fAr/n5nmsGxrZZcKI6R7qdLc 9HmzgGOPyzGA3ZA3Xt+wJhdg2LXbvWYZAsfvsQARb0TrKBdrFeAuJOvZqIpikq2MSGHG OLn2ceuJz21sjJkK/eUNdA6fbk7wfY28EIY1AlgTZ8UZttTTvTbE3u67sOF732kszFpF lZQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=3StrLchqGl4WPiVCpPUvjsvRoxam2pFVJ9UBhkAaHes=; b=z3sRMyeOXCPi0tGOaeCdPMHul8eW/mLPYIJ8gXIBxczS1btc7tZVlZpeB/UILck+US wxvJyQPkWxsS1k58oU/wjyKtUmEIFdDwIOnGQZAox1LtCcZGKUVgZgg8Odu/r9zgo6kS 1B8MiLPFTVcpEOvMagtH9daxPFKIgIyDIZYvW0mit1+KCKlezpYIZlxbtQ/UfMEu0mhX u1HpNh4hjte5zkvSzazEYzlH71b3qtCi3VJOPteq9gdZzHOehd/he6drzc0Bz6ajvI4Z Z0mV0tKYQbwC7NDClb9AwTow9xaeVEwJgFfrt5VilJtcmprF77j39YtWXHlvvtKRFhvP DVOA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id b65-v6si383106ljb.1.2018.05.14.02.21.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 02:21:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w4E9LIpI011109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 14 May 2018 11:21:20 +0200 Subject: Re: [PATCH] isar-bootstrap: Increase cache room To: Claudius Heine , isar-users@googlegroups.com References: <20180507154836.25738-1-asmirnov@ilbers.de> <65e5d16d-592b-18b2-999f-83bfc13169f0@siemens.com> <3c2e0ed3-a0c2-5aca-37b8-ef5b884f8697@siemens.com> From: Alexander Smirnov Message-ID: <3b32103f-8766-6633-503e-04220b68e9b2@ilbers.de> Date: Mon, 14 May 2018 12:21:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <3c2e0ed3-a0c2-5aca-37b8-ef5b884f8697@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: ThUac8CvpKJ0 Hi, On 05/14/2018 12:11 PM, Claudius Heine wrote: > On 2018-05-14 10:54, [ext] Claudius Heine wrote: >> Hi Alex, >> >> On 2018-05-07 17:48, Alexander Smirnov wrote: >>> According to the man page for 'apt.conf', there are three variables: >>>   - Cache-Start: initial size of mmap cache room >>>   - Cache-Grow: gap for dynamic mmap cache growth >>>   - Cache-Limit: maximal cache size after growth >>> >>> If dynamic resize of mmap region is not avaialbe, the apt uses >>> pre-allocated Cache-Start room [1] for mmap file. >>> >>> Building Isar on one of the Debian host with kernel 3.4, I got the >>> following problem for 'qemuarm64-stretch' configuration: >>> >>> 8<-- >>> Hit:1 http://security.debian.org stretch/updates InRelease >>> Ign:2 http://ftp.de.debian.org/debian stretch InRelease >>> Hit:3 http://ftp.de.debian.org/debian stretch-updates InRelease >>> Hit:4 http://ftp.de.debian.org/debian stretch Release >>> E: Dynamic MMap ran out of room. Please increase the size of >>> APT::Cache-Start. Current value: 25165824. (man 5 apt.conf) >>> qemu: uncaught target signal 11 (Segmentation fault) - core dumped >>> Segmentation fault >>> 8<-- >>> >>> I have no information, why exactly the room could not be re-sized on >>> this >>> system, but it would be better to increase the initial room size for >>> apt. >>> This patch increases the default apt cache twice. >>> >>> Signed-off-by: Alexander Smirnov >>> --- >>>   meta/recipes-core/isar-bootstrap/isar-bootstrap.bb | 4 +++- >>>   1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb >>> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb >>> index a38dd88..4cdefaa 100644 >>> --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb >>> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb >>> @@ -187,7 +187,9 @@ do_apt_update() { >>>       E="${@bb.utils.export_proxies(d)}" >>>       export DEBIAN_FRONTEND=noninteractive >>> -    sudo -E chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y >>> +    sudo -E chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y \ >>> +                                      -o APT::Cache-Start=50331648 >>> + >> >> If this is needed, then it might be better to set this option in a >> apt-preferences file with the "DISTRO_APT_PREFERENCES" variable. > > Ah, sorry. I was wrong. I meant setting this is isar-apt.conf. > This option is needed only for isar build and should be dropped from target rootfs, because target rootfs has correct versions of apt and kernel. So please see v2 version of this patch: I've added the temporary conf file which is removed during rootfs creation. I found this easier than 'sedding' isar-apt.conf. Alex >> >> Cheers, >> Claudius >> >>>       sudo -E chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade -y \ >>>                                         -o Debug::pkgProblemResolver=yes >>>   } >>> >> >