qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] 32bit emulation in x86_64 System emulation
@ 2005-10-27  6:37 Mario Goppold
  2005-10-28 10:46 ` Mario Goppold
  2005-11-11 14:00 ` [SOLVED] " Mario Goppold
  0 siblings, 2 replies; 3+ messages in thread
From: Mario Goppold @ 2005-10-27  6:37 UTC (permalink / raw)
  To: qemu-devel

Hi list,

I've tried to install SuSE92 x68_64 as guest (qemu 0.7.2 with and without 
kqemu). During the install grub terminates with core. But not only grub 
terminates: 

  #include <stdio.h> 
  int main() { 
    printf("Hallo Welt!\n"); 
    return 0; 
  } 
 
  gcc a.c ; ./a.out is ok but 
  gcc -m32 a.c; ./a.out Segmentation fault (core dumped) 
 
with gdb: 
  Core was generated by `./a.out'. 
  Program terminated with signal 11, Segmentation fault. 
 
  warning: current_sos: Can't read pathname for load map: Input/output error 
 
  Reading symbols from /lib/tls/libc.so.6...done. 
  Loaded symbols for /lib/tls/libc.so.6 
  Reading symbols from /lib/ld-linux.so.2...done. 
  Loaded symbols for /lib/ld-linux.so.2 
  #0  0x5568aff4 in ?? () from /lib/tls/libc.so.6 
  (gdb) where 
  #0  0x5568aff4 in ?? () from /lib/tls/libc.so.6 
  #1  0x555d4bf3 in _IO_file_stat_internal () from /lib/tls/libc.so.6 
  #2  0x555d4bf3 in _IO_file_stat_internal () from /lib/tls/libc.so.6 
  #3  0x555ca494 in _IO_file_doallocate_internal () from /lib/tls/libc.so.6 
  #4  0x555d77be in _IO_doallocbuf_internal () from /lib/tls/libc.so.6 
  #5  0x555d550a in _IO_new_file_overflow () from /lib/tls/libc.so.6 
  #6  0x555d49fd in _IO_new_file_xsputn () from /lib/tls/libc.so.6 
  #7  0x555b25e8 in vfprintf () from /lib/tls/libc.so.6 
  #8  0x555ba7b0 in printf () from /lib/tls/libc.so.6 
  #9  0x080483e0 in main () at a.c:4

What's worng? Outside of qemu it works fine. 
In the meantime i've found out that's not (only) a SuSE problem:

SuSE92, SuSE93, SuSE10, FC4 fails but Ubuntu 5.10 works fine (all in x86_64).
 
Have anyone see this behaviour. What can i do?

Mario

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

* Re: [Qemu-devel] 32bit emulation in x86_64 System emulation
  2005-10-27  6:37 [Qemu-devel] 32bit emulation in x86_64 System emulation Mario Goppold
@ 2005-10-28 10:46 ` Mario Goppold
  2005-11-11 14:00 ` [SOLVED] " Mario Goppold
  1 sibling, 0 replies; 3+ messages in thread
From: Mario Goppold @ 2005-10-28 10:46 UTC (permalink / raw)
  To: qemu-devel

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


Today I found out that the output of nm and ldd for both are identical. The 
binaries are exchangeable. In other words the compiler produces the same 
output. And here are the diffs between the strace calls (as attachment).

What else can I do? Any suggestions?

Mario 
 

Am Donnerstag, 27. Oktober 2005 08:37 schrieb Mario Goppold:
> Hi list,
>
> I've tried to install SuSE92 x68_64 as guest (qemu 0.7.2 with and without
> kqemu). During the install grub terminates with core. But not only grub
> terminates:
>
>   #include <stdio.h>
>   int main() {
>     printf("Hallo Welt!\n");
>     return 0;
>   }
>
>   gcc a.c ; ./a.out is ok but
>   gcc -m32 a.c; ./a.out Segmentation fault (core dumped)
>
> with gdb:
>   Core was generated by `./a.out'.
>   Program terminated with signal 11, Segmentation fault.
>
>   warning: current_sos: Can't read pathname for load map: Input/output
> error
>
>   Reading symbols from /lib/tls/libc.so.6...done.
>   Loaded symbols for /lib/tls/libc.so.6
>   Reading symbols from /lib/ld-linux.so.2...done.
>   Loaded symbols for /lib/ld-linux.so.2
>   #0  0x5568aff4 in ?? () from /lib/tls/libc.so.6
>   (gdb) where
>   #0  0x5568aff4 in ?? () from /lib/tls/libc.so.6
>   #1  0x555d4bf3 in _IO_file_stat_internal () from /lib/tls/libc.so.6
>   #2  0x555d4bf3 in _IO_file_stat_internal () from /lib/tls/libc.so.6
>   #3  0x555ca494 in _IO_file_doallocate_internal () from /lib/tls/libc.so.6
>   #4  0x555d77be in _IO_doallocbuf_internal () from /lib/tls/libc.so.6
>   #5  0x555d550a in _IO_new_file_overflow () from /lib/tls/libc.so.6
>   #6  0x555d49fd in _IO_new_file_xsputn () from /lib/tls/libc.so.6
>   #7  0x555b25e8 in vfprintf () from /lib/tls/libc.so.6
>   #8  0x555ba7b0 in printf () from /lib/tls/libc.so.6
>   #9  0x080483e0 in main () at a.c:4
>
> What's worng? Outside of qemu it works fine.
> In the meantime i've found out that's not (only) a SuSE problem:
>
> SuSE92, SuSE93, SuSE10, FC4 fails but Ubuntu 5.10 works fine (all in
> x86_64).
>
> Have anyone see this behaviour. What can i do?
>
> Mario
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel

[-- Attachment #2: qemu.suse92.strace.out_suse92.strace.out.diff --]
[-- Type: text/x-diff, Size: 2535 bytes --]

--- qemu.suse92.strace.out	2005-10-28 12:12:47.318635137 +0200
+++ suse92.strace.out	2005-10-28 11:36:06.664647905 +0200
@@ -1,14 +1,14 @@
 execve("./a.out", ["./a.out"], [/* 42 vars */]) = 0
-uname({sys="Linux", node="SuSE92x86-64", ...}) = 0
+uname({sys="Linux", node="linux", ...}) = 0
 brk(0)                                  = 0x804a000
 access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
 open("/etc/ld.so.cache", O_RDONLY)      = 3
-fstat64(0x3, 0xffffcdb8)                = 0
-old_mmap(0x5c3e00000000, 8589934593, PROT_READ|PROT_WRITE, 0xf /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE|MAP_POPULATE|MAP_NONBLOCK|MAP_GROWSDOWN|MAP_DENYWRITE|MAP_EXECUTABLE|MAP_LOCKED|0xfffe06c0, 770, 0xa9c000000000) = 0x5556d000
+fstat64(0x3, 0xffffcdc8)                = 0
+old_mmap(0x5ccc00000000, 8589934593, PROT_READ|PROT_WRITE, 0xf /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|MAP_NORESERVE|MAP_POPULATE|MAP_NONBLOCK|MAP_GROWSDOWN|MAP_DENYWRITE|MAP_EXECUTABLE|MAP_LOCKED|0xfffe06c0, 2051, 0xb08600000000) = 0x5556d000
 close(3)                                = 0
 open("/lib/tls/libc.so.6", O_RDONLY)    = 3
 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0L\1\000"..., 512) = 512
-fstat64(0x3, 0xffffce30)                = 0
+fstat64(0x3, 0xffffce40)                = 0
 old_mmap(0x115c2c00000000, 8804682956805, PROT_READ|PROT_WRITE, MAP_FILE, 0, 0) = 0x55573000
 madvise(0x55573000, 1137708, MADV_SEQUENTIAL|0x1) = 0
 mprotect(0x55682000, 27692, PROT_NONE)  = 0
@@ -17,9 +17,12 @@
 close(3)                                = 0
 old_mmap(0x100000000000, 146028888067, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_SEM|PROT_GROWSDOWN|PROT_GROWSUP|0xfcfffff0, 0xc /* MAP_??? */|MAP_ANONYMOUS|MAP_POPULATE|MAP_GROWSDOWN|MAP_DENYWRITE|MAP_EXECUTABLE|MAP_LOCKED|0x555606c0, 16, 0x855565d95) = 0x55689000
 mprotect(0x55683000, 4096, PROT_READ)   = 0
-set_thread_area(0xffffd448)             = 0
-munmap(0x5556d000, 23614)               = 0
---- SIGSEGV (Segmentation fault) @ 0 (0) ---
-+++ killed by SIGSEGV +++
-[ Process PID=2231 runs in 32 bit mode. ]
-[ Process PID=2231 runs in 64 bit mode. ]
+set_thread_area(0xffffd458)             = 0
+munmap(0x5556d000, 23756)               = 0
+fstat64(0x1, 0xffffcfe8)                = 0
+mmap2(NULL, 4096, PROT_READ|PROT_WRITE, 0x3 /* MAP_??? */, 34, 0xffffffff) = 0x5556d000
+write(1, "Hallo Welt!\n", 12Hallo Welt!
+)           = 12
+munmap(0x5556d000, 4096)                = 0
+exit_group(0)                           = ?
+[ Process PID=4693 runs in 32 bit mode. ]

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

* [SOLVED] Re: [Qemu-devel] 32bit emulation in x86_64 System emulation
  2005-10-27  6:37 [Qemu-devel] 32bit emulation in x86_64 System emulation Mario Goppold
  2005-10-28 10:46 ` Mario Goppold
@ 2005-11-11 14:00 ` Mario Goppold
  1 sibling, 0 replies; 3+ messages in thread
From: Mario Goppold @ 2005-11-11 14:00 UTC (permalink / raw)
  To: qemu-devel

Hi list,

i have found some partial solutions for my problem:

1st: write a script for individual programs
   #!/bin/sh
   export LD_ASSUME_KERNEL=2.4 # this disables tls
   a.out # or some useful

2nd: disable thread-local storage (tls) for 32-bit programs
   mv /lib/tls /lib/tls.disabled
   ldconfig

Mario.
 
Am Donnerstag, 27. Oktober 2005 08:37 schrieb Mario Goppold:
> Hi list,
>
> I've tried to install SuSE92 x68_64 as guest (qemu 0.7.2 with and without
> kqemu). During the install grub terminates with core. But not only grub
> terminates:
>
>   #include <stdio.h>
>   int main() {
>     printf("Hallo Welt!\n");
>     return 0;
>   }
>
>   gcc a.c ; ./a.out is ok but
>   gcc -m32 a.c; ./a.out Segmentation fault (core dumped)
>
> with gdb:
>   Core was generated by `./a.out'.
>   Program terminated with signal 11, Segmentation fault.
>
>   warning: current_sos: Can't read pathname for load map: Input/output
> error
>
>   Reading symbols from /lib/tls/libc.so.6...done.
>   Loaded symbols for /lib/tls/libc.so.6
>   Reading symbols from /lib/ld-linux.so.2...done.
>   Loaded symbols for /lib/ld-linux.so.2
>   #0  0x5568aff4 in ?? () from /lib/tls/libc.so.6
>   (gdb) where
>   #0  0x5568aff4 in ?? () from /lib/tls/libc.so.6
>   #1  0x555d4bf3 in _IO_file_stat_internal () from /lib/tls/libc.so.6
>   #2  0x555d4bf3 in _IO_file_stat_internal () from /lib/tls/libc.so.6
>   #3  0x555ca494 in _IO_file_doallocate_internal () from /lib/tls/libc.so.6
>   #4  0x555d77be in _IO_doallocbuf_internal () from /lib/tls/libc.so.6
>   #5  0x555d550a in _IO_new_file_overflow () from /lib/tls/libc.so.6
>   #6  0x555d49fd in _IO_new_file_xsputn () from /lib/tls/libc.so.6
>   #7  0x555b25e8 in vfprintf () from /lib/tls/libc.so.6
>   #8  0x555ba7b0 in printf () from /lib/tls/libc.so.6
>   #9  0x080483e0 in main () at a.c:4
>
> What's worng? Outside of qemu it works fine.
> In the meantime i've found out that's not (only) a SuSE problem:
>
> SuSE92, SuSE93, SuSE10, FC4 fails but Ubuntu 5.10 works fine (all in
> x86_64).
>
> Have anyone see this behaviour. What can i do?
>
> Mario
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel

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

end of thread, other threads:[~2005-11-11 14:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-27  6:37 [Qemu-devel] 32bit emulation in x86_64 System emulation Mario Goppold
2005-10-28 10:46 ` Mario Goppold
2005-11-11 14:00 ` [SOLVED] " Mario Goppold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).