Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Bug#529995: Backtrace and other debugging info

 
   Linux (Home) -> Bugs Dist RSS
Next:  value of returning positive error code from modul..  
Author Message
Jurij Smakov

External


Since: Aug 08, 2005
Posts: 125



(Msg. 1) Posted: Sat Jul 04, 2009 2:26 pm
Post subject: Bug#529995: Backtrace and other debugging info
Archived from groups: linux>debian>bugs>dist (more info?)

I've reproduced it on my sparc box and investigated the failure in the
compare.sh test. During it the following command fails:

root@debian:/tmp/grib-api-1.7.0# /tmp/grib-api-1.7.0/tools/.libs/lt-grib_compare -b indicatorOfParameter,paramId,shortName /tmp/grib-api-1.7.0/data/regular_latlon_surface.grib1 /tmp/grib-api-1.7.0/data/regular_latlon_surface.grib1.1
-- count=1 shortName=2d stepRange=0 levelType=sfc level=0 --
Bus error
root@debian:/tmp/grib-api-1.7.0# gdb /tmp/grib-api-1.7.0/tools/.libs/lt-grib_compare
GNU gdb 6.8-debian
Copyright (C) 2008 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 "sparc-linux-gnu"...
(gdb) set args -b indicatorOfParameter,paramId,shortName /tmp/grib-api-1.7.0/data/regular_latlon_surface.grib1 /tmp/grib-api-1.7.0/data/regular_latlon_surface.grib1.1
(gdb) run
Starting program: /tmp/grib-api-1.7.0/tools/.libs/lt-grib_compare -b indicatorOfParameter,paramId,shortName /tmp/grib-api-1.7.0/data/regular_latlon_surface.grib1 /tmp/grib-api-1.7.0/data/regular_latlon_surface.grib1.1
-- count=1 shortName=2d stepRange=0 levelType=sfc level=0 --

Program received signal SIGBUS, Bus error.
grib_decode_double_array (p=0x10757f "\"\"%� B\022�", bitp=0xffabce98, nbits=16, reference_value=<value optimized out>, s=0.0009765625, d=1, size=496,
val=0x13e0b8) at grib_bits.c:205
205 val[i]= val[i] * fact + bias ;
(gdb) list
200 startBit = 0;
201 pp++;
202 }
203
204 val[i]=VALUE(*pp,startBit,remainingBits);
205 val[i]= val[i] * fact + bias ;
206 startBit+=remainingBits;
207 remainingBits=nbits;
208 }
209
(gdb) bt
#0 grib_decode_double_array (p=0x10757f "\"\"%� B\022�", bitp=0xffabce98, nbits=16, reference_value=<value optimized out>, s=0.0009765625, d=1, size=496,
val=0x13e0b8) at grib_bits.c:205
#1 0xf7e5b2e8 in unpack_double (a=0x110ce8, val=0x13e0b8, len=0xffabcf8c) at grib_accessor_class_data_simple_packing.c:340
#2 0xf7e469e8 in grib_unpack_double (a=0x110ce8, v=0x13e0b8, len=0xffabcf8c) at grib_accessor.c:173
#3 0xf7e80cac in _grib_get_double_array_internal (h=0x107968, a=0x110ce8, val=0x13e0b8, buffer_len=496, decoded_length=0xffabd03c) at grib_value.c:591
#4 0x00011de0 in compare_values (h1=0x107968, h2=0x289e8, name=0xf43b0 "values") at grib_compare.c:329
#5 0x000127fc in grib_tool_new_handle_action (options=<value optimized out>, h=0x289e8) at grib_compare.c:485
#6 0x00013fd4 in grib_tool (argc=<value optimized out>, argv=<value optimized out>) at grib_tools.c:263
#7 0xf7b8bc58 in __libc_start_main () from /lib/libc.so.6
#8 0x00011758 in _start ()
(gdb) info reg pc
pc 0xf7e6d884 0xf7e6d884 <grib_decode_double_array+532>
(gdb) disass 0xf7e6d884
Dump of assembler code for function grib_decode_double_array:
[...]
0xf7e6d870 <grib_decode_double_array+512>: cmp %i2, 0x20
0xf7e6d874 <grib_decode_double_array+516>: sub %o5, %i5, %i4
0xf7e6d878 <grib_decode_double_array+520>: inc %g4
0xf7e6d87c <grib_decode_double_array+524>: be 0xf7e6d8e0 <grib_decode_double_array+624>
0xf7e6d880 <grib_decode_double_array+528>: mov %o7, %g3
0xf7e6d884 <grib_decode_double_array+532>: ld [ %i0 ], %g1
0xf7e6d888 <grib_decode_double_array+536>: sra %g1, %i4, %g1
0xf7e6d88c <grib_decode_double_array+540>: and %g3, %g1, %g1
0xf7e6d890 <grib_decode_double_array+544>: st %g1, [ %fp + -16 ]
0xf7e6d894 <grib_decode_double_array+548>: ld [ %fp + -16 ], %f14
0xf7e6d898 <grib_decode_double_array+552>: fitod %f14, %f8
0xf7e6d89c <grib_decode_double_array+556>: fmuld %f10, %f8, %f8
0xf7e6d8a0 <grib_decode_double_array+560>: faddd %f8, %f12, %f8
0xf7e6d8a4 <grib_decode_double_array+564>: std %f8, [ %o1 + %i3 ]
0xf7e6d8a8 <grib_decode_double_array+568>: cmp %o2, %g4
0xf7e6d8ac <grib_decode_double_array+572>: bleu 0xf7e6d824 <grib_decode_double_array+436>
0xf7e6d8b0 <grib_decode_double_array+576>: mov %g4, %g1
0xf7e6d8b4 <grib_decode_double_array+580>: cmp %i5, 0x20
0xf7e6d8b8 <grib_decode_double_array+584>: bne 0xf7e6d86c <grib_decode_double_array+508>
0xf7e6d8bc <grib_decode_double_array+588>: sll %g1, 3, %i3
0xf7e6d8c0 <grib_decode_double_array+592>: clr %i5
0xf7e6d8c4 <grib_decode_double_array+596>: add %i0, 4, %i0
0xf7e6d8c8 <grib_decode_double_array+600>: add %i5, %i2, %i5
0xf7e6d8cc <grib_decode_double_array+604>: cmp %i2, 0x20
0xf7e6d8d0 <grib_decode_double_array+608>: sub %o5, %i5, %i4
0xf7e6d8d4 <grib_decode_double_array+612>: inc %g4
0xf7e6d8d8 <grib_decode_double_array+616>: bne 0xf7e6d884 <grib_decode_double_array+532>
0xf7e6d8dc <grib_decode_double_array+620>: mov %o7, %g3
0xf7e6d8e0 <grib_decode_double_array+624>: b 0xf7e6d884 <grib_decode_double_array+532>
0xf7e6d8e4 <grib_decode_double_array+628>: mov %g2, %g3
End of assembler dump.
(gdb) info reg i0
i0 0x10757f 1078655
(gdb) print p
$1 = (const unsigned char *) 0x10757f "\"\"%� B\022�"
(gdb)

So, it looks like the value of pointer p passed to the
grib_decode_double_array is 0x10757f, so it's not word-aligned. Later it
is cast directly to a pointer to long (pp) without any concern about its
alignment. Attempt to read in the long from a location which is not
word-aligned will get a SIGBUS on any platform with strict alignment
requirements, and that's what happens here.

Best regards,
--
Jurij Smakov jurij DeleteThis @wooyd.org
Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Bug#365817: ITP: libmp4-info-perl -- Fetch info from MPEG-.. - Package: wnpp Severity: normal Owner: Michael Ablassmeier <abi@debian.org> * Package name : libmp4-info-perl Version : 1.07 Upstream Author : Jonathan Harris <jhar@cpan.org> URL : http://search.cpan.org/~jhar/ ...

Bug#364838: backtrace for xkb-data/libxklavier10 breakage .. - Package: libxklavier10 Version: 2.2-3 Followup-For: Bug #364838 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The last part of X.org's log under gdb, with the backtrace: The XKEYBOARD keymap compiler (xkbcomp) reports: > Warning: Type..

Bug#325598: debugging information - I've had trouble reproducing this on will: installing (& purging) the same font package twice gives the warnings only on the first install, so presumably dpkg --purge and the prerm/postrm scripts aren't completely reverting the system state. Looking...

Bug#323200: mozilla-browser: Moz segfaults on some pages. .. - Package: mozilla-browser Version: 2:1.7.11-1 Followup-For: Bug #323200 Hi, I'm pretty sure this is the same bug as the OP report. Here's how to reproduce with sid's Moz 1.7.11-1 browser: 1. Go to:..

Bug#333067: linux-image-k7: System unusable after reboot b.. - Package: linux-image-k7 Version: 2.6.12-10 Severity: critical Justification: breaks the whole system After updating udev a reboot resulted in a unusable system because rivafb was being loaded by udev/coldplug. rivafb is not usable, especially not when....
       Linux (Home) -> Bugs Dist All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact