From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDgF9-0000Yg-CW for qemu-devel@nongnu.org; Sat, 02 Aug 2014 16:49:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDgF4-0006xe-Hd for qemu-devel@nongnu.org; Sat, 02 Aug 2014 16:49:31 -0400 Received: from servus.gmplib.org ([193.10.5.126]:62795 helo=shell.gmplib.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDgF4-0006xU-AH for qemu-devel@nongnu.org; Sat, 02 Aug 2014 16:49:26 -0400 From: tg@gmplib.org (=?utf-8?Q?Torbj=C3=B6rn?= Granlund) Sender: tg@gmplib.org Date: Sat, 02 Aug 2014 22:49:22 +0200 Message-ID: <86egwyfwh9.fsf@shell.gmplib.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Crashes of qemu-system-mips64 and qemu-system-mips64el List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Qemu versions 1.7.0, 1.7.1, 2.0.0, 2.1.0 do not run Debian mips64 BE or LE stably. While install in 32-bit mode typically works, running the 64-bit kernel causes qemu to segfault or abort after a while. How to reproduce: Grab installation kernel and initrd: ftp://ftp.debian.org/debian/dists/wheezy/main/installer-mips/current/images= /malta/netboot/vmlinux-3.2.0-4-4kc-malta ftp://ftp.debian.org/debian/dists/wheezy/main/installer-mips/current/images= /malta/netboot/initrd.gz Start qemu-system-mips64 and perform an installation. Choose defaults, i.e., "Standard system utilities" and "SSH server". qemu-system-mips64 -M malta -m 256 -nographic \ -drive file=3Ddisk.img,if=3Dvirtio,index=3D0 \ -net nic,macaddr=3D52:54:00:13:06:64 -net user,hostfwd=3Dtcp::20008-:22= \ -kernel vmlinux-3.2.0-4-4kc-malta \ -initrd initrd.gz \ -append "console=3DttyS0" Copy out /boot somehow. I usually do "Execute a shell" just before the installation is about to finish, and there do mount /dev/vda2 /target mount /dev/vda1 /target/boot mount -t proc proc /target/proc mount --rbind /sys /target/sys mount --rbind /dev /target/dev chroot /target bash /etc/init.d/ssh start (assuming "put all files in one partition" was chosen; mount commands might need adjustment for other partitioning schemes). Then from the host system I do scp -pr -P 20008 localhost:/boot . and then quit the shell and finish up the installation. (Alternatively use qemu-nbd or guestfish.) Then boot the installed system: qemu-system-mips64 -M malta -cpu 5Kc -m 256 \ -drive file=3Ddisk.img,if=3Dvirtio,index=3D0 \ -net nic,macaddr=3D52:54:00:13:06:64 -net user,hostfwd=3Dtcp::20008-:22= \ -kernel boot/vmlinux-3.2.0-4-5kc-malta \ -initrd boot/initrd.img-3.2.0-4-5kc-malta \ -append "root=3D/dev/vda1 console=3DttyS0" \ -nographic -serial null -monitor null Then, log in to the system ("ssh -p 20008 root@localhost) and try the system. It will crash within hours, but usually within minutes. Safe crash strategy: package_list=3D"gcc g++ gdb make emacs23-nox postfix sharutils zsh rsync = ntp" apt-get -y install $package_list gcc-multilib g++-multilib Not crashed yet? Let's provoke it somewhat more: wget https://ftp.gnu.org/gnu/gmp/gmp-6.0.0a.tar.bz2 tar xf gmp-6.0.0a.tar.bz2 cd gmp-6.0.0 (configure && make && while true; do make check; done) >&/dev/null Note that I have reproduced this problem on several host machines. Host system stability is not the root cause. The host system has been either GNU/Linux or FreeBSD. I have not found a stable setup since before qemu 1.7.0. I know it was stable around 1.5.x or 1.6.x. (Even older qemus executed a few instructions incorrectly, making them inadequate for my use.) Other notes: 1. Replacing virtio with ide for the disk spec does not improve things. 2. Both qemu-system-mips64 and qemu-system-mips64el exhibit the same instability patterns. 3. At least qemu-system-mips64el 2.1.0 sometimes hangs also during initial install, i.e., while running in 32-bit mode. (I only observed this with virtio disk.) Torbj=C3=B6rn Please encrypt, key id 0xC8601622