Re: Gentoo guest with smp: emerge freeze while recompile world

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/19/2010 11:33 AM, Riccardo wrote:
This is a multi-part message in MIME format.

Hi,
I have a server dual xeon quad core with gentoo and qemu:
app-emulation/qemu-kvm-0.12.3-r1  USE="aio gnutls ncurses sasl vde -alsa
-bluetooth -curl -esd -fdt -hardened -kvm-trace -pulseaudio -qemu-ifup -sdl
-static"

There is a lot of vm running with ubuntu and fedora that running without problems.

I installed one vm with latest gentoo amd64, stage3 and portage.
When I try to do an emerge -e world the process freeze after a while, any time
in differente package and there aren't any errors in the logs.
This is a screenshot of the freezed vm:
http://yfrog.com/0iscre1j

top - 10:00:50 up 10:53,  2 users,  load average: 0.00, 0.00, 0.00
Tasks: 130 total,   1 running, 124 sleeping,   0 stopped,   5 zombie
Cpu(s):  0.1%us,  0.0%sy,  0.0%ni, 99.9%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   8194776k total,   886508k used,  7308268k free,   225080k buffers
Swap:  2048248k total,        0k used,  2048248k free,   476956k cached

   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
     1 root      20   0  3760  656  552 S    0  0.0   0:00.86 init
     2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd
     3 root      RT   0     0    0    0 S    0  0.0   0:01.78 migration/0
     4 root      20   0     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0
     5 root      RT   0     0    0    0 S    0  0.0   0:02.01 migration/1
     6 root      20   0     0    0    0 S    0  0.0   0:00.01 ksoftirqd/1
     7 root      RT   0     0    0    0 S    0  0.0   0:02.05 migration/2
     8 root      20   0     0    0    0 S    0  0.0   0:00.01 ksoftirqd/2
     9 root      RT   0     0    0    0 S    0  0.0   0:02.15 migration/3
    10 root      20   0     0    0    0 S    0  0.0   0:00.01 ksoftirqd/3
    11 root      RT   0     0    0    0 S    0  0.0   0:01.69 migration/4
    12 root      20   0     0    0    0 S    0  0.0   0:00.00 ksoftirqd/4
    13 root      RT   0     0    0    0 S    0  0.0   0:01.49 migration/5
    14 root      20   0     0    0    0 S    0  0.0   0:00.00 ksoftirqd/5
    15 root      20   0     0    0    0 S    0  0.0   0:00.11 events/0
    16 root      20   0     0    0    0 S    0  0.0   0:00.21 events/1

ps -elf:
1 S root       776     2  0  80   0 -     0 scsi_e May18 ?        00:00:00
[scsi_eh_1]
1 S root       810     2  0  80   0 -     0 worker May18 ?        00:00:00
[kpsmoused]
1 S root       818     2  0  80   0 -     0 worker May18 ?        00:00:00
[kstriped]
1 S root       821     2  0  80   0 -     0 worker May18 ?        00:00:00
[kmpathd/0]
1 S root       822     2  0  80   0 -     0 worker May18 ?        00:00:00
[kmpathd/1]
1 S root       823     2  0  80   0 -     0 worker May18 ?        00:00:00
[kmpathd/2]
1 S root       824     2  0  80   0 -     0 worker May18 ?        00:00:00
[kmpathd/3]
1 S root       825     2  0  80   0 -     0 worker May18 ?        00:00:00
[kmpathd/4]
1 S root       826     2  0  80   0 -     0 worker May18 ?        00:00:00
[kmpathd/5]
1 S root       827     2  0  80   0 -     0 worker May18 ?        00:00:00
[kmpath_handlerd]
1 S root       828     2  0  80   0 -     0 worker May18 ?        00:00:00
[ksnapd]
1 S root       859     2  0  80   0 -     0 worker May18 ?        00:00:00
[usbhid_resumer]
1 S root       900     2  0  80   0 -     0 kjourn May18 ?        00:00:00
[jbd2/vda3-8]
1 S root       901     2  0  80   0 -     0 worker May18 ?        00:00:00
[ext4-dio-unwrit]
1 S root       902     2  0  80   0 -     0 worker May18 ?        00:00:00
[ext4-dio-unwrit]
1 S root       903     2  0  80   0 -     0 worker May18 ?        00:00:00
[ext4-dio-unwrit]
1 S root       904     2  0  80   0 -     0 worker May18 ?        00:00:00
[ext4-dio-unwrit]
1 S root       905     2  0  80   0 -     0 worker May18 ?        00:00:00
[ext4-dio-unwrit]
1 S root       906     2  0  80   0 -     0 worker May18 ?        00:00:00
[ext4-dio-unwrit]
5 S root      1005     1  0  76  -4 -  3098 poll_s May18 ?        00:00:00
/sbin/udevd --daemon
1 S root      2661     1  0  80   0 -  7492 wait   May18 ?        00:00:00
supervising syslog-ng
5 S root      2662  2661  0  80   0 -  7525 poll_s May18 ?        00:00:00
/usr/sbin/syslog-ng
1 S root      3250     1  0  80   0 -  9477 poll_s May18 ?        00:00:00
/usr/sbin/sshd
1 S root      3370     1  0  80   0 -  4086 hrtime May18 ?        00:00:00
/usr/sbin/cron
4 S root      3437     1  0  80   0 - 13988 wait   May18 tty1     00:00:00
/bin/login --
0 S root      3438     1  0  80   0 -  1464 n_tty_ May18 tty2     00:00:00
/sbin/agetty 38400 tty2 linux
0 S root      3439     1  0  80   0 -  1465 n_tty_ May18 tty3     00:00:00
/sbin/agetty 38400 tty3 linux
0 S root      3440     1  0  80   0 -  1464 n_tty_ May18 tty4     00:00:00
/sbin/agetty 38400 tty4 linux
0 S root      3441     1  0  80   0 -  1465 n_tty_ May18 tty5     00:00:00
/sbin/agetty 38400 tty5 linux
0 S root      3442     1  0  80   0 -  1465 n_tty_ May18 tty6     00:00:00
/sbin/agetty 38400 tty6 linux
4 S root      3443  3437  0  80   0 -  4431 n_tty_ May18 tty1     00:00:00 -bash
5 S root      3449     1  0  80   0 -  6152 poll_s May18 ?        00:01:08
SCREEN -S cs1
4 S root      3450  3449  0  80   0 -  4403 wait   May18 pts/0    00:00:00
-/bin/bash
4 S root      3454  3450  0  75  -5 - 35103 n_tty_ May18 pts/0    00:00:49
/usr/bin/python2.6 /usr/bin/emerge --resume
1 S root      5222     2  0  80   0 -     0 bdi_wr 09:50 ?        00:00:00
[flush-253:0]
4 S root      5241  3250  0  80   0 - 17913 poll_s 10:00 ?        00:00:00
sshd: root@pts/2
4 S root      5244  5241  0  80   0 -  4401 wait   10:00 pts/2    00:00:00 -bash
4 R root      5251  5244  0  80   0 -  3671 -      10:02 pts/2    00:00:00 ps -elf
0 S root     12724  3454  0  75  -5 -   955 wait   May18 pts/0    00:00:00
[sys-libs/glibc-2.10.1-r1] sandbox "/usr/lib64/portage/bin/ebuild.sh" compile
4 S root     12725 12724  0  75  -5 -  6431 wait   May18 pts/0    00:00:00
/bin/bash /usr/lib64/portage/bin/ebuild.sh compile
5 S root     12756 12725  0  75  -5 -  6936 wait   May18 pts/0    00:00:00
/bin/bash /usr/lib64/portage/bin/ebuild.sh compile
4 S root     14901 12756  0  75  -5 -  3631 wait   May18 pts/0    00:00:00
make PARALLELMFLAGS=-j8
4 S root     14902 14901  0  75  -5 -  5155 wait   May18 pts/0    00:00:01
make -r PARALLELMFLAGS=-j8 CVSOPTS= -C
/var/tmp/portage/sys-libs/glibc-2.10..1-r1/work/glibc-2.10.1 objdir=/var/tmp/
4 S root     30286 14902  0  75  -5 -  5784 n_tty_ May18 pts/0    00:00:03
make -j8 subdir=nptl -C nptl ..=../ subdir_lib
4 Z root     31542 30286  0  75  -5 -     0 exit   01:11 pts/0    00:00:00
[x86_64-pc-linux]<defunct>
4 Z root     31543 30286  0  75  -5 -     0 exit   01:11 pts/0    00:00:00
[x86_64-pc-linux]<defunct>
4 Z root     31544 30286  0  75  -5 -     0 exit   01:11 pts/0    00:00:00
[x86_64-pc-linux]<defunct>
4 Z root     31545 30286  0  75  -5 -     0 exit   01:11 pts/0    00:00:00
[x86_64-pc-linux]<defunct>
4 Z root     31547 30286  0  75  -5 -     0 exit   01:11 pts/0    00:00:00
[x86_64-pc-linux]<defunct>


I found the same problem with
gentoo-sources-2.6.32-r7,2.6.33,2.6.33-r1,2.6.33-2 always with -smp 2, 4 or 6.
Kernel .config:
http://pastebin.org/252943
With 2.6.32-r7 I notice the emerge will freeze after a lot of compiled
packages, while with the 2.6.33 series after 30-40 compiled packages, emerge
freeze.

If I run vm without -smp there aren't any freeze of emerge.

In the same server there are other VMs with ubuntu and -smp 6 and works
without any problems.

There is a limit max cpus for -smp ? for the total of the VMs running in the
server?
Any suggestions?
It's possible to enable a log for what service?

There are almost impossible to debug.

Try copying vmlinux out of your guest and attach with gdb when it hangs. Then issue the command

  (gdb) thread apply all backtrace

to see what the guest is doing.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux