|
From: Rob K. <ro...@st...> - 2003-07-25 08:48:22
|
Hi there, I'm trying to run valgrind on my program, but it dies. Output is included below. At one point it outputs: 'disInstr: unhandled instruction bytes: 0x66 0x6 0x8B 0x55'. Perhaps this is mmx/sse code? How can I find in what object the offending code is? If this code is what makes it crash in the first place... Cheers! Rob [rob] ~/work/mn++> valgrind -v mnshow ==3395== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux. ==3395== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward. ==3395== Using valgrind-20030716, a program supervision framework for x86-linux. ==3395== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward. ==3395== Startup, with flags: ==3395== --suppressions=/usr/local/lib/valgrind/default.supp ==3395== -v ==3395== Reading syms from /home/rob/work/mn++/mnshow ==3395== Reading syms from /usr/local/lib/valgrind/vgskin_memcheck.so ==3395== Reading syms from /usr/local/lib/valgrind/valgrind.so ==3395== Reading syms from /usr/il/lib/libesso++.1.0.so ==3395== Reading syms from /usr/il/lib/libesmx++.3.0.so ==3395== Reading syms from /usr/il/lib/esqc.so ==3395== object doesn't have a symbol table ==3395== object doesn't have any debug info ==3395== Reading syms from /usr/il/lib/esmx.so ==3395== object doesn't have a symbol table ==3395== object doesn't have any debug info ==3395== Reading syms from /usr/il/lib/esini.so ==3395== object doesn't have a symbol table ==3395== object doesn't have any debug info ==3395== Reading syms from /usr/local/lib/liballeg-4.0.1.so ==3395== object doesn't have a symbol table ==3395== object doesn't have any debug info ==3395== Reading syms from /usr/lib/libstdc++.so.5.0.3 ==3395== Reading syms from /lib/libgcc_s.so.1 ==3395== Reading syms from /lib/ld-2.3.2.so ==3395== object doesn't have any debug info ==3395== Reading syms from /lib/libc.so.6 ==3395== object doesn't have any debug info ==3395== Reading syms from /lib/libdl.so.2 ==3395== object doesn't have any debug info ==3395== Reading syms from /lib/libm.so.6 ==3395== object doesn't have any debug info ==3395== Reading syms from /usr/X11R6/lib/libX11.so.6.2 ==3395== object doesn't have any debug info ==3395== Reading syms from /usr/X11R6/lib/libXext.so.6.4 ==3395== object doesn't have any debug info ==3395== Reading syms from /usr/lib/libjpeg.so.62.0.0 ==3395== object doesn't have any debug info ==3395== Reading syms from /usr/lib/libttf.so.2.2.0 ==3395== object doesn't have any debug info ==3395== Reading suppressions file: /usr/local/lib/valgrind/default.supp ==3395== Estimated CPU clock rate is 1701 MHz ==3395== mnshow 4.9.0 (C) Copyright 2000-2003 Infologic Pte Ltd, Singapore. ==3395== Reading syms from /usr/X11R6/lib/libXcursor.so.1.0 ==3395== object doesn't have any debug info ==3395== Reading syms from /usr/X11R6/lib/libXrender.so.1.2 ==3395== object doesn't have any debug info ==3395== Syscall param writev(vector[...]) contains uninitialised or unaddressable byte(s) ==3395== at 0x4016C77B: vgAllRoadsLeadToRome_writev (vg_intercept.c:108) ==3395== by 0x4016C7B7: __writev (vg_intercept.c:732) ==3395== by 0x411CBF3D: _X11TransSocketWritev (in /usr/X11R6/lib/libX11.so.6.2) ==3395== by 0x411CCB5E: _X11TransWritev (in /usr/X11R6/lib/libX11.so.6.2) ==3395== Address 0x41D51674 is 136 bytes inside a block of size 2048 alloc'd ==3395== at 0x40013A7E: calloc (vg_replace_malloc.c:273) ==3395== by 0x4119C736: XOpenDisplay (in /usr/X11R6/lib/libX11.so.6.2) ==3395== by 0x402DA47C: (within /usr/local/lib/liballeg-4.0.1.so) ==3395== Reading syms from /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2 disInstr: unhandled instruction bytes: 0x66 0x6 0x8B 0x55 ==3395== ==3395== Syscall param write(buf) contains uninitialised or unaddressable byte(s) ==3395== at 0x410E8BE8: __GI___libc_write (in /lib/libc.so.6) ==3395== by 0x411CCAFE: _X11TransWrite (in /usr/X11R6/lib/libX11.so.6.2) ==3395== by 0x411AB663: _XFlushInt (in /usr/X11R6/lib/libX11.so.6.2) ==3395== by 0x411ACD9E: _XReply (in /usr/X11R6/lib/libX11.so.6.2) ==3395== Address 0x41D51676 is 138 bytes inside a block of size 2048 alloc'd ==3395== at 0x40013A7E: calloc (vg_replace_malloc.c:273) ==3395== by 0x4119C736: XOpenDisplay (in /usr/X11R6/lib/libX11.so.6.2) ==3395== by 0x402DA47C: (within /usr/local/lib/liballeg-4.0.1.so) -=Fatal exception caught, shutting down MN kernel [3.13]=- Illegal instruction (core dumped) |
|
From: Joerg B. <jo...@we...> - 2003-07-25 11:11:47
|
Rob Kramer wrote: > Hi there, > > I'm trying to run valgrind on my program, but it dies. Output is included > below. At one point it outputs: 'disInstr: unhandled instruction bytes: 0x66 > 0x6 0x8B 0x55'. Perhaps this is mmx/sse code? How can I find in what object > the offending code is? If this code is what makes it crash in the first > place... > > Cheers! > > Rob > > > [rob] ~/work/mn++> valgrind -v mnshow ... > mnshow 4.9.0 (C) Copyright 2000-2003 Infologic Pte Ltd, Singapore. > > ==3395== Reading syms from /usr/X11R6/lib/libXcursor.so.1.0 > ==3395== object doesn't have any debug info > ==3395== Reading syms from /usr/X11R6/lib/libXrender.so.1.2 > ==3395== object doesn't have any debug info > ==3395== Syscall param writev(vector[...]) contains uninitialised or > unaddressable byte(s) the backtrace is not logn enough, you could extend it with this switch on the commandline: --num-callers=25 make sure, the code has debuginformations (compile & link with "-g") hope this helps Joerg > ==3395== at 0x4016C77B: vgAllRoadsLeadToRome_writev (vg_intercept.c:108) > ==3395== by 0x4016C7B7: __writev (vg_intercept.c:732) > ==3395== by 0x411CBF3D: _X11TransSocketWritev (in > /usr/X11R6/lib/libX11.so.6.2) > ==3395== by 0x411CCB5E: _X11TransWritev (in /usr/X11R6/lib/libX11.so.6.2) > ==3395== Address 0x41D51674 is 136 bytes inside a block of size 2048 > alloc'd > ==3395== at 0x40013A7E: calloc (vg_replace_malloc.c:273) > ==3395== by 0x4119C736: XOpenDisplay (in /usr/X11R6/lib/libX11.so.6.2) > ==3395== by 0x402DA47C: (within /usr/local/lib/liballeg-4.0.1.so) |
|
From: Rob K. <ro...@st...> - 2003-07-25 11:38:51
|
Hi Joerg,
On Friday 25 July 2003 19:11, Joerg Beyer wrote:
...
> > mnshow 4.9.0 (C) Copyright 2000-2003 Infologic Pte Ltd, Singapore.
> >
> > ==3395== Reading syms from /usr/X11R6/lib/libXcursor.so.1.0
> > ==3395== object doesn't have any debug info
> > ==3395== Reading syms from /usr/X11R6/lib/libXrender.so.1.2
> > ==3395== object doesn't have any debug info
> > ==3395== Syscall param writev(vector[...]) contains uninitialised or
> > unaddressable byte(s)
>
> the backtrace is not logn enough, you could extend it with this
> switch on the commandline:
> --num-callers=25
>
> make sure, the code has debuginformations (compile & link with "-g")
Thanks! It's compiled with debug info. I tried num-callers=25 and 100, but
there's no difference in the crash. Would you like me to mail the output
again?
I ran gdb on the core that's created, maybe that helps you:
[rob] ~/work/mn++> gdb mnshow core
GNU gdb 5.3
Copyright 2002 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 "i686-pc-linux-gnu"...
Core was generated by `mnshow'.
Program terminated with signal 4, Illegal instruction.
...
Hmm, illegal instruction
...
Loaded symbols for /usr/X11R6/lib/libXcursor.so.1
Reading symbols from /usr/X11R6/lib/libXrender.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXrender.so.1
Reading symbols from /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
#0 0x4017f12d in qq2merge () from /usr/local/lib/valgrind/valgrind.so
(gdb) bt
#0 0x4017f12d in qq2merge () from /usr/local/lib/valgrind/valgrind.so
#1 0x410401f5 in raise () from /lib/libc.so.6
#2 0x080d92ba in mnsignal_handler (n=4) at mnkernel.c:213
#3 0x4016b478 in vgPlain_HT_destruct ()
from /usr/local/lib/valgrind/valgrind.so
(gdb)
I guess the backtrace is sort of ruined by my signal handler..
It dies as soon as I open a graphics screen - I'd suspect the 'unhandled
instructions', but I don't know enough about valgrind yet to have a valid
opinion :)
Cheers!
Rob
|
|
From: Nicholas N. <nj...@ca...> - 2003-07-25 13:42:03
|
On Fri, 25 Jul 2003, Rob Kramer wrote: > It dies as soon as I open a graphics screen - I'd suspect the 'unhandled > instructions', but I don't know enough about valgrind yet to have a valid > opinion :) I definitely suspect the "unhandled instruction", since it comes before the "illegal instruction". It's strange, normally when Valgrind sees an instruction it can't handle, it aborts, I wonder why it continues executing with your program... something weird. Anyway, you won't be able to run your program until someone adds support for the offending instruction, unless you can somehow avoid that instruction. Sorry. N |
|
From: Jeremy F. <je...@go...> - 2003-07-25 17:27:18
|
On Fri, 2003-07-25 at 06:41, Nicholas Nethercote wrote: > On Fri, 25 Jul 2003, Rob Kramer wrote: > > > It dies as soon as I open a graphics screen - I'd suspect the 'unhandled > > instructions', but I don't know enough about valgrind yet to have a valid > > opinion :) > > I definitely suspect the "unhandled instruction", since it comes before > the "illegal instruction". It's strange, normally when Valgrind sees an > instruction it can't handle, it aborts, I wonder why it continues > executing with your program... something weird. I made a change a while ago so that unknown/illegal instructions get turned into illegal instructions in the generated code rather than simply crashing Valgrind. I did this to handle code which tries to see if the CPU has a certain instruction by just running it and catching the SIGILL. J |