All of lore.kernel.org
 help / color / mirror / Atom feed
* qemu-system-ppc 5.0 rc1 crashing on Windows
@ 2020-04-02  9:28 Howard Spoelstra
  2020-04-02 10:47 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 7+ messages in thread
From: Howard Spoelstra @ 2020-04-02  9:28 UTC (permalink / raw)
  To: qemu-devel qemu-devel, qemu-ppc

[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]

Hi,

I just compiled qemu-system-ppc for Windows, using native msys2 on Windows
10 64 bit and the 64 bit mingw cross compiler on Fedora 31. Both create
executables that crash:

qemu-system-ppc.exe -L pc-bios -boot c -m 512 -M mac99,via=pmu -h
da C:\Mac-disks\9.2.img
Exception code=0xc0000005 flags=0x0 at 0x00007FFB2A602078. Access violation
- attempting to write data at address 0x00000000034C76EC

I bisected this down to:

d2cd29e30736afd4a1e8cac3cf4da360bbc65978 is the first bad commit
commit d2cd29e30736afd4a1e8cac3cf4da360bbc65978
Author: Richard Henderson <richard.henderson@linaro.org>
Date:   Tue Dec 17 13:47:37 2019 -1000

    configure: Do not force pie=no for non-x86

    PIE is supported on many other hosts besides x86.

    The default for non-x86 is now the same as x86: pie is used
    if supported, and may be forced via --enable/--disable-pie.

    The original commit (40d6444e91c) said:

      "Non-x86 are not changed, as they require TCG changes"

    but I think that's wrong -- there's nothing about PIE that
    affects TCG one way or another.

    Tested on aarch64 (bionic) and ppc64le (centos 7) hosts.

    Tested-by: Alex Bennée <alex.bennee@linaro.org>
    Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Please note that I tried again after applying patch
https://patchwork.ozlabs.org/patch/1265368/ However, this has not solved my
issue.

Best,
Howard

[-- Attachment #2: Type: text/html, Size: 2350 bytes --]

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

* Re: qemu-system-ppc 5.0 rc1 crashing on Windows
  2020-04-02  9:28 qemu-system-ppc 5.0 rc1 crashing on Windows Howard Spoelstra
@ 2020-04-02 10:47 ` Philippe Mathieu-Daudé
  2020-04-02 10:56   ` Howard Spoelstra
  0 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-04-02 10:47 UTC (permalink / raw)
  To: Howard Spoelstra, qemu-devel qemu-devel, qemu-ppc,
	Alex Bennée, Richard Henderson

Cc'ing the persons referenced in the commit you referred,
who happened to be chatting about this issue few hours ago on IRC.

On 4/2/20 11:28 AM, Howard Spoelstra wrote:
> Hi,
> 
> I just compiled qemu-system-ppc for Windows, using native msys2 on 
> Windows 10 64 bit and the 64 bit mingw cross compiler on Fedora 31. Both 
> create executables that crash:
> 
> qemu-system-ppc.exe -L pc-bios -boot c -m 512 -M mac99,via=pmu -h
> da C:\Mac-disks\9.2.img
> Exception code=0xc0000005 flags=0x0 at 0x00007FFB2A602078. Access 
> violation - attempting to write data at address 0x00000000034C76EC
> 
> I bisected this down to:
> 
> d2cd29e30736afd4a1e8cac3cf4da360bbc65978 is the first bad commit
> commit d2cd29e30736afd4a1e8cac3cf4da360bbc65978
> Author: Richard Henderson <richard.henderson@linaro.org 
> <mailto:richard.henderson@linaro.org>>
> Date:   Tue Dec 17 13:47:37 2019 -1000
> 
>      configure: Do not force pie=no for non-x86
> 
>      PIE is supported on many other hosts besides x86.
> 
>      The default for non-x86 is now the same as x86: pie is used
>      if supported, and may be forced via --enable/--disable-pie.
> 
>      The original commit (40d6444e91c) said:
> 
>        "Non-x86 are not changed, as they require TCG changes"
> 
>      but I think that's wrong -- there's nothing about PIE that
>      affects TCG one way or another.
> 
>      Tested on aarch64 (bionic) and ppc64le (centos 7) hosts.
> 
>      Tested-by: Alex Bennée <alex.bennee@linaro.org 
> <mailto:alex.bennee@linaro.org>>
>      Reviewed-by: Alex Bennée <alex.bennee@linaro.org 
> <mailto:alex.bennee@linaro.org>>
>      Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com 
> <mailto:philmd@redhat.com>>
>      Signed-off-by: Richard Henderson <richard.henderson@linaro.org 
> <mailto:richard.henderson@linaro.org>>
> 
> Please note that I tried again after applying patch 
> https://patchwork.ozlabs.org/patch/1265368/ However, this has not solved 
> my issue.
> 
> Best,
> Howard
> 
> 



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

* Re: qemu-system-ppc 5.0 rc1 crashing on Windows
  2020-04-02 10:47 ` Philippe Mathieu-Daudé
@ 2020-04-02 10:56   ` Howard Spoelstra
  2020-04-02 13:20     ` Alex Bennée
  0 siblings, 1 reply; 7+ messages in thread
From: Howard Spoelstra @ 2020-04-02 10:56 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Alex Bennée, Richard Henderson, qemu-ppc, qemu-devel qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2367 bytes --]

On Thu, Apr 2, 2020 at 12:47 PM Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> Cc'ing the persons referenced in the commit you referred,
> who happened to be chatting about this issue few hours ago on IRC.
>
>
Thanks, adding --disable-pie to configure solves this issue, but I guess
the default detection should work ;-)

Best,
Howard



> On 4/2/20 11:28 AM, Howard Spoelstra wrote:
> > Hi,
> >
> > I just compiled qemu-system-ppc for Windows, using native msys2 on
> > Windows 10 64 bit and the 64 bit mingw cross compiler on Fedora 31. Both
> > create executables that crash:
> >
> > qemu-system-ppc.exe -L pc-bios -boot c -m 512 -M mac99,via=pmu -h
> > da C:\Mac-disks\9.2.img
> > Exception code=0xc0000005 flags=0x0 at 0x00007FFB2A602078. Access
> > violation - attempting to write data at address 0x00000000034C76EC
> >
> > I bisected this down to:
> >
> > d2cd29e30736afd4a1e8cac3cf4da360bbc65978 is the first bad commit
> > commit d2cd29e30736afd4a1e8cac3cf4da360bbc65978
> > Author: Richard Henderson <richard.henderson@linaro.org
> > <mailto:richard.henderson@linaro.org>>
> > Date:   Tue Dec 17 13:47:37 2019 -1000
> >
> >      configure: Do not force pie=no for non-x86
> >
> >      PIE is supported on many other hosts besides x86.
> >
> >      The default for non-x86 is now the same as x86: pie is used
> >      if supported, and may be forced via --enable/--disable-pie.
> >
> >      The original commit (40d6444e91c) said:
> >
> >        "Non-x86 are not changed, as they require TCG changes"
> >
> >      but I think that's wrong -- there's nothing about PIE that
> >      affects TCG one way or another.
> >
> >      Tested on aarch64 (bionic) and ppc64le (centos 7) hosts.
> >
> >      Tested-by: Alex Bennée <alex.bennee@linaro.org
> > <mailto:alex.bennee@linaro.org>>
> >      Reviewed-by: Alex Bennée <alex.bennee@linaro.org
> > <mailto:alex.bennee@linaro.org>>
> >      Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com
> > <mailto:philmd@redhat.com>>
> >      Signed-off-by: Richard Henderson <richard.henderson@linaro.org
> > <mailto:richard.henderson@linaro.org>>
> >
> > Please note that I tried again after applying patch
> > https://patchwork.ozlabs.org/patch/1265368/ However, this has not
> solved
> > my issue.
> >
> > Best,
> > Howard
> >
> >
>
>

[-- Attachment #2: Type: text/html, Size: 3999 bytes --]

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

* Re: qemu-system-ppc 5.0 rc1 crashing on Windows
  2020-04-02 10:56   ` Howard Spoelstra
@ 2020-04-02 13:20     ` Alex Bennée
  2020-04-02 14:02       ` Howard Spoelstra
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Bennée @ 2020-04-02 13:20 UTC (permalink / raw)
  To: Howard Spoelstra
  Cc: qemu-ppc, Richard Henderson, Philippe Mathieu-Daudé,
	qemu-devel qemu-devel


Howard Spoelstra <hsp.cat7@gmail.com> writes:

> On Thu, Apr 2, 2020 at 12:47 PM Philippe Mathieu-Daudé <philmd@redhat.com>
> wrote:
>
>> Cc'ing the persons referenced in the commit you referred,
>> who happened to be chatting about this issue few hours ago on IRC.
>>
>>
> Thanks, adding --disable-pie to configure solves this issue, but I guess
> the default detection should work ;-)

Could you try the following patch:

  Subject: [PATCH for-5.0] configure: Add -Werror to PIE probe
  Date: Wed,  1 Apr 2020 14:47:56 -0700
  Message-Id: <20200401214756.6559-1-richard.henderson@linaro.org>

which fixed the win mxe cross compile failures.

>
> Best,
> Howard
>
>
>
>> On 4/2/20 11:28 AM, Howard Spoelstra wrote:
>> > Hi,
>> >
>> > I just compiled qemu-system-ppc for Windows, using native msys2 on
>> > Windows 10 64 bit and the 64 bit mingw cross compiler on Fedora 31. Both
>> > create executables that crash:
>> >
>> > qemu-system-ppc.exe -L pc-bios -boot c -m 512 -M mac99,via=pmu -h
>> > da C:\Mac-disks\9.2.img
>> > Exception code=0xc0000005 flags=0x0 at 0x00007FFB2A602078. Access
>> > violation - attempting to write data at address 0x00000000034C76EC
>> >
>> > I bisected this down to:
>> >
>> > d2cd29e30736afd4a1e8cac3cf4da360bbc65978 is the first bad commit
>> > commit d2cd29e30736afd4a1e8cac3cf4da360bbc65978
>> > Author: Richard Henderson <richard.henderson@linaro.org
>> > <mailto:richard.henderson@linaro.org>>
>> > Date:   Tue Dec 17 13:47:37 2019 -1000
>> >
>> >      configure: Do not force pie=no for non-x86
>> >
>> >      PIE is supported on many other hosts besides x86.
>> >
>> >      The default for non-x86 is now the same as x86: pie is used
>> >      if supported, and may be forced via --enable/--disable-pie.
>> >
>> >      The original commit (40d6444e91c) said:
>> >
>> >        "Non-x86 are not changed, as they require TCG changes"
>> >
>> >      but I think that's wrong -- there's nothing about PIE that
>> >      affects TCG one way or another.
>> >
>> >      Tested on aarch64 (bionic) and ppc64le (centos 7) hosts.
>> >
>> >      Tested-by: Alex Bennée <alex.bennee@linaro.org
>> > <mailto:alex.bennee@linaro.org>>
>> >      Reviewed-by: Alex Bennée <alex.bennee@linaro.org
>> > <mailto:alex.bennee@linaro.org>>
>> >      Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com
>> > <mailto:philmd@redhat.com>>
>> >      Signed-off-by: Richard Henderson <richard.henderson@linaro.org
>> > <mailto:richard.henderson@linaro.org>>
>> >
>> > Please note that I tried again after applying patch
>> > https://patchwork.ozlabs.org/patch/1265368/ However, this has not
>> solved
>> > my issue.
>> >
>> > Best,
>> > Howard
>> >
>> >
>>
>>


-- 
Alex Bennée


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

* Re: qemu-system-ppc 5.0 rc1 crashing on Windows
  2020-04-02 13:20     ` Alex Bennée
@ 2020-04-02 14:02       ` Howard Spoelstra
  2020-04-02 14:58         ` Alex Bennée
  0 siblings, 1 reply; 7+ messages in thread
From: Howard Spoelstra @ 2020-04-02 14:02 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-ppc, Richard Henderson, Philippe Mathieu-Daudé,
	qemu-devel qemu-devel

[-- Attachment #1: Type: text/plain, Size: 3414 bytes --]

On Thu, Apr 2, 2020 at 3:20 PM Alex Bennée <alex.bennee@linaro.org> wrote:

>
> Howard Spoelstra <hsp.cat7@gmail.com> writes:
>
> > On Thu, Apr 2, 2020 at 12:47 PM Philippe Mathieu-Daudé <
> philmd@redhat.com>
> > wrote:
> >
> >> Cc'ing the persons referenced in the commit you referred,
> >> who happened to be chatting about this issue few hours ago on IRC.
> >>
> >>
> > Thanks, adding --disable-pie to configure solves this issue, but I guess
> > the default detection should work ;-)
>
> Could you try the following patch:
>
>   Subject: [PATCH for-5.0] configure: Add -Werror to PIE probe
>   Date: Wed,  1 Apr 2020 14:47:56 -0700
>   Message-Id: <20200401214756.6559-1-richard.henderson@linaro.org>
>
> which fixed the win mxe cross compile failures.
>
>
Hi,

Thanks for your reply. However, I already did that. Please see the end of
my original message repeated below.
I never experienced compilation errors, just a crash when running.

>> > Please note that I tried again after applying patch
>> > https://patchwork.ozlabs.org/patch/1265368/ However, this has not
>> solved
>> > my issue.
>> >

Best,
Howard


> >
> > Best,
> > Howard
> >
> >
> >
> >> On 4/2/20 11:28 AM, Howard Spoelstra wrote:
> >> > Hi,
> >> >
> >> > I just compiled qemu-system-ppc for Windows, using native msys2 on
> >> > Windows 10 64 bit and the 64 bit mingw cross compiler on Fedora 31.
> Both
> >> > create executables that crash:
> >> >
> >> > qemu-system-ppc.exe -L pc-bios -boot c -m 512 -M mac99,via=pmu -h
> >> > da C:\Mac-disks\9.2.img
> >> > Exception code=0xc0000005 flags=0x0 at 0x00007FFB2A602078. Access
> >> > violation - attempting to write data at address 0x00000000034C76EC
> >> >
> >> > I bisected this down to:
> >> >
> >> > d2cd29e30736afd4a1e8cac3cf4da360bbc65978 is the first bad commit
> >> > commit d2cd29e30736afd4a1e8cac3cf4da360bbc65978
> >> > Author: Richard Henderson <richard.henderson@linaro.org
> >> > <mailto:richard.henderson@linaro.org>>
> >> > Date:   Tue Dec 17 13:47:37 2019 -1000
> >> >
> >> >      configure: Do not force pie=no for non-x86
> >> >
> >> >      PIE is supported on many other hosts besides x86.
> >> >
> >> >      The default for non-x86 is now the same as x86: pie is used
> >> >      if supported, and may be forced via --enable/--disable-pie.
> >> >
> >> >      The original commit (40d6444e91c) said:
> >> >
> >> >        "Non-x86 are not changed, as they require TCG changes"
> >> >
> >> >      but I think that's wrong -- there's nothing about PIE that
> >> >      affects TCG one way or another.
> >> >
> >> >      Tested on aarch64 (bionic) and ppc64le (centos 7) hosts.
> >> >
> >> >      Tested-by: Alex Bennée <alex.bennee@linaro.org
> >> > <mailto:alex.bennee@linaro.org>>
> >> >      Reviewed-by: Alex Bennée <alex.bennee@linaro.org
> >> > <mailto:alex.bennee@linaro.org>>
> >> >      Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com
> >> > <mailto:philmd@redhat.com>>
> >> >      Signed-off-by: Richard Henderson <richard.henderson@linaro.org
> >> > <mailto:richard.henderson@linaro.org>>
> >> >
> >> > Please note that I tried again after applying patch
> >> > https://patchwork.ozlabs.org/patch/1265368/ However, this has not
> >> solved
> >> > my issue.
> >> >
> >> > Best,
> >> > Howard
> >> >
> >> >
> >>
> >>
>
>
> --
> Alex Bennée
>

[-- Attachment #2: Type: text/html, Size: 5912 bytes --]

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

* Re: qemu-system-ppc 5.0 rc1 crashing on Windows
  2020-04-02 14:02       ` Howard Spoelstra
@ 2020-04-02 14:58         ` Alex Bennée
  2020-04-02 17:15           ` Howard Spoelstra
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Bennée @ 2020-04-02 14:58 UTC (permalink / raw)
  To: Howard Spoelstra
  Cc: qemu-ppc, Richard Henderson, Philippe Mathieu-Daudé,
	qemu-devel qemu-devel


Howard Spoelstra <hsp.cat7@gmail.com> writes:

> On Thu, Apr 2, 2020 at 3:20 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>
>>
>> Howard Spoelstra <hsp.cat7@gmail.com> writes:
>>
>> > On Thu, Apr 2, 2020 at 12:47 PM Philippe Mathieu-Daudé <
>> philmd@redhat.com>
>> > wrote:
>> >
>> >> Cc'ing the persons referenced in the commit you referred,
>> >> who happened to be chatting about this issue few hours ago on IRC.
>> >>
>> >>
>> > Thanks, adding --disable-pie to configure solves this issue, but I guess
>> > the default detection should work ;-)
>>
>> Could you try the following patch:
>>
>>   Subject: [PATCH for-5.0] configure: Add -Werror to PIE probe
>>   Date: Wed,  1 Apr 2020 14:47:56 -0700
>>   Message-Id: <20200401214756.6559-1-richard.henderson@linaro.org>
>>
>> which fixed the win mxe cross compile failures.
>>
>>
> Hi,
>
> Thanks for your reply. However, I already did that. Please see the end of
> my original message repeated below.
> I never experienced compilation errors, just a crash when running.
>
>>> > Please note that I tried again after applying patch
>>> > https://patchwork.ozlabs.org/patch/1265368/ However, this has not
>>> solved
>>> > my issue.

Ahh sorry missed that. Is there anyway you get can a back trace?

-- 
Alex Bennée


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

* Re: qemu-system-ppc 5.0 rc1 crashing on Windows
  2020-04-02 14:58         ` Alex Bennée
@ 2020-04-02 17:15           ` Howard Spoelstra
  0 siblings, 0 replies; 7+ messages in thread
From: Howard Spoelstra @ 2020-04-02 17:15 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-ppc, Richard Henderson, Philippe Mathieu-Daudé,
	qemu-devel qemu-devel

[-- Attachment #1: Type: text/plain, Size: 3284 bytes --]

On Thu, Apr 2, 2020 at 4:58 PM Alex Bennée <alex.bennee@linaro.org> wrote:

>
> Howard Spoelstra <hsp.cat7@gmail.com> writes:
>
> > On Thu, Apr 2, 2020 at 3:20 PM Alex Bennée <alex.bennee@linaro.org>
> wrote:
> >
> >>
> >> Howard Spoelstra <hsp.cat7@gmail.com> writes:
> >>
> >> > On Thu, Apr 2, 2020 at 12:47 PM Philippe Mathieu-Daudé <
> >> philmd@redhat.com>
> >> > wrote:
> >> >
> >> >> Cc'ing the persons referenced in the commit you referred,
> >> >> who happened to be chatting about this issue few hours ago on IRC.
> >> >>
> >> >>
> >> > Thanks, adding --disable-pie to configure solves this issue, but I
> guess
> >> > the default detection should work ;-)
> >>
> >> Could you try the following patch:
> >>
> >>   Subject: [PATCH for-5.0] configure: Add -Werror to PIE probe
> >>   Date: Wed,  1 Apr 2020 14:47:56 -0700
> >>   Message-Id: <20200401214756.6559-1-richard.henderson@linaro.org>
> >>
> >> which fixed the win mxe cross compile failures.
> >>
> >>
> > Hi,
> >
> > Thanks for your reply. However, I already did that. Please see the end of
> > my original message repeated below.
> > I never experienced compilation errors, just a crash when running.
> >
> >>> > Please note that I tried again after applying patch
> >>> > https://patchwork.ozlabs.org/patch/1265368/ However, this has not
> >>> solved
> >>> > my issue.
>
> Ahh sorry missed that. Is there anyway you get can a back trace?
>
> --
> Alex Bennée
>

Hi,

I might need a bit of help here.
I compiled qemu with:
./configure --cross-prefix=x86_64-w64-mingw32- --target-list=ppc-softmmu
--enable-gtk --enable-sdl --enable-debug

Then run gdb for Windows:

C:\qemu-debugging>gdb --args c:\qemu-master-msys2\qemu-system-ppc.exe -L
c:\qemu-master-msys2\pc-bios -boot c -m 256 -M mac99,via=pmu -hda
c:\Mac-disks\9.2.img
GNU gdb (GDB) 7.7.50.20140303-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
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 "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

This binary was built by Equation Solution <http://www.Equation.com>...
Reading symbols from c:\qemu-master-msys2\qemu-system-ppc.exe...done.
(gdb) run
Starting program: c:\qemu-master-msys2\qemu-system-ppc.exe -L
c:\qemu-master-msys2\pc-bios -boot c -m 256 -M "mac99,via=pmu" -hda
c:\Mac-disks\9.2.img
[New Thread 3076.0x1384]
[New Thread 3076.0x9a0]
[New Thread 3076.0x3074]
[New Thread 3076.0x3014]
[Thread 3076.0x9a0 exited with code 0]
[Thread 3076.0x3014 exited with code 0]
[Thread 3076.0x3074 exited with code 0]
[Inferior 1 (process 3076) exited with code 035610000]
(gdb) thread apply all bt full

I get no output.

(gdb) bt
No stack.

Best,
Howard

[-- Attachment #2: Type: text/html, Size: 4926 bytes --]

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

end of thread, other threads:[~2020-04-02 17:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02  9:28 qemu-system-ppc 5.0 rc1 crashing on Windows Howard Spoelstra
2020-04-02 10:47 ` Philippe Mathieu-Daudé
2020-04-02 10:56   ` Howard Spoelstra
2020-04-02 13:20     ` Alex Bennée
2020-04-02 14:02       ` Howard Spoelstra
2020-04-02 14:58         ` Alex Bennée
2020-04-02 17:15           ` Howard Spoelstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.