[pkg-lxc-devel] Bug#926582: lxc-start SIGSEGV with --foreground

itd at firemail.cc itd at firemail.cc
Sun Apr 7 12:21:57 BST 2019


Package: lxc
Version: 1:3.1.0+really3.0.3-6
Severity: normal

Dear Maintainer,

sadly I can no longer reproduce this. It just started to work.
Apologies for this rudimentary bug report.

> What led up to the situation?

I installed 'lxc' and configured usage of unprivileged container.
Afterwards, I created a new unprivileged container and tried to start it 
with:

>> $ lxc-create -t download -n debian-download -- -d debian -r buster -a 
>> amd64
>> $ lxc-start -n debian-download
>> $ lxc-start -n debian-download --foreground

Command two failed, but suggested adding `--foreground`, thus I tried 
that.
However, command three failed with a segmentation fault.

> What exactly did you do (or not do) that was effective (or 
> ineffective)?

Unsure how to debug this, I installed valgrind, lxc-dbgsym, and 
liblxc1-dbgsym.
Finally, I tried to execute:

>> $ valgrind --tool=memcheck -- lxc-start -n debian-download 
>> --foreground

Which resulted in the following stderr/valgrind output:

==21455== Memcheck, a memory error detector
==21455== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et 
al.
==21455== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright 
info
==21455== Command: lxc-start -n debian-download --foreground
==21455==
==21455== Warning: noted but unhandled ioctl 0x5441 with no 
size/direction hints.
==21455==    This could cause spurious value errors to appear.
==21455==    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing 
a proper wrapper.
==21455== Invalid read of size 8
==21455==    at 0x4879AFD: cgfsng_payload_create (cgfsng.c:1318)
==21455==    by 0x48C171E: lxc_spawn (start.c:1645)
==21455==    by 0x48C171E: __lxc_start (start.c:1949)
==21455==    by 0x48C2C26: lxc_start (start.c:2065)
==21455==    by 0x48A9F26: do_lxcapi_start (lxccontainer.c:1096)
==21455==    by 0x48AA9C0: lxcapi_start (lxccontainer.c:1130)
==21455==    by 0x10A4EB: main (lxc_start.c:328)
==21455==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==21455==
==21455==
==21455== Process terminating with default action of signal 11 (SIGSEGV)
==21455==  Access not within mapped region at address 0x0
==21455==    at 0x4879AFD: cgfsng_payload_create (cgfsng.c:1318)
==21455==    by 0x48C171E: lxc_spawn (start.c:1645)
==21455==    by 0x48C171E: __lxc_start (start.c:1949)
==21455==    by 0x48C2C26: lxc_start (start.c:2065)
==21455==    by 0x48A9F26: do_lxcapi_start (lxccontainer.c:1096)
==21455==    by 0x48AA9C0: lxcapi_start (lxccontainer.c:1130)
==21455==    by 0x10A4EB: main (lxc_start.c:328)
==21455==  If you believe this happened as a result of a stack
==21455==  overflow in your program's main thread (unlikely but
==21455==  possible), you can try to increase the size of the
==21455==  main thread stack using the --main-stacksize= flag.
==21455==  The main thread stack size used in this run was 8388608.
==21455==
==21455== HEAP SUMMARY:
==21455==     in use at exit: 108,301 bytes in 746 blocks
==21455==   total heap usage: 1,785 allocs, 1,039 frees, 287,253 bytes 
allocated
==21455==
==21455== LEAK SUMMARY:
==21455==    definitely lost: 18 bytes in 1 blocks
==21455==    indirectly lost: 0 bytes in 0 blocks
==21455==      possibly lost: 0 bytes in 0 blocks
==21455==    still reachable: 108,283 bytes in 745 blocks
==21455==         suppressed: 0 bytes in 0 blocks
==21455== Rerun with --leak-check=full to see details of leaked memory
==21455==
==21455== For counts of detected and suppressed errors, rerun with: -v
==21455== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)


Thank you for maintaining lxc.

Regards,
itd

-- System Information:
Debian Release: buster/sid
   APT prefers testing-debug
   APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-2-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lxc depends on:
ii  debconf [debconf-2.0]  1.5.71
ii  libc6                  2.28-8
ii  libcap2                1:2.25-2
ii  libgnutls30            3.6.6-2
ii  liblxc1                1:3.1.0+really3.0.3-6
ii  libseccomp2            2.3.3-4
ii  libselinux1            2.8-1+b1
ii  lsb-base               10.2019031300

Versions of packages lxc recommends:
ii  bridge-utils                 1.6-2
ii  debootstrap                  1.0.114
ii  dirmngr                      2.2.12-1
ii  dnsmasq-base [dnsmasq-base]  2.80-1
ii  gnupg                        2.2.12-1
ii  iproute2                     4.20.0-2
ii  iptables                     1.8.2-4
ii  libpam-cgfs                  1:3.1.0+really3.0.3-6
ii  lxc-templates                3.0.3-1
ii  lxcfs                        3.0.3-2
ii  openssl                      1.1.1b-1
ii  rsync                        3.1.3-6
ii  uidmap                       1:4.5-1.1

Versions of packages lxc suggests:
ii  apparmor     2.13.2-10
pn  btrfs-progs  <none>
pn  lvm2         <none>
pn  python3-lxc  <none>

-- Configuration Files:
/etc/lxc/default.conf changed [not included]

-- debconf information excluded



More information about the Pkg-lxc-devel mailing list