ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
* [Sysadmins] lxc Ошибка сегментирования
@ 2018-12-10  9:17 Максим Васюк
  2018-12-10 10:09 ` Максим Васюк
  0 siblings, 1 reply; 2+ messages in thread
From: Максим Васюк @ 2018-12-10  9:17 UTC (permalink / raw)
  To: sysadmins

Привет, Всем!

p8
# uname -r
4.14.80-un-def-alt0.M80P.1
Проблема воспроизводится также и на std-def

# lxc-start -n test_01
# lxc-ls -f
Ошибка сегментирования

# lxc-info -n test_01
Ошибка сегментирования

# lxc-stop -n test_01
Ошибка сегментирования

# tail /var/log/messages 
...
Dec 10 16:00:50 sh03 kernel: [  389.271645] lxc-ls[2760]: segfault at 0 ip 00007fee430733a6 sp 00007fff446988c8 error 4 in libc-2.23.so[7fee42ff5000+199000]
Dec 10 16:06:05 sh03 kernel: [  704.537843] lxc-info[2773]: segfault at 0 ip 00007ff5562443a6 sp 00007ffde227dc78 error 4 in libc-2.23.so[7ff5561c6000+199000]
Dec 10 16:06:49 sh03 kernel: [  748.340195] lxc-stop[2774]: segfault at 0 ip 00007fa052de13a6 sp 00007ffd6c0dcbc8 error 4 in libc-2.23.so[7fa052d63000+199000]

# ps xa | grep lxc
 2728 ?        Ss     0:00 /usr/lib/lxc/lxc-monitord /var/lib/lxc 5
 2730 ?        Ss     0:00 [lxc monitor] /var/lib/lxc test_01
 2748 ?        S      0:00 [lxc monitor] /var/lib/lxc test_01

Контейнер создавал вот так:
# lxc-create -t lxc-altlinux -n test_01

Всё штатно. Создал только мост через openvswtch заранее.

# cat /var/lib/lxc/test_01/config | grep -v '#'

lxc.network.type = veth
lxc.network.link = br_rpm_pub
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:c0:68:29
lxc.rootfs = /var/lib/lxc/test_01/rootfs
lxc.rootfs.backend = dir
lxc.utsname = test_01
lxc.tty = 4
lxc.pts = 1024
lxc.cap.drop = sys_module mac_admin mac_override sys_time

lxc.cgroup.devices.deny = a
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 4:1 rwm
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
lxc.cgroup.devices.allow = c 10:135 rwm

lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed


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

* Re: [Sysadmins] lxc Ошибка сегментирования
  2018-12-10  9:17 [Sysadmins] lxc Ошибка сегментирования Максим Васюк
@ 2018-12-10 10:09 ` Максим Васюк
  0 siblings, 0 replies; 2+ messages in thread
From: Максим Васюк @ 2018-12-10 10:09 UTC (permalink / raw)
  To: sysadmins

> Привет, Всем!
> 
> p8
> # uname -r
> 4.14.80-un-def-alt0.M80P.1
> Проблема воспроизводится также и на std-def
> 
> # lxc-start -n test_01
> # lxc-ls -f
> Ошибка сегментирования
> 
> # lxc-info -n test_01
> Ошибка сегментирования
> 
> # lxc-stop -n test_01
> Ошибка сегментирования
> 

Поторопился и не написал, что до запуска контейнера lxc-ls отрабатывает как надо.

> # tail /var/log/messages
> ...
> Dec 10 16:00:50 sh03 kernel: [ 389.271645] lxc-ls[2760]: segfault at 0 ip 00007fee430733a6 sp 00007fff446988c8 error 4 in libc-2.23.so[7fee42ff5000+199000]
> Dec 10 16:06:05 sh03 kernel: [ 704.537843] lxc-info[2773]: segfault at 0 ip 00007ff5562443a6 sp 00007ffde227dc78 error 4 in libc-2.23.so[7ff5561c6000+199000]
> Dec 10 16:06:49 sh03 kernel: [ 748.340195] lxc-stop[2774]: segfault at 0 ip 00007fa052de13a6 sp 00007ffd6c0dcbc8 error 4 in libc-2.23.so[7fa052d63000+199000]

Это поборолось изменением в конфиге:
#lxc.tty = 4
lxc.tty = 1

Ещё забыл выдать
# cat /var/log/lxc/test_01.log 
      lxc-start 20181210113644.031 ERROR    lxc_cgfs - cgroups/cgfs.c:cgfs_init:2288 - cgroupfs failed to detect cgroup metadata
      lxc-start 20181210113644.031 ERROR    lxc_start - start.c:lxc_spawn:1094 - failed initializing cgroup support
      lxc-start 20181210114630.701 ERROR    lxc_conf - conf.c:instantiate_veth:2596 - failed to attach 'veth4Q8AQX' to the bridge 'lxcbr0': Operation not permitted
      lxc-start 20181210114630.710 ERROR    lxc_conf - conf.c:lxc_create_network:2882 - failed to create netdev
      lxc-start 20181210114630.710 ERROR    lxc_start - start.c:lxc_spawn:1081 - failed to create the network
      lxc-start 20181210114630.710 ERROR    lxc_start - start.c:__lxc_start:1354 - failed to spawn 'test_01'
      lxc-start 20181210114630.710 ERROR    lxc_start_ui - tools/lxc_start.c:main:344 - The container failed to start.
      lxc-start 20181210114630.710 ERROR    lxc_start_ui - tools/lxc_start.c:main:346 - To get more details, run the container in foreground mode.
      lxc-start 20181210114630.710 ERROR    lxc_start_ui - tools/lxc_start.c:main:348 - Additional information can be obtained by setting the --logfile and --logpriority options.
      lxc-start 20181210114736.842 ERROR    lxc_cgfs - cgroups/cgfs.c:cgfs_init:2288 - cgroupfs failed to detect cgroup metadata
      lxc-start 20181210114736.842 ERROR    lxc_start - start.c:lxc_spawn:1094 - failed initializing cgroup support
      lxc-start 20181210114936.936 ERROR    lxc_cgfs - cgroups/cgfs.c:cgfs_init:2288 - cgroupfs failed to detect cgroup metadata
      lxc-start 20181210114936.936 ERROR    lxc_start - start.c:lxc_spawn:1094 - failed initializing cgroup support
      lxc-start 20181210140655.873 ERROR    lxc_cgfs - cgroups/cgfs.c:cgfs_init:2288 - cgroupfs failed to detect cgroup metadata
      lxc-start 20181210140655.873 ERROR    lxc_start - start.c:lxc_spawn:1094 - failed initializing cgroup support
      lxc-start 20181210141824.957 ERROR    lxc_cgfs - cgroups/cgfs.c:cgfs_init:2288 - cgroupfs failed to detect cgroup metadata
      lxc-start 20181210141824.957 ERROR    lxc_start - start.c:lxc_spawn:1094 - failed initializing cgroup support
      lxc-start 20181210151147.886 ERROR    lxc_monitor - monitor.c:lxc_monitor_read_fdset:244 - Success - client failed to recv (monitord died?) Success
      lxc-start 20181210151426.819 ERROR    lxc_cgfs - cgroups/cgfs.c:cgfs_init:2288 - cgroupfs failed to detect cgroup metadata
      lxc-start 20181210151426.819 ERROR    lxc_start - start.c:lxc_spawn:1094 - failed initializing cgroup support
      lxc-start 20181210154012.510 ERROR    lxc_monitor - monitor.c:lxc_monitor_read_fdset:244 - Success - client failed to recv (monitord died?) Success
      lxc-start 20181210155402.764 ERROR    lxc_monitor - monitor.c:lxc_monitor_read_fdset:244 - Success - client failed to recv (monitord died?) Success
      lxc-start 20181210164255.765 ERROR    lxc_monitor - monitor.c:lxc_monitor_read_fdset:244 - Success - client failed to recv (monitord died?) Success
      lxc-start 20181210170122.589 ERROR    lxc_monitor - monitor.c:lxc_monitor_read_fdset:244 - Success - client failed to recv (monitord died?) Success

# cat /etc/fstab 
...
cgroup                                          /sys/fs/cgroup   cgroup defaults        0       0

Причём строчку добавлять пришлось руками.

# cat /proc/mounts | grep cgroup
cgroup /sys/fs/cgroup cgroup rw,relatime,cpuset,cpu,cpuacct,blkio,memory,devices,freezer,net_cls,perf_event,net_prio,hugetlb,pids 0 0

# ls -l /sys/fs/cgroup | grep lxc
drwxr-xr-x 3 root root 0 дек 10 17:07 lxc
Каталог создаётся, когда пытаешься запустить контейнер.

Не lxc cgroup.

 --
Васю Максим


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

end of thread, other threads:[~2018-12-10 10:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10  9:17 [Sysadmins] lxc Ошибка сегментирования Максим Васюк
2018-12-10 10:09 ` Максим Васюк

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git