Skip to contentSkip to conversation

segfault in current cvs

Qemu-devel Jens Axboe 4 participants 5 messages Jan 6, 2004 – Jan 7, 2004

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

Hi,

Tried to launch a win98 iso, but it segfaults right away. No matter what I try, I get this:

axboe@apu:[.]boe/qemu-cvs/i386-softmmu $ gdb ./qemu
GNU gdb 6.0-debian
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-linux"...
(gdb) r -kernel ~axboe/bzImage-2.4.20
Starting program: /home/axboe/qemu-cvs/i386-softmmu/qemu -kernel ~axboe/bzImage-2.4.20
[New Thread 16384 (LWP 15913)]
warning: could not open /dev/net/tun: no virtual network emulation Load kernel at 0x30183008 (0x00100000)

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 15913)]
cpu_x86_exec (env1=0x0) at /home/axboe/qemu-cvs/cpu-exec.c:323
323 tb->cs_base = (unsigned long)cs_base;
(gdb) p tb
$1 = (TranslationBlock *) 0x0
(gdb) p cs_base
$2 = (uint8_t *) 0x0
(gdb)

which looks odd, given the !tb check just a few lines up. I'm using:

axboe@apu:/home/axboe $ gcc --version
gcc (GCC) 3.3.3 20031229 (prerelease) (Debian)

Signature · 1 line
Jens Axboe
#1 lore raw

Hi,

I made no tests of the current release of QEMU on PowerPC. I will try to
debug it before releasing the 0.5.2 (during this week if everything is
OK). Was the 0.5.1 working correctly with a Linux image ?

Fabrice.

Quoted 37 lines · Jens Axboe

Hi,

Tried to launch a win98 iso, but it segfaults right away. No matter what I try, I get this:

axboe@apu:[.]boe/qemu-cvs/i386-softmmu $ gdb ./qemu GNU gdb 6.0-debian Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-linux"...
(gdb) r -kernel ~axboe/bzImage-2.4.20
Starting program: /home/axboe/qemu-cvs/i386-softmmu/qemu -kernel ~axboe/bzImage-2.4.20
[New Thread 16384 (LWP 15913)]
warning: could not open /dev/net/tun: no virtual network emulation Load kernel at 0x30183008 (0x00100000)

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 15913)]
cpu_x86_exec (env1=0x0) at /home/axboe/qemu-cvs/cpu-exec.c:323
323 tb->cs_base = (unsigned long)cs_base;
(gdb) p tb
$1 = (TranslationBlock *) 0x0
(gdb) p cs_base
$2 = (uint8_t *) 0x0
(gdb)

which looks odd, given the !tb check just a few lines up. I'm using:

axboe@apu:/home/axboe $ gcc --version
gcc (GCC) 3.3.3 20031229 (prerelease) (Debian)

#2 lore raw
Quoted 5 lines · Fabrice Bellard

Hi,

I made no tests of the current release of QEMU on PowerPC. I will try to
debug it before releasing the 0.5.2 (during this week if everything is
OK). Was the 0.5.1 working correctly with a Linux image ?

Yeah, 0.5.1 worked beautifully. It got pretty far in an XP install, too :-)

Signature · 1 line
Jens Axboe
#3 lore raw
In reply to Jens Axboe
Quoted 10 lines · Jens Axboe

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 15913)]
cpu_x86_exec (env1=0x0) at /home/axboe/qemu-cvs/cpu-exec.c:323
323 tb->cs_base = (unsigned long)cs_base;
(gdb) p tb
$1 = (TranslationBlock *) 0x0
(gdb) p cs_base
$2 = (uint8_t *) 0x0
(gdb)

This is the same segfault I get when running ordinary x86 linux binaries on my ppc yellowdog box. I hope we can find a solution to this problem.

Michael

Quoted 4 lines

which looks odd, given the !tb check just a few lines up. I'm using:

axboe@apu:/home/axboe $ gcc --version
gcc (GCC) 3.3.3 20031229 (prerelease) (Debian)

Signature · 1 line
Michael L Torrie <[email protected]>
#4 lore raw
Quoted 2 lines · Michael L Torrie

This is the same segfault I get when running ordinary x86 linux binaries on my ppc yellowdog box. I hope we can find a solution to this problem.

I was mistaken. My segfault is in cpu-all.h, in the inline function ldub_raw. The ptr passed to the inline function is null for some reason.

The call trace is:
#0 disas_insn (s=0x7ffff448, pc_start=0x0) at cpu-all.h:61 #1 0x6003179c in gen_intermediate_code_internal (env=0x1, tb=0x601ab4d0,

    search_pc=-1) at
/home/torriem/qemu-0.5.1/target-i386/translate.c:4554
#2  0x6002e5d8 in gen_intermediate_code (env=0x7ffff448, tb=0x0)
    at /home/torriem/qemu-0.5.1/target-i386/translate.c:4616
#3  0x60025e98 in cpu_x86_gen_code (env=0x7ffff448, tb=0x601ab4d0,
    max_code_size=0, gen_code_size_ptr=0x7ffff52c)
    at /home/torriem/qemu-0.5.1/translate-all.c:101
#4  0x60010bd8 in cpu_x86_exec (env1=0x7ffff448)
    at /home/torriem/qemu-0.5.1/cpu-exec.c:282
#5  0x60004cb4 in cpu_loop (env=0x601ab4d0)
    at /home/torriem/qemu-0.5.1/main.c:141
#6  0x60005404 in main (argc=1, argv=0x0)
    at /home/torriem/qemu-0.5.1/main.c:763

#7 0x0fe8c314 in __libc_start_main () from /lib/libc.so.6

This is probably an issue with the new x86 glibc which doesn't always seem to be compatible with the qemu synthetic virtual x86 processor.

Quoted 8 lines

Michael

Quoted 4 lines

which looks odd, given the !tb check just a few lines up. I'm using:

axboe@apu:/home/axboe $ gcc --version
gcc (GCC) 3.3.3 20031229 (prerelease) (Debian)

Signature · 1 line
Michael Torrie <[email protected]>