Well, I thought the issue was with x86_64 but the same thing is happening on my 32 bit machine too.
[root@smitty2 qemu-0.11.0]# ./i386-softmmu/qemu -serialice /dev/ttyS0 -hda /dev/zero -L ../bios > /home/joe/serialice_dumps/ipmsnorg.txt Segmentation fault (core dumped)
And the log just stops after: SerialICE: Open connection to target hardware... SerialICE: Waiting for handshake with target... target alife! SerialICE: LUA init... SerialICE: Starting LUA script SerialICE: Registering physical memory areas for Cache-As-Ram: Registering physical memory at 0xffd80000 (0x00080000 bytes)
Any ideas???
On 1/19/10 6:36 AM, Joseph Smith wrote:
Well, I thought the issue was with x86_64 but the same thing is happening on my 32 bit machine too.
[root@smitty2 qemu-0.11.0]# ./i386-softmmu/qemu -serialice /dev/ttyS0 -hda /dev/zero -L ../bios > /home/joe/serialice_dumps/ipmsnorg.txt Segmentation fault (core dumped)
And the log just stops after: SerialICE: Open connection to target hardware... SerialICE: Waiting for handshake with target... target alife! SerialICE: LUA init... SerialICE: Starting LUA script SerialICE: Registering physical memory areas for Cache-As-Ram: Registering physical memory at 0xffd80000 (0x00080000 bytes)
Any ideas???
What did the gdb backtrace say?
Stefan
On Tue, 19 Jan 2010 10:46:28 +0100, Stefan Reinauer stepan@coresystems.de wrote:
On 1/19/10 6:36 AM, Joseph Smith wrote:
Well, I thought the issue was with x86_64 but the same thing is happening on
my
32 bit machine too.
[root@smitty2 qemu-0.11.0]# ./i386-softmmu/qemu -serialice /dev/ttyS0
-hda
/dev/zero -L ../bios > /home/joe/serialice_dumps/ipmsnorg.txt Segmentation fault (core dumped)
And the log just stops after: SerialICE: Open connection to target hardware... SerialICE: Waiting for handshake with target... target alife! SerialICE: LUA init... SerialICE: Starting LUA script SerialICE: Registering physical memory areas for Cache-As-Ram: Registering physical memory at 0xffd80000 (0x00080000 bytes)
Any ideas???
What did the gdb backtrace say?
Sorry, how do I do a backtrace on it again? Rudolf Marek said he had the same issue also, something about the serialice.lua script. He was not sure off the top of his head how he fixed it. Thanks for the help.
On 1/19/10 1:42 PM, Joseph Smith wrote:
Sorry, how do I do a backtrace on it again? Rudolf Marek said he had the same issue also, something about the serialice.lua script. He was not sure off the top of his head how he fixed it. Thanks for the help
stepan$ gdb qemu-0.11.0/i386-softmmu/qemu GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009) Copyright 2004 Free Software Foundation, Inc. [..] gdb$ run -M serialice -serialice /dev/cu.usbserial-FTCV2YGN -gdb tcp::1234 -L examples/amibios [..] SerialICE: Open connection to target hardware... ... Program received signal SIGSEGV, Interrupt 0x00007fff828fa34e in read () gdb$ bt #0 0x00007fff828fa34e in read () #1 0x0000000100027e01 in serialice_write () #2 0x0000000100028f86 in serialice_init () #3 0x0000000100029680 in pc_init_serialice () #4 0x000000010000678d in qemu_main () [..] #22 0x00000001000c1ec3 in main () gdb$
On Tue, 19 Jan 2010 14:25:35 +0100, Stefan Reinauer stepan@coresystems.de wrote:
On 1/19/10 1:42 PM, Joseph Smith wrote:
Sorry, how do I do a backtrace on it again? Rudolf Marek said he had the same issue also, something about the serialice.lua script. He was not sure off the top of his head how he
fixed
it. Thanks for the help
stepan$ gdb qemu-0.11.0/i386-softmmu/qemu GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009) Copyright 2004 Free Software Foundation, Inc. [..] gdb$ run -M serialice -serialice /dev/cu.usbserial-FTCV2YGN -gdb tcp::1234 -L examples/amibios [..] SerialICE: Open connection to target hardware... ... Program received signal SIGSEGV, Interrupt 0x00007fff828fa34e in read () gdb$ bt #0 0x00007fff828fa34e in read () #1 0x0000000100027e01 in serialice_write () #2 0x0000000100028f86 in serialice_init () #3 0x0000000100029680 in pc_init_serialice () #4 0x000000010000678d in qemu_main () [..] #22 0x00000001000c1ec3 in main () gdb$
Thanks Stefan, I will try that as soon as I can and report back.
On Tue, 19 Jan 2010 14:25:35 +0100, Stefan Reinauer stepan@coresystems.de wrote:
On 1/19/10 1:42 PM, Joseph Smith wrote:
Sorry, how do I do a backtrace on it again? Rudolf Marek said he had the same issue also, something about the serialice.lua script. He was not sure off the top of his head how he
fixed
it. Thanks for the help
stepan$ gdb qemu-0.11.0/i386-softmmu/qemu GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009) Copyright 2004 Free Software Foundation, Inc. [..] gdb$ run -M serialice -serialice /dev/cu.usbserial-FTCV2YGN -gdb tcp::1234 -L examples/amibios [..] SerialICE: Open connection to target hardware... ... Program received signal SIGSEGV, Interrupt 0x00007fff828fa34e in read () gdb$ bt #0 0x00007fff828fa34e in read () #1 0x0000000100027e01 in serialice_write () #2 0x0000000100028f86 in serialice_init () #3 0x0000000100029680 in pc_init_serialice () #4 0x000000010000678d in qemu_main () [..] #22 0x00000001000c1ec3 in main () gdb$
For some reason the above would not work for me, but if I do this I get:
[root@smitty2 joe]# cd qemu-0.11.0 [root@smitty2 qemu-0.11.0]# gdb i386-softmmu/qemu GNU gdb (GDB) Fedora (7.0.1-26.fc12) Copyright (C) 2009 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 "i686-redhat-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /home/joe/qemu-0.11.0/i386-softmmu/qemu...done. (gdb) run -serialice /dev/ttyS0 -hda /dev/zero -L ../bios > logfile.txt Starting program: /home/joe/qemu-0.11.0/i386-softmmu/qemu -serialice /dev/ttyS0 -hda /dev/zero -L ../bios > logfile.txt [Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault. cpu_register_physical_memory_offset (start_addr=4292345856, size=524288, phys_offset=0, region_offset=0) at /home/joe/qemu-0.11.0/exec.c:2327 2327 if (env->kqemu_enabled) { Missing separate debuginfos, use: debuginfo-install glibc-2.11.1-1.i686 ncurses-libs-5.7-3.20090207.fc12.i686 zlib-1.2.3-23.fc12.i686 (gdb) bt #0 cpu_register_physical_memory_offset (start_addr=4292345856, size=524288, phys_offset=0, region_offset=0) at /home/joe/qemu-0.11.0/exec.c:2327 #1 0x080715b8 in cpu_register_physical_memory ( phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at ../cpu-common.h:33 #2 serialice_register_physical (phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at /home/joe/qemu-0.11.0/serialice.c:93 #3 0x08194ee5 in luaD_precall () #4 0x0819e022 in luaV_execute () #5 0x08195378 in luaD_call () #6 0x08192571 in f_call () #7 0x08194a27 in luaD_rawrunprotected () #8 0x08194a89 in luaD_pcall () #9 0x0819239b in lua_pcall () #10 0x080713db in serialice_lua_init () at /home/joe/qemu-0.11.0/serialice.c:117 #11 serialice_init () at /home/joe/qemu-0.11.0/serialice.c:911 #12 0x080b0f1b in module_call_init (type=<value optimized out>) at module.c:78 #13 0x0805225f in main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>) at /home/joe/qemu-0.11.0/vl.c:5956 (gdb)
Does this help at all? Sorry I am not to good at GDB.
On 1/19/10 10:17 PM, Joseph Smith wrote:
(gdb) bt #0 cpu_register_physical_memory_offset (start_addr=4292345856, size=524288, phys_offset=0, region_offset=0) at /home/joe/qemu-0.11.0/exec.c:2327 #1 0x080715b8 in cpu_register_physical_memory ( phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at ../cpu-common.h:33 #2 serialice_register_physical (phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at /home/joe/qemu-0.11.0/serialice.c:93
This is almost there...
Can you recompile Qemu and add "-g" to CFLAGS and try again? It does look suspicious that phys_offset and size are optimized out, though..
BTW, I just tried SerialICE on an x86-64 OpenSUSE 11.2 system and it works nicely without a segfault. Maybe Fedora is using a buggy compiler or a specific compiler option that breaks things?
Stefan
On 19.01.2010, at 23:12, Stefan Reinauer wrote:
On 1/19/10 10:17 PM, Joseph Smith wrote:
(gdb) bt #0 cpu_register_physical_memory_offset (start_addr=4292345856, size=524288, phys_offset=0, region_offset=0) at /home/joe/qemu-0.11.0/exec.c:2327 #1 0x080715b8 in cpu_register_physical_memory ( phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at ../cpu-common.h:33 #2 serialice_register_physical (phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at /home/joe/qemu-0.11.0/serialice.c:93
This is almost there...
Can you recompile Qemu and add "-g" to CFLAGS and try again? It does look suspicious that phys_offset and size are optimized out, though..
BTW, I just tried SerialICE on an x86-64 OpenSUSE 11.2 system and it works nicely without a segfault. Maybe Fedora is using a buggy compiler or a specific compiler option that breaks things?
The trace says you're using env before it's initialized.
Alex
On Tue, 19 Jan 2010 23:17:32 +0100, Alexander Graf alex@csgraf.de wrote:
On 19.01.2010, at 23:12, Stefan Reinauer wrote:
On 1/19/10 10:17 PM, Joseph Smith wrote:
(gdb) bt #0 cpu_register_physical_memory_offset (start_addr=4292345856, size=524288, phys_offset=0, region_offset=0) at /home/joe/qemu-0.11.0/exec.c:2327 #1 0x080715b8 in cpu_register_physical_memory ( phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at ../cpu-common.h:33 #2 serialice_register_physical (phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at /home/joe/qemu-0.11.0/serialice.c:93
This is almost there...
Can you recompile Qemu and add "-g" to CFLAGS and try again? It does look suspicious that phys_offset and size are optimized out, though..
BTW, I just tried SerialICE on an x86-64 OpenSUSE 11.2 system and it works nicely without a segfault. Maybe Fedora is using a buggy compiler or a specific compiler option that breaks things?
The trace says you're using env before it's initialized.
Ok, thanks guys. Will -g to CFLAGS fix the env problem?
On 19.01.2010, at 23:38, Joseph Smith wrote:
On Tue, 19 Jan 2010 23:17:32 +0100, Alexander Graf alex@csgraf.de wrote:
On 19.01.2010, at 23:12, Stefan Reinauer wrote:
On 1/19/10 10:17 PM, Joseph Smith wrote:
(gdb) bt #0 cpu_register_physical_memory_offset (start_addr=4292345856, size=524288, phys_offset=0, region_offset=0) at /home/joe/qemu-0.11.0/exec.c:2327 #1 0x080715b8 in cpu_register_physical_memory ( phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at ../cpu-common.h:33 #2 serialice_register_physical (phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at /home/joe/qemu-0.11.0/serialice.c:93
This is almost there...
Can you recompile Qemu and add "-g" to CFLAGS and try again? It does look suspicious that phys_offset and size are optimized out, though..
BTW, I just tried SerialICE on an x86-64 OpenSUSE 11.2 system and it works nicely without a segfault. Maybe Fedora is using a buggy compiler or a specific compiler option that breaks things?
The trace says you're using env before it's initialized.
Ok, thanks guys. Will -g to CFLAGS fix the env problem?
No, but -g will add debug information to SerialICE. Using that we can see more debug information in the gdb backtrace and determine if env is NULL as I suspect.
Alex
On 1/19/10 11:17 PM, Alexander Graf wrote:
On 19.01.2010, at 23:12, Stefan Reinauer wrote
On 1/19/10 10:17 PM, Joseph Smith wrote:
(gdb) bt #0 cpu_register_physical_memory_offset (start_addr=4292345856, size=524288, phys_offset=0, region_offset=0) at /home/joe/qemu-0.11.0/exec.c:2327 #1 0x080715b8 in cpu_register_physical_memory ( phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at ../cpu-common.h:33 #2 serialice_register_physical (phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at /home/joe/qemu-0.11.0/serialice.c:93
This is almost there...
Can you recompile Qemu and add "-g" to CFLAGS and try again? It does look suspicious that phys_offset and size are optimized out, though..
BTW, I just tried SerialICE on an x86-64 OpenSUSE 11.2 system and it works nicely without a segfault. Maybe Fedora is using a buggy compiler or a specific compiler option that breaks things?
The trace says you're using env before it's initialized.
Thanks for spotting this, you're of course right.
It's caused by some oddness in how KQEMU is initialized.
Joseph: Please add --disable-kqemu to your Qemu configure options and the problem will go away.
Stefan
On 01/19/2010 05:50 PM, Stefan Reinauer wrote:
On 1/19/10 11:17 PM, Alexander Graf wrote:
On 19.01.2010, at 23:12, Stefan Reinauer wrote
On 1/19/10 10:17 PM, Joseph Smith wrote:
(gdb) bt #0 cpu_register_physical_memory_offset (start_addr=4292345856, size=524288, phys_offset=0, region_offset=0) at /home/joe/qemu-0.11.0/exec.c:2327 #1 0x080715b8 in cpu_register_physical_memory ( phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at ../cpu-common.h:33 #2 serialice_register_physical (phys_offset=<value optimized out>, size=<value optimized out>, start_addr=<value optimized out>) at /home/joe/qemu-0.11.0/serialice.c:93
This is almost there...
Can you recompile Qemu and add "-g" to CFLAGS and try again? It does look suspicious that phys_offset and size are optimized out, though..
BTW, I just tried SerialICE on an x86-64 OpenSUSE 11.2 system and it works nicely without a segfault. Maybe Fedora is using a buggy compiler or a specific compiler option that breaks things?
The trace says you're using env before it's initialized.
Thanks for spotting this, you're of course right.
It's caused by some oddness in how KQEMU is initialized.
Joseph: Please add --disable-kqemu to your Qemu configure options and the problem will go away.
In build.sh right?
On 1/19/10 10:17 PM, Joseph Smith wrote:
(gdb) run -serialice /dev/ttyS0 -hda /dev/zero -L ../bios > logfile.txt Starting program: /home/joe/qemu-0.11.0/i386-softmmu/qemu -serialice /dev/ttyS0 -hda /dev/zero -L ../bios > logfile.txt
John, you seem to be running an outdated version of SerialICE. Please update.
Stefan
On 01/19/2010 05:54 PM, Stefan Reinauer wrote:
On 1/19/10 10:17 PM, Joseph Smith wrote:
(gdb) run -serialice /dev/ttyS0 -hda /dev/zero -L ../bios> logfile.txt Starting program: /home/joe/qemu-0.11.0/i386-softmmu/qemu -serialice /dev/ttyS0 -hda /dev/zero -L ../bios> logfile.txt
John, you seem to be running an outdated version of SerialICE. Please update.
Stefan
huh?
On 1/19/10 11:54 PM, Stefan Reinauer wrote:
On 1/19/10 10:17 PM, Joseph Smith wrote:
(gdb) run -serialice /dev/ttyS0 -hda /dev/zero -L ../bios > logfile.txt Starting program: /home/joe/qemu-0.11.0/i386-softmmu/qemu -serialice /dev/ttyS0 -hda /dev/zero -L ../bios > logfile.txt
John, you seem to be running an outdated version of SerialICE. Please update.
... And I should be going to bed when I'm tired. Sorry, Joseph, didn't mean to confuse your name!
Stefan
On 01/19/2010 05:55 PM, Stefan Reinauer wrote:
On 1/19/10 11:54 PM, Stefan Reinauer wrote:
On 1/19/10 10:17 PM, Joseph Smith wrote:
(gdb) run -serialice /dev/ttyS0 -hda /dev/zero -L ../bios> logfile.txt Starting program: /home/joe/qemu-0.11.0/i386-softmmu/qemu -serialice /dev/ttyS0 -hda /dev/zero -L ../bios> logfile.txt
John, you seem to be running an outdated version of SerialICE. Please update.
... And I should be going to bed when I'm tired. Sorry, Joseph, didn't mean to confuse your name!
Stefan
So I am using an old SerialICE? I am using r93