[Bug 674102] New: gdb crashes when investigating core of qemu-kvm
https://bugzilla.novell.com/show_bug.cgi?id=674102 https://bugzilla.novell.com/show_bug.cgi?id=674102#c0 Summary: gdb crashes when investigating core of qemu-kvm Classification: openSUSE Product: openSUSE 11.4 Version: Factory Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: rguenther@novell.com ReportedBy: jslaby@novell.com QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=415586) --> (http://bugzilla.novell.com/attachment.cgi?id=415586) bt full of crashed gdb This happens when I install qemu-kvm debuginfo: $ gdb qemu-kvm /cores/core.29060 GNU gdb (GDB) SUSE (7.2-2.8) 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 "x86_64-suse-linux". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/bin/qemu-kvm...Reading symbols from /usr/lib/debug/usr/bin/qemu-kvm.debug...Segmentation fault -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=674102
https://bugzilla.novell.com/show_bug.cgi?id=674102#c1
Richard Guenther
https://bugzilla.novell.com/show_bug.cgi?id=674102
https://bugzilla.novell.com/show_bug.cgi?id=674102#c2
Jiri Slaby
Do you still have the qemu core file?
Yes.
Is the core file produced with the same qemu version as you have the debug info installed for? (which version?)
Yes, I doublechecked at that time. It was a broken qemu build: kvm-debuginfo-0.14.0.rcX-2.1.x86_64 and kvm-0.14.0.rcX-2.1.x86_64 I still have the rpms (qemu is fixed in the factory but not built and distributed yet). I don't know how to check retrospectively if the core and the qemu-kvm from the rcX package correspond to each other... All available at: http://labs.suse.cz/jslaby/bug-674102/ after it syncs. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=674102
https://bugzilla.novell.com/show_bug.cgi?id=674102#c3
--- Comment #3 from Richard Guenther
gdb --args /usr/bin/gdb /usr/bin/qemu-kvm core.29060 GNU gdb (GDB) SUSE (7.2.50.20110206-67.1) .. Reading symbols from /usr/bin/qemu-kvm...Reading symbols from /usr/lib/debug/usr/bin/qemu-kvm.debug... Program received signal SIGSEGV, Segmentation fault. 0x00007ffff67f17e2 in __strlen_sse2 () from /lib64/libc.so.6 (gdb) up #1 0x0000000000541967 in allocate_psymtab (filename=0x0, objfile=0xe4b530) at ../../gdb/psymtab.c:1605 1605 psymtab->filename = obsavestring (filename, strlen (filename),
#2 0x0000000000541a87 in start_psymtab_common (objfile=0xe4b530, section_offsets=0xe26f80, filename=<optimized out>, textlow=0, global_syms=0xf57178, static_syms=0xf6d930) at ../../gdb/psymtab.c:1325 #3 0x00000000005af17c in process_psymtab_comp_unit (objfile=0xe4b530, this_cu=0xf20e00, buffer=0x7ffff5f7f033 "q", info_ptr=0x7ffff603b279 "\002\024)", buffer_size=<optimized out>) at ../../gdb/dwarf2read.c:3267 which reads /* Allocate a new partial symbol table structure. */ attr = dwarf2_attr (comp_unit_die, DW_AT_name, &cu); pst = start_psymtab_common (objfile, objfile->section_offsets, (attr != NULL) ? DW_STRING (attr) : "", /* TEXTLOW and TEXTHIGH are set below. */ 0, objfile->global_psymbols.next, objfile->static_psymbols.next); and appearantly DW_STRING (attr) is NULL. That's indeed odd. (gdb) p *comp_unit_die $16 = {tag = DW_TAG_compile_unit, num_attrs = 7 '\a', building_fullname = 0 '\000', abbrev = 1, offset = 770596, child = 0x0, sibling = 0x0, parent = 0x0, attrs = {{name = DW_AT_producer, form = DW_FORM_strp, string_is_canonical = 0, u = { str = 0x7ffff5e9dff3 "GNU C 4.5.1 20101208 [gcc-4_5-branch revision 167585]", blk = 0x7ffff5e9dff3, unsnd = 140737319133171, snd = 140737319133171, addr = 140737319133171, signatured_type = 0x7ffff5e9dff3}}}} (gdb) p comp_unit_die->attrs $17 = {{name = DW_AT_producer, form = DW_FORM_strp, string_is_canonical = 0, u = { str = 0x7ffff5e9dff3 "GNU C 4.5.1 20101208 [gcc-4_5-branch revision 167585]", blk = 0x7ffff5e9dff3, unsnd = 140737319133171, snd = 140737319133171, addr = 140737319133171, signatured_type = 0x7ffff5e9dff3}}} (gdb) p comp_unit_die->attrs[1] $18 = {name = DW_AT_language, form = DW_FORM_data1, string_is_canonical = 0, u = {str = 0x1
, blk = 0x1, unsnd = 1, snd = 1, addr = 1, signatured_type = 0x1}} (gdb) p comp_unit_die->attrs[2] $19 = {name = DW_AT_name, form = DW_FORM_strp, string_is_canonical = 0, u = { str = 0x0, blk = 0x0, unsnd = 0, snd = 0, addr = 0, signatured_type = 0x0}} (gdb) p comp_unit_die->attrs[3] $20 = {name = DW_AT_comp_dir, form = DW_FORM_strp, string_is_canonical = 0, u = {str = 0x7ffff5ea8d21 "/usr/src/debug/qemu-kvm-0.14.0", blk = 0x7ffff5ea8d21, unsnd = 140737319177505, snd = 140737319177505, addr = 140737319177505, signatured_type = 0x7ffff5ea8d21}} (gdb) p comp_unit_die->attrs[4] $21 = {name = DW_AT_low_pc, form = DW_FORM_addr, string_is_canonical = 1, u = { str = 0x473990 "", blk = 0x473990, unsnd = 4667792, snd = 4667792, addr = 4667792, signatured_type = 0x473990}} Which seems to be this entry: <0><bc224>: Abbrev Number: 1 (DW_TAG_compile_unit) <bc225> DW_AT_producer : (indirect string, offset: 0x29): GNU C 4.5.1 2 0101208 [gcc-4_5-branch revision 167585] <bc229> DW_AT_language : 1 (ANSI C) <bc22a> DW_AT_name : (indirect string, offset: 0x33dd7): <bc22e> DW_AT_comp_dir : (indirect string, offset: 0xad57): /usr/src/de bug/qemu-kvm-0.14.0 <bc232> DW_AT_low_pc : 0x473990 <bc23a> DW_AT_high_pc : 0x4769b3 <bc242> DW_AT_stmt_list : 0x1f440 it would be interesting to know which source this is from (well, the information telling us this is '\0' ;)). but we have some hints at least from the list of variables and functions which include vga_putcharxy, update_xy, console_show_cursor, console_clear_xy, text_console_update, ... and qemu_create_displaysurface_from (declared on line 1315). gdb does static char * read_indirect_string (bfd *abfd, gdb_byte *buf, const struct comp_unit_head *cu_header, unsigned int *bytes_read_ptr) { .. if (dwarf2_per_objfile->str.buffer[str_offset] == '\0') return NULL; which then leads to DW_STRING being NULL: case DW_FORM_strp: DW_STRING (attr) = read_indirect_string (abfd, info_ptr, cu_header, &bytes_read); DW_STRING_IS_CANONICAL (attr) = 0; info_ptr += bytes_read; -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.https://bugzilla.novell.com/show_bug.cgi?id=674102
https://bugzilla.novell.com/show_bug.cgi?id=674102#c4
--- Comment #4 from Richard Guenther
https://bugzilla.novell.com/show_bug.cgi?id=674102
https://bugzilla.novell.com/show_bug.cgi?id=674102#c5
--- Comment #5 from Richard Guenther
https://bugzilla.novell.com/show_bug.cgi?id=674102
https://bugzilla.novell.com/show_bug.cgi?id=674102#c6
Richard Guenther
participants (1)
-
bugzilla_noreply@novell.com