From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67132C76191 for ; Thu, 18 Jul 2019 13:56:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2711E2173E for ; Thu, 18 Jul 2019 13:56:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2711E2173E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bugs.launchpad.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho6tE-0006jO-3V for qemu-devel@archiver.kernel.org; Thu, 18 Jul 2019 09:56:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42966) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho6sq-0005Yb-1Y for qemu-devel@nongnu.org; Thu, 18 Jul 2019 09:55:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ho6sn-0000XL-3q for qemu-devel@nongnu.org; Thu, 18 Jul 2019 09:55:43 -0400 Received: from indium.canonical.com ([91.189.90.7]:45856) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ho6sm-0000TF-N2 for qemu-devel@nongnu.org; Thu, 18 Jul 2019 09:55:40 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.86_2 #2 (Debian)) id 1ho6sh-00080E-36 for ; Thu, 18 Jul 2019 13:55:35 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 13ECC2E80C9 for ; Thu, 18 Jul 2019 13:55:35 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 18 Jul 2019 13:46:09 -0000 From: Andrew Randrianasulu <1837049@bugs.launchpad.net> To: qemu-devel@nongnu.org X-Launchpad-Notification-Type: bug X-Launchpad-Bug: product=qemu; status=New; importance=Undecided; assignee=None; X-Launchpad-Bug-Tags: ppc X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: andrew-randrianasulu X-Launchpad-Bug-Reporter: Andrew Randrianasulu (andrew-randrianasulu) X-Launchpad-Bug-Modifier: Andrew Randrianasulu (andrew-randrianasulu) Message-Id: <156345756915.8493.13426435768891424211.malonedeb@chaenomeles.canonical.com> X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml X-Launchpad-Message-For: qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="19010"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 77982ad65f7ccea264dfa56e0737280dd81f9fa6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 91.189.90.7 Subject: [Qemu-devel] [Bug 1837049] [NEW] qemu-system-ppc segfaults with -display sdl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bug 1837049 <1837049@bugs.launchpad.net> Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Public bug reported: Hello. I was trying to debug this segfault: https://lists.nongnu.org/archive/html/qemu-ppc/2019-07/msg00186.html I recompiled latest qemu from git (commit 0b18cfb8f1828c905139b54c8644b0d8f= 4aad879 ), using this configure line: ./configure --target-list=3Di386-softmmu,x86_64-softmmu,ppc-softmmu --audio= -drv-list=3Dalsa --disable-werror --extra-cflags=3D"-Og" --enable-debug-tcg after this I tried original line under gdb, it was still segfaulting: --------------copy----------------- gdb ./ppc-softmmu/qemu-system-ppc GNU gdb (GDB) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i586-slackware-linux". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./ppc-softmmu/qemu-system-ppc...done. warning: File "/dev/shm/qemu/.gdbinit" auto-loading has been declined by yo= ur `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /dev/shm/qemu/.gdbinit line to your configuration file "/home/guest/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/guest/.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the she= ll: info "(gdb)Auto-loading safe path" (gdb) run -M mac99,via=3Dpmu -L ../queue-vga/pc-bios -cdrom /mnt/sdb1/PPC-= img/lubuntu-16.04-desktop-powerpc.iso -m 512 -display sdl,gl=3Don -vga std = -d guest_errors,unimp -boot d -cpu G4 -g 1024x768x24 -device ES1370 Starting program: /dev/shm/qemu/ppc-softmmu/qemu-system-ppc -M mac99,via=3D= pmu -L ../queue-vga/pc-bios -cdrom /mnt/sdb1/PPC-img/lubuntu-16.04-desktop-= powerpc.iso -m 512 -display sdl,gl=3Don -vga std -d guest_errors,unimp -boo= t d -cpu G4 -g 1024x768x24 -device ES1370 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". [New Thread 0xf560cb40 (LWP 8100)] [New Thread 0xf4c1ab40 (LWP 8101)] [New Thread 0xec1b7b40 (LWP 8102)] [New Thread 0xc5821b40 (LWP 8104)] [Thread 0xf4c1ab40 (LWP 8101) exited] [New Thread 0xf4c1ab40 (LWP 8119)] Thread 4 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xec1b7b40 (LWP 8102)] 0xf26c2e44 in code_gen_buffer () (gdb) bt full #0 0xffffffff in code_gen_buffer () #1 0x56710cf6 in cpu_exec (itb=3D, cpu=3D) a= t /dev/shm/qemu/accel/tcg/cpu-exec.c:173 env =3D ret =3D last_tb =3D tb_exit =3D tb_ptr =3D 0xf26c2cc0 "=E2=80=B9]=D1=88= =E2=80=A6=D0=AB\017=D0=8A=D0=91\020" ret =3D 0 insns_left =3D cflags =3D tb =3D 0x5722fe58 last_tb =3D tb_exit =3D cc =3D __func__ =3D "cpu_exec" ret =3D sc =3D #2 0x56710cf6 in cpu_exec (tb_exit=3D, last_tb=3D, tb=3D, cpu=3D) at /dev/shm/qem= u/accel/tcg/cpu-exec.c:621 ret =3D 0 insns_left =3D cflags =3D tb =3D 0x5722fe58 last_tb =3D tb_exit =3D cc =3D __func__ =3D "cpu_exec" ret =3D sc =3D #3 0x56710cf6 in cpu_exec (cpu=3D0x573db8f8) at /dev/shm/qemu/accel/tcg/cp= u-exec.c:732 cflags =3D tb =3D 0x5722fe58 last_tb =3D tb_exit =3D cc =3D __func__ =3D "cpu_exec" ret =3D sc =3D #4 0x566cfade in tcg_cpu_exec (cpu=3D0x573db8f8) at /dev/shm/qemu/cpus.c:1= 435 ret =3D #5 0x566d1e6d in qemu_tcg_rr_cpu_thread_fn (arg=3D0x573db8f8) at /dev/shm/= qemu/cpus.c:1537 r =3D cpu =3D 0x573db8f8 __PRETTY_FUNCTION__ =3D "qemu_tcg_rr_cpu_thread_fn" #6 0x56b56fe0 in qemu_thread_start (args=3D0x57400668) at util/qemu-thread= -posix.c:502 __cancel_buf =3D {__cancel_jmp_buf =3D {{__cancel_jmp_buf =3D {1461= 911128, 1463813736, 1461911128, -333745816, 247778263, 1392237730}, __mask_= was_saved =3D 0}}, __pad =3D {0xec1b70d0, 0x0, 0x0, 0x0}} __cancel_routine =3D 0x56b57040 __not_first_call =3D qemu_thread_args =3D 0x57400668 start_routine =3D 0x566d1a30 arg =3D 0x573db8f8 r =3D #7 0xffffffff in start_thread () at /lib/libpthread.so.0 #8 0xffffffff in clone () at /lib/libc.so.6 (gdb) quit A debugging session is active. Inferior 1 [process 8096] will be killed. Quit anyway? (y or n) y --------------copy end---------- But when I take away -display sdl, or replace it with -display gtk - same line was booting to desktop! Changing cpu to G3 also allowed boot: ./ppc-softmmu/qemu-system-ppc -M mac99,via=3Dpmu -L ../queue-vga/pc-bios -cdrom /mnt/sdb1/PPC-img/lubuntu-16.04-desktop-powerpc.iso -m 512 -display sdl -vga std -d guest_errors,unimp -boot d -cpu G3 -g 1024x768x24 -device ES1370 This is 32-bit qemu complied with Slackware's gcc 5.5.0. = 64-bit qemu works fine. ** Affects: qemu Importance: Undecided Status: New ** Tags: ppc -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1837049 Title: qemu-system-ppc segfaults with -display sdl Status in QEMU: New Bug description: Hello. I was trying to debug this segfault: https://lists.nongnu.org/archive/html/qemu-ppc/2019-07/msg00186.html I recompiled latest qemu from git (commit 0b18cfb8f1828c905139b54c8644b0d= 8f4aad879 ), using this configure line: ./configure --target-list=3Di386-softmmu,x86_64-softmmu,ppc-softmmu --aud= io-drv-list=3Dalsa --disable-werror --extra-cflags=3D"-Og" --enable-debug-t= cg after this I tried original line under gdb, it was still segfaulting: --------------copy----------------- gdb ./ppc-softmmu/qemu-system-ppc GNU gdb (GDB) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i586-slackware-linux". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./ppc-softmmu/qemu-system-ppc...done. warning: File "/dev/shm/qemu/.gdbinit" auto-loading has been declined by = your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /dev/shm/qemu/.gdbinit line to your configuration file "/home/guest/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/guest/.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the s= hell: info "(gdb)Auto-loading safe path" (gdb) run -M mac99,via=3Dpmu -L ../queue-vga/pc-bios -cdrom /mnt/sdb1/PP= C-img/lubuntu-16.04-desktop-powerpc.iso -m 512 -display sdl,gl=3Don -vga st= d -d guest_errors,unimp -boot d -cpu G4 -g 1024x768x24 -device ES1370 Starting program: /dev/shm/qemu/ppc-softmmu/qemu-system-ppc -M mac99,via= =3Dpmu -L ../queue-vga/pc-bios -cdrom /mnt/sdb1/PPC-img/lubuntu-16.04-deskt= op-powerpc.iso -m 512 -display sdl,gl=3Don -vga std -d guest_errors,unimp -= boot d -cpu G4 -g 1024x768x24 -device ES1370 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". [New Thread 0xf560cb40 (LWP 8100)] [New Thread 0xf4c1ab40 (LWP 8101)] [New Thread 0xec1b7b40 (LWP 8102)] [New Thread 0xc5821b40 (LWP 8104)] [Thread 0xf4c1ab40 (LWP 8101) exited] [New Thread 0xf4c1ab40 (LWP 8119)] Thread 4 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xec1b7b40 (LWP 8102)] 0xf26c2e44 in code_gen_buffer () (gdb) bt full #0 0xffffffff in code_gen_buffer () #1 0x56710cf6 in cpu_exec (itb=3D, cpu=3D)= at /dev/shm/qemu/accel/tcg/cpu-exec.c:173 env =3D ret =3D last_tb =3D tb_exit =3D tb_ptr =3D 0xf26c2cc0 "=E2=80=B9]=D1= =88=E2=80=A6=D0=AB\017=D0=8A=D0=91\020" ret =3D 0 insns_left =3D cflags =3D tb =3D 0x5722fe58 last_tb =3D tb_exit =3D cc =3D __func__ =3D "cpu_exec" ret =3D sc =3D #2 0x56710cf6 in cpu_exec (tb_exit=3D, last_tb=3D, tb=3D, cpu=3D) at /dev/shm/q= emu/accel/tcg/cpu-exec.c:621 ret =3D 0 insns_left =3D cflags =3D tb =3D 0x5722fe58 last_tb =3D tb_exit =3D cc =3D __func__ =3D "cpu_exec" ret =3D sc =3D #3 0x56710cf6 in cpu_exec (cpu=3D0x573db8f8) at /dev/shm/qemu/accel/tcg/= cpu-exec.c:732 cflags =3D tb =3D 0x5722fe58 last_tb =3D tb_exit =3D cc =3D __func__ =3D "cpu_exec" ret =3D sc =3D #4 0x566cfade in tcg_cpu_exec (cpu=3D0x573db8f8) at /dev/shm/qemu/cpus.c= :1435 ret =3D #5 0x566d1e6d in qemu_tcg_rr_cpu_thread_fn (arg=3D0x573db8f8) at /dev/sh= m/qemu/cpus.c:1537 r =3D cpu =3D 0x573db8f8 __PRETTY_FUNCTION__ =3D "qemu_tcg_rr_cpu_thread_fn" #6 0x56b56fe0 in qemu_thread_start (args=3D0x57400668) at util/qemu-thre= ad-posix.c:502 __cancel_buf =3D {__cancel_jmp_buf =3D {{__cancel_jmp_buf =3D {14= 61911128, 1463813736, 1461911128, -333745816, 247778263, 1392237730}, __mas= k_was_saved =3D 0}}, __pad =3D {0xec1b70d0, 0x0, 0x0, 0x0}} __cancel_routine =3D 0x56b57040 __not_first_call =3D qemu_thread_args =3D 0x57400668 start_routine =3D 0x566d1a30 arg =3D 0x573db8f8 r =3D #7 0xffffffff in start_thread () at /lib/libpthread.so.0 #8 0xffffffff in clone () at /lib/libc.so.6 (gdb) quit A debugging session is active. Inferior 1 [process 8096] will be killed. Quit anyway? (y or n) y --------------copy end---------- But when I take away -display sdl, or replace it with -display gtk - same line was booting to desktop! Changing cpu to G3 also allowed boot: ./ppc-softmmu/qemu-system-ppc -M mac99,via=3Dpmu -L ../queue-vga/pc-bios -cdrom /mnt/sdb1/PPC-img/lubuntu-16.04-desktop-powerpc.iso -m 512 -display sdl -vga std -d guest_errors,unimp -boot d -cpu G3 -g 1024x768x24 -device ES1370 This is 32-bit qemu complied with Slackware's gcc 5.5.0. = 64-bit qemu works fine. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1837049/+subscriptions