#875981 sbuild: creation of wheezy chroot fails with segfault

Package:
sbuild
Source:
sbuild
Submitter:
Rob Browning
Date:
2024-12-01 13:33:03 UTC
Severity:
wishlist
Tags:
#875981#5
Date:
2017-09-16 19:28:07 UTC
From:
To:
Package: sbuild
Version: 0.73.0-4
Severity: wishlist

I was trying to create a wheezy box, and it crashed.

  # sbuild-createchroot --include=eatmydata,ccache,gnupg \
      wheezy /srv/chroot/wheezy-amd64-sbuild http://deb.debian.org/debian
  ...
  I: Extracting xz-utils...
  I: Extracting zlib1g...
  I: Installing core packages...
  W: Failure trying to run: chroot /srv/chroot/wheezy-amd64-sbuild dpkg --force-depends --install /var/cache/apt/archives/base-passwd_3.5.26_amd64.deb
  W: See /srv/chroot/wheezy-amd64-sbuild/debootstrap/debootstrap.log for details
  E: Error running debootstrap at /usr/sbin/sbuild-createchroot line 268, <PH> line 4.

  # tail /srv/chroot/wheezy-amd64-sbuild/debootstrap/debootstrap.log
  Saving to: '/srv/chroot/wheezy-amd64-sbuild//var/cache/apt/archives/partial/zlib1g_1%3a1.2.7.dfsg-13_amd64.deb'

       0K .......... .......... .......... .......... .......... 58%  714K 0s
      50K .......... .......... .......... .....                100% 2.16M=0.09s

  2017-09-16 12:15:02 (992 KB/s) - '/srv/chroot/wheezy-amd64-sbuild//var/cache/apt/archives/partial/zlib1g_1%3a1.2.7.dfsg-13_amd64.deb' saved [87392/87392]

  dpkg: warning: parsing file '/var/lib/dpkg/status' near line 5 package 'dpkg':
   missing description
  dpkg: warning: parsing file '/var/lib/dpkg/status' near line 5 package 'dpkg':
   missing architecture
  Segmentation fault

But the same thing worked fine in a stretch vm.  After a bit of
confusion, followed by some help on #debian-devel, it looks like this
may be because my kernel was too new for wheezy.

  4.11.0-1-amd64 #1 SMP Debian 4.11.6-1 (2017-06-19) x86_64 GNU/Linux

Assuming so, and if there's some reasonable way for sbuild to detect
this situation, it'd be nice if sbuild could just tell me why that's
never going to work.

Thanks

#875981#10
Date:
2017-09-16 19:52:07 UTC
From:
To:
Hi

For completeness, the mentioned kernel change is the following:

linux (4.10~rc6-1~exp1) experimental; urgency=medium
[...]
  * [amd64] Enable LEGACY_VSYSCALL_NONE instead of LEGACY_VSYSCALL_EMULATE
    (Closes: #852620).  This breaks (e)glibc versions < 2.14 and dietlibc
    versions < 0.33.  It can be reverted using the kernel parameter:
    vsyscall=emulate
[...]
 -- Ben Hutchings <ben@decadent.org.uk>  Tue, 31 Jan 2017 15:33:20 +0000

Regards,
Salvatore

#875981#15
Date:
2018-02-24 08:31:37 UTC
From:
To:
Hi.

Its still happening in unstable. Any workarounds ?

#875981#20
Date:
2018-02-24 10:00:40 UTC
From:
To:
Yes, as documented in the changelog entry:

$ grep ^GRUB_CMDLINE_LINUX= /etc/default/grub
GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor vsyscall=emulate"

The important part is the "vsyscall=emulate". And obviously you
have to run "update-grub" and reboot after having adding this
boot parameter.

Cheers,