All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-x86_64 on i386 host: SIGSEGV
@ 2013-03-24 10:43 Michael Tokarev
  2013-03-24 10:59 ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Tokarev @ 2013-03-24 10:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: sur5r

$ ./x86_64-linux-user/qemu-x86_64 bash64
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation Fault

$ gdb x86_64-linux-user/qemu-x86_64
(gdb) ru bash64
Program received signal SIGSEGV, Segmentation fault.
disas_insn (s=s@entry=0xffffcf98, pc_start=18446744073699066880)
    at target-i386/translate.c:4107
4107	    b = ldub_code(s->pc);
(gdb) p *s
$1 = {override = -1, prefix = 1484501952, aflag = 1, dflag = 1484503884,
  pc = 18446744073699066880, is_jmp = 0, cs_base = 0, pe = 1, code32 = 1,
  lma = 1, code64 = 1, rex_x = 0, rex_b = 0, ss32 = 1, cc_op = 0, addseg = 0,
  f_st = 0, vm86 = 0, cpl = 3, iopl = 0, tf = 0, singlestep_enabled = 0,
  jmp_opt = 1, mem_index = 0, flags = 4243635, tb = 0xf50e9f88,
  popl_esp_hack = 0, rip_offset = 0, cpuid_features = 126614521,
  cpuid_ext_features = -2139086847, cpuid_ext2_features = 563194873,
  cpuid_ext3_features = 101}

This is with current git.  Previous versions (tried 1.1 and 1.4)
segfaults in the same place too.

Some binaries works - for example, gzip (it prints "qemu: Unsupported syscall:
202" on the way which is a different issue).

Thanks,

/mjt

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

* Re: [Qemu-devel] qemu-x86_64 on i386 host: SIGSEGV
  2013-03-24 10:43 [Qemu-devel] qemu-x86_64 on i386 host: SIGSEGV Michael Tokarev
@ 2013-03-24 10:59 ` Peter Maydell
  2013-03-24 13:24   ` Michael Tokarev
  2013-03-25 15:03   ` Richard Henderson
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Maydell @ 2013-03-24 10:59 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: sur5r, qemu-devel, Richard Henderson

On 24 March 2013 10:43, Michael Tokarev <mjt@tls.msk.ru> wrote:
> $ ./x86_64-linux-user/qemu-x86_64 bash64
> qemu: uncaught target signal 11 (Segmentation fault) - core dumped
> Segmentation Fault

Are 64 bit linux-user guests on 32 bit hosts supposed to work?
I would expect them to be at best pretty unreliable.

> $ gdb x86_64-linux-user/qemu-x86_64
> (gdb) ru bash64
> Program received signal SIGSEGV, Segmentation fault.
> disas_insn (s=s@entry=0xffffcf98, pc_start=18446744073699066880)
>     at target-i386/translate.c:4107
> 4107        b = ldub_code(s->pc);
> (gdb) p *s
> $1 = {override = -1, prefix = 1484501952, aflag = 1, dflag = 1484503884,
>   pc = 18446744073699066880, is_jmp = 0, cs_base = 0, pe = 1, code32 = 1,

PC is FFFFFFFFFF600400 so either we've messed it up already or this
is just "64 bit address space doesn't fit in a 32 bit one".

> Some binaries works - for example, gzip (it prints "qemu: Unsupported syscall:
> 202" on the way which is a different issue).

Yes. That is just the usual "x86 linux-user isn't really supported":
202 is TARGET_NR_futex, which works on other target archs but
won't on x86 until somebody actually fixes support for threaded
guests in x86 to at least the level it is for other targets.

-- PMM

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

* Re: [Qemu-devel] qemu-x86_64 on i386 host: SIGSEGV
  2013-03-24 10:59 ` Peter Maydell
@ 2013-03-24 13:24   ` Michael Tokarev
  2013-03-25 15:03   ` Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Tokarev @ 2013-03-24 13:24 UTC (permalink / raw)
  To: Peter Maydell; +Cc: sur5r, qemu-devel, Richard Henderson

24.03.2013 14:59, Peter Maydell wrote:
> On 24 March 2013 10:43, Michael Tokarev <mjt@tls.msk.ru> wrote:
>> $ ./x86_64-linux-user/qemu-x86_64 bash64
>> qemu: uncaught target signal 11 (Segmentation fault) - core dumped
>> Segmentation Fault
> 
> Are 64 bit linux-user guests on 32 bit hosts supposed to work?
> I would expect them to be at best pretty unreliable.

What's the reason we build these binaries in that case?

What about qemu-x86_64 on other 32bit arches (arm)?  Is
there a list of combinations (host/target) which are
supposed to work and which don't, somewhere?

>> $ gdb x86_64-linux-user/qemu-x86_64
>> (gdb) ru bash64
>> Program received signal SIGSEGV, Segmentation fault.
>> disas_insn (s=s@entry=0xffffcf98, pc_start=18446744073699066880)
>>     at target-i386/translate.c:4107
>> 4107        b = ldub_code(s->pc);
>> (gdb) p *s
>> $1 = {override = -1, prefix = 1484501952, aflag = 1, dflag = 1484503884,
>>   pc = 18446744073699066880, is_jmp = 0, cs_base = 0, pe = 1, code32 = 1,
> 
> PC is FFFFFFFFFF600400 so either we've messed it up already or this
> is just "64 bit address space doesn't fit in a 32 bit one".

>> Some binaries works - for example, gzip (it prints "qemu: Unsupported syscall:
>> 202" on the way which is a different issue).
> 
> Yes. That is just the usual "x86 linux-user isn't really supported":
> 202 is TARGET_NR_futex, which works on other target archs but
> won't on x86 until somebody actually fixes support for threaded
> guests in x86 to at least the level it is for other targets.

Maybe we should stop building x86 linux-user completely?

Thanks,

/mjt

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

* Re: [Qemu-devel] qemu-x86_64 on i386 host: SIGSEGV
  2013-03-24 10:59 ` Peter Maydell
  2013-03-24 13:24   ` Michael Tokarev
@ 2013-03-25 15:03   ` Richard Henderson
  2013-03-25 15:36     ` Laurent Desnogues
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2013-03-25 15:03 UTC (permalink / raw)
  To: Peter Maydell; +Cc: sur5r, Michael Tokarev, qemu-devel

On 03/24/2013 03:59 AM, Peter Maydell wrote:
> PC is FFFFFFFFFF600400 so either we've messed it up already or this
> is just "64 bit address space doesn't fit in a 32 bit one".

This is probably the fallback vdso address.

I've previously sent patches to the list (several times) to add a real
vdso to qemu for x86_64, so that the glibc will do the right thing, but
the patches never got reviewed or applied.

I could revive them if someone commits to reviewing them this time.


r~

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

* Re: [Qemu-devel] qemu-x86_64 on i386 host: SIGSEGV
  2013-03-25 15:03   ` Richard Henderson
@ 2013-03-25 15:36     ` Laurent Desnogues
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent Desnogues @ 2013-03-25 15:36 UTC (permalink / raw)
  To: Richard Henderson; +Cc: sur5r, Peter Maydell, Michael Tokarev, qemu-devel

On Mon, Mar 25, 2013 at 4:03 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 03/24/2013 03:59 AM, Peter Maydell wrote:
>> PC is FFFFFFFFFF600400 so either we've messed it up already or this
>> is just "64 bit address space doesn't fit in a 32 bit one".
>
> This is probably the fallback vdso address.

Yes, it looks like __NR_vtime.


Laurent

> I've previously sent patches to the list (several times) to add a real
> vdso to qemu for x86_64, so that the glibc will do the right thing, but
> the patches never got reviewed or applied.
>
> I could revive them if someone commits to reviewing them this time.
>
>
> r~
>

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

end of thread, other threads:[~2013-03-25 15:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-24 10:43 [Qemu-devel] qemu-x86_64 on i386 host: SIGSEGV Michael Tokarev
2013-03-24 10:59 ` Peter Maydell
2013-03-24 13:24   ` Michael Tokarev
2013-03-25 15:03   ` Richard Henderson
2013-03-25 15:36     ` Laurent Desnogues

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.