All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] -M niagara -nodefaults crashes
@ 2017-01-20 13:26 Markus Armbruster
  2017-01-20 14:19 ` Artyom Tarasenko
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Armbruster @ 2017-01-20 13:26 UTC (permalink / raw)
  To: Artyom Tarasenko; +Cc: qemu-devel

Watch this:

    $ gdb --args bld/sparc64-softmmu/qemu-system-* -nodefaults -M niagara
    [...]
    (gdb) r
    Starting program: /work/armbru/qemu/bld/sparc64-softmmu/qemu-system-sparc64 -nodefaults -M niagara
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib64/libthread_db.so.1".
    [New Thread 0x7fffce25d700 (LWP 17401)]
    [New Thread 0x7fffcb0c1700 (LWP 17402)]
    Could not open option rom 'nvram1': No such file or directory
    Could not open option rom '1up-md.bin': No such file or directory
    Could not open option rom '1up-hv.bin': No such file or directory
    Could not open option rom 'reset.bin': No such file or directory
    Could not open option rom 'q.bin': No such file or directory
    Could not open option rom 'openboot.bin': No such file or directory

    Thread 1 "qemu-system-spa" received signal SIGSEGV, Segmentation fault.
    qemu_chr_fe_init (b=b@entry=0x5555566bea60, s=0x0, 
        errp=0x555556497e68 <error_abort>) at /work/armbru/qemu/qemu-char.c:897
    897	    if (s->is_mux) {
    (gdb) bt
    #0  0x0000555555833500 in qemu_chr_fe_init (b=b@entry=0x5555566bea60, s=0x0, errp=0x555556497e68 <error_abort>) at /work/armbru/qemu/qemu-char.c:897
    #1  0x0000555555890a0a in serial_mm_init (address_space=address_space@entry=0x55555653dbd0, base=base@entry=133412421632, it_shift=it_shift@entry=0, irq=irq@entry=0x0, baudbase=baudbase@entry=115200, chr=<optimized out>, end=
        DEVICE_BIG_ENDIAN) at /work/armbru/qemu/hw/char/serial.c:995
    #2  0x00005555558107e2 in niagara_init (machine=0x55555653bf80)
        at /work/armbru/qemu/hw/sparc64/niagara.c:149
    #3  0x00005555557726ea in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /work/armbru/qemu/vl.c:4544

In other code that's similarly stuck in the pre-qdev world, the call to
serial_mm_init() is conditional on serial_hds[0].

Please also consider qdevification.

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

* Re: [Qemu-devel] -M niagara -nodefaults crashes
  2017-01-20 13:26 [Qemu-devel] -M niagara -nodefaults crashes Markus Armbruster
@ 2017-01-20 14:19 ` Artyom Tarasenko
  2017-01-20 16:02   ` Markus Armbruster
  0 siblings, 1 reply; 3+ messages in thread
From: Artyom Tarasenko @ 2017-01-20 14:19 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel

On Fri, Jan 20, 2017 at 2:26 PM, Markus Armbruster <armbru@redhat.com> wrote:
> Watch this:
>
>     $ gdb --args bld/sparc64-softmmu/qemu-system-* -nodefaults -M niagara
>     [...]
>     (gdb) r
>     Starting program: /work/armbru/qemu/bld/sparc64-softmmu/qemu-system-sparc64 -nodefaults -M niagara
>     [Thread debugging using libthread_db enabled]
>     Using host libthread_db library "/lib64/libthread_db.so.1".
>     [New Thread 0x7fffce25d700 (LWP 17401)]
>     [New Thread 0x7fffcb0c1700 (LWP 17402)]
>     Could not open option rom 'nvram1': No such file or directory
>     Could not open option rom '1up-md.bin': No such file or directory
>     Could not open option rom '1up-hv.bin': No such file or directory
>     Could not open option rom 'reset.bin': No such file or directory
>     Could not open option rom 'q.bin': No such file or directory
>     Could not open option rom 'openboot.bin': No such file or directory
>
>     Thread 1 "qemu-system-spa" received signal SIGSEGV, Segmentation fault.
>     qemu_chr_fe_init (b=b@entry=0x5555566bea60, s=0x0,
>         errp=0x555556497e68 <error_abort>) at /work/armbru/qemu/qemu-char.c:897
>     897     if (s->is_mux) {
>     (gdb) bt
>     #0  0x0000555555833500 in qemu_chr_fe_init (b=b@entry=0x5555566bea60, s=0x0, errp=0x555556497e68 <error_abort>) at /work/armbru/qemu/qemu-char.c:897
>     #1  0x0000555555890a0a in serial_mm_init (address_space=address_space@entry=0x55555653dbd0, base=base@entry=133412421632, it_shift=it_shift@entry=0, irq=irq@entry=0x0, baudbase=baudbase@entry=115200, chr=<optimized out>, end=
>         DEVICE_BIG_ENDIAN) at /work/armbru/qemu/hw/char/serial.c:995
>     #2  0x00005555558107e2 in niagara_init (machine=0x55555653bf80)
>         at /work/armbru/qemu/hw/sparc64/niagara.c:149
>     #3  0x00005555557726ea in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /work/armbru/qemu/vl.c:4544
>
> In other code that's similarly stuck in the pre-qdev world, the call to
> serial_mm_init() is conditional on serial_hds[0].

Will add a check. A -nodefaults with -M niagara makes currenlty a
little sense though: there is no any known firmware which can use any
other configuration. Do we have any machines in qemu which don't
support -nodefaults ?

Artyom

-- 
Regards,
Artyom Tarasenko

SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu

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

* Re: [Qemu-devel] -M niagara -nodefaults crashes
  2017-01-20 14:19 ` Artyom Tarasenko
@ 2017-01-20 16:02   ` Markus Armbruster
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2017-01-20 16:02 UTC (permalink / raw)
  To: Artyom Tarasenko
  Cc: qemu-devel, Beniamino Galvani, Edgar E. Iglesias, Jia Liu

Artyom Tarasenko <atar4qemu@gmail.com> writes:

> On Fri, Jan 20, 2017 at 2:26 PM, Markus Armbruster <armbru@redhat.com> wrote:
>> Watch this:
>>
>>     $ gdb --args bld/sparc64-softmmu/qemu-system-* -nodefaults -M niagara
>>     [...]
>>     (gdb) r
>>     Starting program: /work/armbru/qemu/bld/sparc64-softmmu/qemu-system-sparc64 -nodefaults -M niagara
>>     [Thread debugging using libthread_db enabled]
>>     Using host libthread_db library "/lib64/libthread_db.so.1".
>>     [New Thread 0x7fffce25d700 (LWP 17401)]
>>     [New Thread 0x7fffcb0c1700 (LWP 17402)]
>>     Could not open option rom 'nvram1': No such file or directory
>>     Could not open option rom '1up-md.bin': No such file or directory
>>     Could not open option rom '1up-hv.bin': No such file or directory
>>     Could not open option rom 'reset.bin': No such file or directory
>>     Could not open option rom 'q.bin': No such file or directory
>>     Could not open option rom 'openboot.bin': No such file or directory
>>
>>     Thread 1 "qemu-system-spa" received signal SIGSEGV, Segmentation fault.
>>     qemu_chr_fe_init (b=b@entry=0x5555566bea60, s=0x0,
>>         errp=0x555556497e68 <error_abort>) at /work/armbru/qemu/qemu-char.c:897
>>     897     if (s->is_mux) {
>>     (gdb) bt
>>     #0  0x0000555555833500 in qemu_chr_fe_init (b=b@entry=0x5555566bea60, s=0x0, errp=0x555556497e68 <error_abort>) at /work/armbru/qemu/qemu-char.c:897
>>     #1  0x0000555555890a0a in serial_mm_init (address_space=address_space@entry=0x55555653dbd0, base=base@entry=133412421632, it_shift=it_shift@entry=0, irq=irq@entry=0x0, baudbase=baudbase@entry=115200, chr=<optimized out>, end=
>>         DEVICE_BIG_ENDIAN) at /work/armbru/qemu/hw/char/serial.c:995
>>     #2  0x00005555558107e2 in niagara_init (machine=0x55555653bf80)
>>         at /work/armbru/qemu/hw/sparc64/niagara.c:149
>>     #3  0x00005555557726ea in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /work/armbru/qemu/vl.c:4544
>>
>> In other code that's similarly stuck in the pre-qdev world, the call to
>> serial_mm_init() is conditional on serial_hds[0].
>
> Will add a check. A -nodefaults with -M niagara makes currenlty a
> little sense though: there is no any known firmware which can use any
> other configuration. Do we have any machines in qemu which don't
> support -nodefaults ?

If the machine doesn't support a certain configuration, it should reject
it, not crash.  The following machines crash in my testing:

* aarch64/arm cubieboard
* microblaze/microblazeel petalogix-ml605
* or32 or32-sim
* ppc/ppc64/ppcemb virtex-ml507
* sparc64 niagara

Reproducer:

    echo -e 'q' | QEMU_AUDIO_DRV=none $q -nodefaults -S -display none -M $m,accel=qtest -monitor stdio

Maintainers cc'ed.

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

end of thread, other threads:[~2017-01-20 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-20 13:26 [Qemu-devel] -M niagara -nodefaults crashes Markus Armbruster
2017-01-20 14:19 ` Artyom Tarasenko
2017-01-20 16:02   ` Markus Armbruster

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.