qemu segfaults at start
Hello
I tried to use qemu on x86-32 in order to emulate x86-32bits. I did a:
wget http://wiki.qemu.org/download/qemu-0.15.0.tar.gz
tar zxvf qemu-0.15.0.tar.gz
cd qemu-0.15.0
./configure --enable-system --target-list=i386-softmmu make
sudo make install
then:
qemu disk.img
Segmentation fault
I just have a window that popup then disappear. I tried several options and it allways do a segfault.
I tried with the 0.14.1 version, and same results.
What information do you need in order to help me?
Thanks
Envoyé avec Inmano, ma messagerie renversante et gratuite : http://www.inmano.com
Quoted 2 lines · octane indice
qemu disk.img
Segmentation fault
Please post the backtrace as well as your host operating system version (e.g. Fedora 15):
gdb --args qemu disk.img
(gdb) r
...runs and crashes...
(gdb) bt
Stefan
En réponse à Stefan Hajnoczi <[email protected]> :
Quoted 12 lines
Quoted 2 lines
qemu disk.img
Segmentation faultPlease post the backtrace as well as your host operating system
version (e.g. Fedora 15):gdb --args qemu disk.img
(gdb) r
...runs and crashes...
(gdb) bt
Thanks for the help, here the infos:
I run under slackware 13.1
$ gcc -v Reading specs from /usr/lib/gcc/i486-slackware-linux/4.4.4/specs Target: i486-slackware-linux Configured with: ../gcc-4.4.4/configure --prefix=/usr --libdir=/usr/lib --enable- shared --enable-bootstrap --enable-languages=ada,c,c++,fortran,java,objc -- enable-threads=posix --enable-checking=release --with-system-zlib --with- python-dir=/lib/python2.6/site-packages --disable-libunwind-exceptions -- enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose --with-arch=i486 - -target=i486-slackware-linux --build=i486-slackware-linux --host=i486- slackware-linux Thread model: posix gcc version 4.4.4 (GCC) $ uname -a Linux aspireone 2.6.33.4-smp #2 SMP Wed May 12 22:47:36 CDT 2010 i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz GenuineIntel GNU/Linux
-I'm remote, so I use vnc, but even in local it does the same.
-In order to prove it's not related to the disk used, I create an empty one for the purpose:
$ dd if=/dev/zero of=disk.img bs=1024k count=1
$ gdb --args qemu disk.img -vnc 127.0.0.1:1 GNU gdb (GDB) 7.1 Copyright (C) 2010 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 "i486-slackware-linux". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/local/bin/qemu...(no debugging symbols found)...done. (gdb) r Starting program: /usr/local/bin/qemu disk.img -vnc 127.0.0.1:1 [Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault. 0x081a94c1 in ?? ()
(gdb) bt
#0 0x081a94c1 in ?? ()
#1 0xb58af3e7 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) info reg
eax 0xbfffef08 -1073746168 ecx 0x1 1 edx 0x0 0 ebx 0x8 8 esp 0xbfffee50 0xbfffee50 ebp 0xbfffef08 0xbfffef08 esi 0x0 0 edi 0x0 0 eip 0x81a94c1 0x81a94c1 eflags 0x210246 [ PF ZF IF RF ID ] cs 0x73 115 ss 0x7b 123 ds 0x7b 123 es 0x7b 123 fs 0x0 0 gs 0x33 51
(gdb)
And exact same bt if I launch with qemu -hda disk.img
HTH, thanks
Envoyé avec Inmano, ma messagerie renversante et gratuite : http://www.inmano.com
Am 06.09.2011 10:11, schrieb octane indice:
Quoted 40 lines
$ gdb --args qemu disk.img -vnc 127.0.0.1:1 GNU gdb (GDB) 7.1 Copyright (C) 2010 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 "i486-slackware-linux". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/local/bin/qemu...(no debugging symbols found)...done. (gdb) r Starting program: /usr/local/bin/qemu disk.img -vnc 127.0.0.1:1 [Thread debugging using libthread_db enabled]Program received signal SIGSEGV, Segmentation fault.
0x081a94c1in ?? ()
(gdb) bt
#00x081a94c1in ?? ()
#10xb58af3e7in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) info regeax 0xbfffef08 -1073746168 ecx 0x1 1 edx 0x0 0 ebx 0x8 8 esp 0xbfffee50 0xbfffee50 ebp 0xbfffef08 0xbfffef08 esi 0x0 0 edi 0x0 0 eip 0x81a94c1 0x81a94c1 eflags 0x210246 [ PF ZF IF RF ID ] cs 0x73 115 ss 0x7b 123 ds 0x7b 123 es 0x7b 123 fs 0x0 0 gs 0x33 51
Quoted 6 lines
(gdb)
And exact same bt if I launch with qemu -hda disk.img
HTH, thanks
/usr/local/bin/qemu is stripped because it was installed with make install, so there is no useful debugging information.
Please look for the unstripped i386-softmmu/qemu executable in your build path and run it using gdb.
Regards,
Stefan Weil
En réponse à Stefan Weil <[email protected]> :
Quoted 7 lines
/usr/local/bin/qemuis stripped because it was installed with make install,
so there is no useful debugging information.Please look for the unstripped i386-softmmu/qemu executable in your build path and run it using gdb.
$ gdb --args /usr/src/qemu-0.15.0/i386-softmmu/qemu disk.img -vnc 127.0.0.1:1 GNU gdb (GDB) 7.1 Copyright (C) 2010 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 "i486-slackware-linux". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/src/qemu-0.15.0/i386-softmmu/qemu...done. (gdb) r Starting program: /usr/src/qemu-0.15.0/i386-softmmu/qemu disk.img -vnc 127.0.0.1:1 [Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault. raise_interrupt (intno=8, is_int=0, error_code=0, next_eip_addend=0)
at /usr/src/qemu-0.15.0/target-i386/op_helper.c:1375
1375 env->exception_index = intno;
(gdb) bt
#0 raise_interrupt (intno=8, is_int=0, error_code=0, next_eip_addend=0)
at /usr/src/qemu-0.15.0/target-i386/op_helper.c:1375
#1 0x081a9b50 in raise_exception_err (exception_index=13, error_code=8)
at /usr/src/qemu-0.15.0/target-i386/op_helper.c:1386
#2 0xcdb0e012 in ?? ()
#3 0x00000071 in ?? ()
#4 0x0000008f in ?? ()
#5 0x00000000 in ?? ()
(gdb) info reg
eax 0xbfffeee8 -1073746200
ecx 0x1 1
edx 0x0 0
ebx 0x8 8
esp 0xbfffee30 0xbfffee30
ebp 0xbfffeee8 0xbfffeee8
esi 0x0 0
edi 0x0 0
eip 0x81a94c1 0x81a94c1 <raise_interrupt+177>
eflags 0x210246 [ PF ZF IF RF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51(gdb)
Quoted 3 lines
Regards,
Stefan Weil
I hope there's more to understand.
Thanks
Envoyé avec Inmano, ma messagerie renversante et gratuite : http://www.inmano.com
Quoted 4 lines · octane indice
En réponse à Stefan Hajnoczi <[email protected]> :
-In order to prove it's not related to the disk used, I create an empty one for the purpose:$ dd if=/dev/zero of=disk.img bs=1024k count=1
You can run QEMU completely without a disk, just run:
$ gdb qemu (gdb) r
I wonder if it crashes that way too.
Stefan
En réponse à Stefan Hajnoczi <[email protected]> :
Quoted 6 lines
You can run QEMU completely without a disk, just run:
$ gdb qemu (gdb) rI wonder if it crashes that way too.
Yes:
(gdb) r
Starting program: /usr/src/qemu-0.15.0/i386-softmmu/qemu -vnc 127.0.0.1:1 [Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault. raise_interrupt (intno=8, is_int=0, error_code=0, next_eip_addend=0)
at /usr/src/qemu-0.15.0/target-i386/op_helper.c:1375
1375 env->exception_index = intno;
(gdb)
Envoyé avec Inmano, ma messagerie renversante et gratuite : http://www.inmano.com
Quoted 12 lines · octane indice
En réponse à Stefan Hajnoczi <[email protected]> :
Quoted 6 lines
You can run QEMU completely without a disk, just run:
$ gdb qemu (gdb) rI wonder if it crashes that way too.
Yes:
(gdb) r
Starting program:/usr/src/qemu-0.15.0/i386-softmmu/qemu-vnc 127.0.0.1:1 [Thread debugging usinglibthread_dbenabled]
Quoted 5 lines
Program received signal SIGSEGV, Segmentation fault.
raise_interrupt(intno=8, is_int=0, error_code=0, next_eip_addend=0) at/usr/src/qemu-0.15.0/target-i386/op_helper.c:13751375 env->exception_index = intno;
(gdb)
"env" is null?
Signature · 7 lines
regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Quoted 3 lines · octane indice
then:
qemu disk.img
Segmentation fault
how about invoking it as:
qemu -hda disk.img
?
does that make any difference? perhaps adding -S too so we could find out whether it reach the very initial point.....
Signature · 7 lines
regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com