From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6552866560629800960 X-Received: by 2002:adf:e483:: with SMTP id i3-v6mr3387185wrm.9.1525711705415; Mon, 07 May 2018 09:48:25 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:f116:: with SMTP id p22-v6ls1886184wmh.4.canary-gmail; Mon, 07 May 2018 09:48:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpDroYMaqomooUSJa5JNtil5IYAdz/NIf60hllIr2WHbMh4yH7H/PqxZfC2STaybtMLWx3v X-Received: by 10.28.165.209 with SMTP id o200mr188023wme.11.1525711704865; Mon, 07 May 2018 09:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525711704; cv=none; d=google.com; s=arc-20160816; b=uLz9URD/Dt2nSNBFmOSOZkXd3cc/YJrvUxpTkLPmDyez4VyzKu+Y0qJE/Zqg5r+ue0 B/yFimV6n7tbc73V0RfsuZlv7kGuOFdjVkXSjVpPnYuOH5HBPdY9k395YUN8wcR4qnZb BjuMcGEgpC12HTHH/BXfJOuYQogMe+STuQH9/wVChy4LxuKtjyWJwTEmvmi+KKryKill diEmP5XqK2xS/dNM0JCjzOqdpBLOI3NeeGqSbPKMJCkKcWLzSWQM4b6JNSzFJKgwGSvq dgv3rCpFYQzivyckM6XrXUy/QmiOeM6E7Iw3Y3ckvVATpN5Nl+03YuC1qgK8l4ZAWrVG TF8w== 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:cc:to:subject :arc-authentication-results; bh=MRr4Ie4KwDBIg5MyJs1IIyMSi9EDLf1wjtYr0icZung=; b=b0U0jMF7gmE+PSvEc7G8JgSMJoMplbwKVrdjVXsm7gC3ERO6UxbJnAyx5ORWqvphKa ai4+hbnHH087pDEzUAVnfKQTxgJRIDDKfI4zr9FjQnhai/5KQJmmIdpMMTjHpOaGihVq R2goKobTrO7zQ27A/2su9ZQwytqOgrLe6HmjN3NqgV4qJ8ALtoEBjmm6P6kmLi7ogHIM dRLqxJ2bmou4CvRDQ3doQUGTvowDA+ZU0K1GqNGUR3xiaDW9WWHaGLvPuLgMJ91RXzyD wZRoEhHNow+r6y4NFjOTo8c7M0eLko24WYvY7c2Ze+TbqpgfUVmSKR6T9MfLW2ZFx7L1 Xy/A== 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 j5-v6si46576edd.5.2018.05.07.09.48.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 May 2018 09:48:24 -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 w47GmLs3021967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 7 May 2018 18:48:23 +0200 Subject: Re: [PATCH] isar-bootstrap: Increase cache room To: Henning Schild Cc: isar-users References: <20180507154836.25738-1-asmirnov@ilbers.de> <52bdb5c0-5f1f-5efc-5de3-9c5a9253ae3b@ilbers.de> <20180507183151.16ff9387@md1pvb1c.ad001.siemens.net> From: Alexander Smirnov Message-ID: <95cd2859-b074-c8a2-4450-cae977ce9846@ilbers.de> Date: Mon, 7 May 2018 19:48:16 +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: <20180507183151.16ff9387@md1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: 2OTDGd9AgC2s Hi, On 05/07/2018 07:31 PM, Henning Schild wrote: > Am Mon, 7 May 2018 18:57:36 +0300 > schrieb Alexander Smirnov : > >> On 05/07/2018 06:48 PM, 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. >>> >> >> 1: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657085 >> >> Missed :-( > > What is your conclusion from that link and what does it mean for the > patch? > This just the information I found about dynamic cache increasing. Sometimes it could not work. Another fact is that increasing of Cache-Limit doesn't help, so seems that mremap really doesn't work. > I do not like adding magic numbers and changing the default config, > especially if the whole reason is to work around a problem only found > on outdated build hosts (3.4 really?) I'm not 100% sure that kernel 3.4 is the source of the problem. Tried to investigate, but for now without results. But if you try to google line: E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start There will be tons of search results, so such problem occurred not only on my host. The man page says: ...on systems with a lot of configured sources it should be increased... so for me it makes sense to increase this room even if there is only one problem report. It doesn't break anything. We can't require Isar users to always have up-to-dated host systems. If this patch makes all Isar users with old kernels happy, it's probably good for Isar in general :-) > > If this patch needs to go in, it is missing the cleanup step. > Sorry, what do you mean here by cleanup step? Alex > Henning > >>> 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 >>> + >>> sudo -E chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade >>> -y \ -o Debug::pkgProblemResolver=yes >>> } >>> >> > -- With best regards, Alexander Smirnov ilbers GmbH Baierbrunner Str. 28c D-81379 Munich +49 (89) 122 67 24-0 http://ilbers.de/ Commercial register Munich, HRB 214197 General manager: Baurzhan Ismagulov