public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] isar-bootstrap: Increase cache room
@ 2018-05-07 15:48 Alexander Smirnov
  2018-05-07 15:57 ` Alexander Smirnov
  2018-05-14  8:54 ` Claudius Heine
  0 siblings, 2 replies; 14+ messages in thread
From: Alexander Smirnov @ 2018-05-07 15:48 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

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 <asmirnov@ilbers.de>
---
 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
 }
-- 
2.1.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-05-14  9:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07 15:48 [PATCH] isar-bootstrap: Increase cache room Alexander Smirnov
2018-05-07 15:57 ` Alexander Smirnov
2018-05-07 16:31   ` Henning Schild
2018-05-07 16:48     ` Alexander Smirnov
2018-05-07 17:12       ` Henning Schild
2018-05-08  7:56         ` Alexander Smirnov
2018-05-08  8:56           ` Henning Schild
2018-05-08  9:07             ` Alexander Smirnov
2018-05-08  9:22               ` Henning Schild
2018-05-08  9:27                 ` Alexander Smirnov
2018-05-08 10:30                   ` Henning Schild
2018-05-14  8:54 ` Claudius Heine
2018-05-14  9:11   ` Claudius Heine
2018-05-14  9:21     ` Alexander Smirnov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox