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=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 3B203C2D0F0 for ; Wed, 1 Apr 2020 14:55:22 +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 09CDC20787 for ; Wed, 1 Apr 2020 14:55:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qvSPEw7H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 09CDC20787 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJem1-00018e-2i for qemu-devel@archiver.kernel.org; Wed, 01 Apr 2020 10:55:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37003) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJel7-0000Nu-2E for qemu-devel@nongnu.org; Wed, 01 Apr 2020 10:54:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJel4-0005l4-IR for qemu-devel@nongnu.org; Wed, 01 Apr 2020 10:54:24 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:37976) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJel4-0005kb-2u for qemu-devel@nongnu.org; Wed, 01 Apr 2020 10:54:22 -0400 Received: by mail-wm1-x341.google.com with SMTP id f6so7563797wmj.3 for ; Wed, 01 Apr 2020 07:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=Osbx6HHFGQwFjcYIt2QDV44TTUd+yzKa3epcKQeFMpA=; b=qvSPEw7HWfga7z+JozjwhxnfXv/HE9FkaAgzeUGDKOFuHhvOBYGCzSaS3se5yta6dw romjnGKmP8s4dAwPxTI68Yo/epiWwuGmt6hBox49ISDU/Ni+w980H+Q4tmQV+/bHQwQJ 5FbQO+ozwfWQNntahh4aQUe7gMTQQwqYsmKXJUdVFdJHWC0s7NCWaE4VRx15G9Tu/voA BQLMTP+yg5vUHmzRihcw3crS87j/PgkzjwkgqxLpJD5JdDuYu6sfYpZk5KUQTBTDwvrX GC9AyI5ElNKGwy+XU6wrhnhq2zbmgVHIM2ika8S+pU8PnN4ojqp7HugWH/IMTbnwyuk9 r73A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=Osbx6HHFGQwFjcYIt2QDV44TTUd+yzKa3epcKQeFMpA=; b=erleEyRT4L/0/uRuPtLzGbXdRXwqlwqc7DNgeIXE2UtyJAA2f+J+XM8d1kjIZ7R+Rl ZwcYODwNsFsoG+3SL4O65MDU29rhgi1F+Kxvf6APbyncmEBmT1uG01MpGzh6N8hiREH9 NLja+mx+Dd7JOOhGTJj7xmBWqKD/0BFQ+cr+XSyaslOy0aaD7GUsVr/P4LIE536Jz45t 3vObC2eLX5Om3gBpJ22m7rxDmCqo2EtEspc5sbbHDQrTT13nLOlZhNH0uZnH7EJwxFMI dujIgfeCTcrgTNYvuY2QnYF4AuDbm2ZhARmumi8oDNj9el4GAjXR130DAOf+QqjBwyaZ eBgQ== X-Gm-Message-State: AGi0PuYA2eATXFLRm/muPoOrZu3lB03naUxSqPOJaXYYK/KidPtAzlMi OpjRLGYnUWym9cc2iKqkEDPmSQ== X-Google-Smtp-Source: APiQypJ/eLylCWXzR+21SeWZ0Dkyu2/54gbeTPid7hZWiiI6ajoUoSYpZAZTPvwD2xnb5dnc1QooIg== X-Received: by 2002:a1c:2056:: with SMTP id g83mr4636755wmg.179.1585752860182; Wed, 01 Apr 2020 07:54:20 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r9sm2924629wma.47.2020.04.01.07.54.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 07:54:18 -0700 (PDT) Received: from zen (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8C6041FF7E; Wed, 1 Apr 2020 15:54:17 +0100 (BST) References: <156345756915.8493.13426435768891424211.malonedeb@chaenomeles.canonical.com> <158574286655.23367.10331497924809979875.malone@wampee.canonical.com> User-agent: mu4e 1.3.10; emacs 28.0.50 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Bug 1837049 <1837049@bugs.launchpad.net> Subject: Re: [Bug 1837049] Re: qemu-system-ppc segfaults with -display sdl In-reply-to: <158574286655.23367.10331497924809979875.malone@wampee.canonical.com> Date: Wed, 01 Apr 2020 15:54:17 +0100 Message-ID: <87sghndzom.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Andrew Randrianasulu <1837049@bugs.launchpad.net> writes: > I think this one is fixed, I can boot Lubuntu to desktop like this: > > qemu-system-ppc -cdrom /dev/shm/lubuntu-16.04-desktop-powerpc.iso -boot > d -display sdl,gl=3Don -g 1024x768x32 -M mac99,via=3Dpmu -cpu G4 -device > ES1370 -m 2047 -accel tcg,tb-size=3D384 -device usb-mouse > > without any crash, tried few times. > > Note, tb-size seems to be important on 32-bit host now, near qemu 5.0. There were changes this cycle to remove the TB size heuristic based on guest RAM size. System emulation of 64 bit hosts gets a generous 1gb per system by default where-as 32 bit hosts make do with a smaller code buffer (which is statically allocated for user-mode). See the commits around 600e17b2615 (pull-tcg-20200228) > > qemu-system-ppc --version > QEMU emulator version 4.2.91 (v5.0.0-rc1-dirty) > Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers > > -dirty probably because I reinstalled SDL2 (2.0.9- > 2.0.12 during > compilation of qemu). I also have different glibc this time (2.30 > instead of 2.23) --=20 Alex Benn=C3=A9e 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,URIBL_BLOCKED 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 90DE4C43331 for ; Wed, 1 Apr 2020 15:02:48 +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 61977206F6 for ; Wed, 1 Apr 2020 15:02:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61977206F6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJetD-0007tk-GD for qemu-devel@archiver.kernel.org; Wed, 01 Apr 2020 11:02:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38815) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJerv-0006Fp-Jb for qemu-devel@nongnu.org; Wed, 01 Apr 2020 11:01:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJert-00047A-If for qemu-devel@nongnu.org; Wed, 01 Apr 2020 11:01:27 -0400 Received: from indium.canonical.com ([91.189.90.7]:59192) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJers-00045m-9O for qemu-devel@nongnu.org; Wed, 01 Apr 2020 11:01:25 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.86_2 #2 (Debian)) id 1jJerq-0003ko-FV for ; Wed, 01 Apr 2020 15:01:22 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 72DF62E8104 for ; Wed, 1 Apr 2020 15:01:22 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 01 Apr 2020 14:54:17 -0000 From: =?utf-8?q?Alex_Benn=C3=A9e?= 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 tcg X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: ajbennee andrew-randrianasulu rth X-Launchpad-Bug-Reporter: Andrew Randrianasulu (andrew-randrianasulu) X-Launchpad-Bug-Modifier: =?utf-8?q?Alex_Benn=C3=A9e_=28ajbennee=29?= References: <156345756915.8493.13426435768891424211.malonedeb@chaenomeles.canonical.com> <158574286655.23367.10331497924809979875.malone@wampee.canonical.com> Message-Id: <87sghndzom.fsf@linaro.org> Subject: Re: [Bug 1837049] Re: qemu-system-ppc segfaults with -display sdl 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="a296f04231dee355be5db73cc878b9e21689a253"; Instance="production-secrets-lazr.conf" X-Launchpad-Hash: 7529d6c9bbcb66fbf7b8d01532d417a243e4e0f5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 91.189.90.7 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" Message-ID: <20200401145417.TOHblYJhU4aDsxXWlTLNEOOY8AK-qzXIvk8CssGTjXc@z> Andrew Randrianasulu <1837049@bugs.launchpad.net> writes: > I think this one is fixed, I can boot Lubuntu to desktop like this: > > qemu-system-ppc -cdrom /dev/shm/lubuntu-16.04-desktop-powerpc.iso -boot > d -display sdl,gl=3Don -g 1024x768x32 -M mac99,via=3Dpmu -cpu G4 -device > ES1370 -m 2047 -accel tcg,tb-size=3D384 -device usb-mouse > > without any crash, tried few times. > > Note, tb-size seems to be important on 32-bit host now, near qemu 5.0. There were changes this cycle to remove the TB size heuristic based on guest RAM size. System emulation of 64 bit hosts gets a generous 1gb per system by default where-as 32 bit hosts make do with a smaller code buffer (which is statically allocated for user-mode). See the commits around 600e17b2615 (pull-tcg-20200228) > > qemu-system-ppc --version > QEMU emulator version 4.2.91 (v5.0.0-rc1-dirty) > Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers > > -dirty probably because I reinstalled SDL2 (2.0.9- > 2.0.12 during > compilation of qemu). I also have different glibc this time (2.30 > instead of 2.23) -- = Alex Benn=C3=A9e -- = 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