This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug mi/16565] New: SIGSEGV in find_pc_sect_psymtab


https://sourceware.org/bugzilla/show_bug.cgi?id=16565

            Bug ID: 16565
           Summary: SIGSEGV in find_pc_sect_psymtab
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: arnetheduck at gmail dot com

I'm debugging an application through Eclipse on Linux x86_64. When the
application is paused, I get the following SIGSEGV 4 out of 5 times.

I got the backtrace by attaching gdb to to the gdb launched by Eclipse.

In the log window, I see the following being the last ocmmand executed:

613,801 28-list-thread-groups i1

I'm running GNU gdb (Gentoo 7.7 vanilla) 7.7


Backtrace:

Thread 1 (Thread 0x7f07946ee700 (LWP 18458)):
#0  find_pc_sect_psymtab (msymbol=0x0, section=0x0, pc=21149632,
objfile=0x75962f0) at psymtab.c:360
        pst = 0x108a2c600
#1  find_pc_sect_symtab_from_partial (objfile=0x75962f0, msymbol=0x0,
pc=21149632, section=0x0, warn_if_readin=1) at psymtab.c:380
No locals.
#2  0x000000000055edc8 in find_pc_sect_symtab (pc=21149632, section=0x0) at
symtab.c:2227
        result = <optimized out>
        b = <optimized out>
        bv = <optimized out>
        s = 0x0
        best_s = 0x0
        objfile = 0x75962f0
        distance = 0
        msymbol = 0x0
#3  0x000000000055b49d in blockvector_for_pc_sect (pc=pc@entry=21149632,
section=section@entry=0x0, pblock=pblock@entry=0x7fffb769b3f8,
symtab=symtab@entry=0x0) at block.c:168
        bl = <optimized out>
        b = <optimized out>
#4  0x000000000055b5d0 in block_for_pc_sect (pc=pc@entry=21149632,
section=section@entry=0x0) at block.c:246
        bl = <optimized out>
        b = 0x5c8a45 <lookup_minimal_symbol_by_pc_section+37>
#5  0x0000000000518d19 in find_pc_sect_function (pc=pc@entry=21149632,
section=section@entry=0x0) at blockframe.c:139
        b = <optimized out>
#6  0x0000000000558f9d in build_address_symbolic
(gdbarch=gdbarch@entry=0x235bd20, addr=addr@entry=21149632,
do_demangle=do_demangle@entry=1, name=name@entry=0x7fffb769b4e0,
offset=offset@entry=0x7fffb769b4d8, 
    filename=filename@entry=0x7fffb769b4e8, line=line@entry=0x7fffb769b4dc,
unmapped=unmapped@entry=0x7fffb769b4d4) at ./printcmd.c:665
        msymbol = 0x0
        symbol = <optimized out>
        name_location = 0
        section = 0x0
        name_temp = 0x73450e ""
#7  0x0000000000559288 in print_address_symbolic
(gdbarch=gdbarch@entry=0x235bd20, addr=addr@entry=21149632,
stream=stream@entry=0x74c2c80, do_demangle=do_demangle@entry=1,
leadin=leadin@entry=0x782450 " ")
    at ./printcmd.c:584
        name = 0x0
        filename = 0x0
        unmapped = 0
        offset = 0
        line = 0
        cleanup_chain = 0x773e40 <sentinel_cleanup>
#8  0x000000000055a6cd in print_address_demangle
(opts=opts@entry=0x7fffb769b6a0, gdbarch=gdbarch@entry=0x235bd20,
addr=addr@entry=21149632, stream=stream@entry=0x74c2c80, do_demangle=1) at
./printcmd.c:792
No locals.
#9  0x00000000006405a2 in c_val_print (type=<optimized out>, valaddr=0x74c2d10
"\300\267B\001", embedded_offset=<optimized out>, address=<optimized out>,
stream=0x74c2c80, recurse=2, original_value=0x70da840, 
    options=0x7fffb769b6a0) at c-valprint.c:286
        want_space = 0
        gdbarch = 0x235bd20
        byte_order = <optimized out>
        i = 0
        len = <optimized out>
        elttype = <optimized out>
        unresolved_elttype = 0x280f400
        unresolved_type = <optimized out>
        eltlen = <optimized out>
        addr = 21149632
#10 0x000000000055300b in val_print (type=0x3216470,
valaddr=valaddr@entry=0x74c2d10 "\300\267B\001",
embedded_offset=embedded_offset@entry=0, address=address@entry=140737488344792, 
    stream=stream@entry=0x74c2c80, recurse=recurse@entry=2,
val=val@entry=0x70da840, options=options@entry=0x7fffb769b7c0,
language=language@entry=0x7c0600 <cplus_language_defn>) at valprint.c:790
        except = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
        ret = <optimized out>
        local_opts = {prettyformat = Val_no_prettyformat, prettyformat_arrays =
0, prettyformat_structs = 0, vtblprint = 0, unionprint = 1, addressprint = 1,
objectprint = 1, print_max = 200, 
          repeat_count_threshold = 10, output_format = 0, format = 0,
stop_print_at_null = 0, print_array_indexes = 0, deref_ref = 1,
static_field_print = 1, pascal_static_field_print = 1, raw = 0, 
          summary = 1, symbol_print = 1}
        real_type = 0x3216470
#11 0x0000000000553167 in common_val_print (val=0x70da840,
stream=stream@entry=0x74c2c80, recurse=recurse@entry=2,
options=options@entry=0x7fffb769b7c0, language=language@entry=0x7c0600
<cplus_language_defn>)
    at valprint.c:861
No locals.
#12 0x0000000000587faf in print_frame_arg (arg=arg@entry=0x7fffb769b840) at
stack.c:290
        language = 0x7c0600 <cplus_language_defn>
        opts = {prettyformat = Val_no_prettyformat, prettyformat_arrays = 0,
prettyformat_structs = 0, vtblprint = 0, unionprint = 1, addressprint = 1,
objectprint = 1, print_max = 200, 
          repeat_count_threshold = 10, output_format = 0, format = 0,
stop_print_at_null = 0, print_array_indexes = 0, deref_ref = 1,
static_field_print = 1, pascal_static_field_print = 1, raw = 0, 
          summary = 1, symbol_print = 1}
        uiout = 0x2295c00
        except = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
        old_chain = 0x86fd710
        stb = 0x74c2c80
        __PRETTY_FUNCTION__ = "print_frame_arg"
#13 0x0000000000588cb1 in print_frame_args (func=<optimized out>,
frame=frame@entry=0x9364340, num=num@entry=-1, stream=0x2334d40) at stack.c:675
        arg = {sym = 0x34f2a80, val = 0x70da840, error = 0x0, entry_kind =
0x78e1ee <print_entry_values_no> "no"}
        entryarg = {sym = 0x34f2a80, val = 0x0, error = 0x0, entry_kind =
0x78e1ee <print_entry_values_no> "no"}
        b = 0x34f2b60
        iter = {d = {symtab = 0x34f2b60, block = 0x34f2b60}, idx = -1, which =
FIRST_LOCAL_BLOCK, dict_iter = {dict = 0x34f2b90, index = 0, current =
0x2295c00}}
        sym = 0x34f2a80
        uiout = 0x2295c00
        first = 1
        highest_offset = -1
        args_printed = 0
        old_chain = 0x773e40 <sentinel_cleanup>
        stb = <optimized out>
        print_args = 1
        __PRETTY_FUNCTION__ = "print_frame_args"
#14 0x00000000005894c8 in print_frame (frame=frame@entry=0x9364340,
print_level=print_level@entry=1, print_what=print_what@entry=LOC_AND_ADDRESS,
print_args=print_args@entry=1, sal=...) at stack.c:1203
        gdbarch = <optimized out>
        numargs = -1
        args_list_chain = 0x87b0440
        e = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
        gdbarch = <optimized out>
        uiout = 0x2295c00
        funname = 0x88d1320 "java::util::Vector::addElement"
        funlang = language_cplus
        stb = <optimized out>
        old_chain = 0x773e40 <sentinel_cleanup>
        list_chain = 0x87df120
        opts = {prettyformat = Val_prettyformat_default, prettyformat_arrays =
0, prettyformat_structs = 0, vtblprint = 0, unionprint = 1, addressprint = 1,
objectprint = 1, print_max = 200, 
          repeat_count_threshold = 10, output_format = 0, format = 0,
stop_print_at_null = 0, print_array_indexes = 0, deref_ref = 0,
static_field_print = 1, pascal_static_field_print = 1, raw = 0, 
          summary = 0, symbol_print = 1}
        func = 0x34f29d0
        pc = 7064820
        pc_p = 1
#15 0x0000000000589839 in print_frame_info (frame=frame@entry=0x9364340,
print_level=print_level@entry=1, print_what=print_what@entry=LOC_AND_ADDRESS,
print_args=print_args@entry=1, 
    set_current_sal=set_current_sal@entry=0) at stack.c:855
        gdbarch = 0x23cf310
        sal = {pspace = 0x227b630, symtab = 0x33a8120, section = 0x0, line =
87, pc = 7064820, end = 7064830, explicit_pc = 0, explicit_line = 0, probe =
0x0}
        source_print = <optimized out>
        location_print = <optimized out>
        uiout = 0x2295c00
#16 0x0000000000589d27 in print_stack_frame (frame=0x9364340,
print_level=print_level@entry=1, print_what=LOC_AND_ADDRESS,
print_what@entry=LOCATION, set_current_sal=set_current_sal@entry=0) at
stack.c:170
        center = 0
        e = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
#17 0x000000000058edd3 in print_thread_info (uiout=uiout@entry=0x2295c00,
requested_threads=requested_threads@entry=0x0, pid=18475) at thread.c:929
        chain2 = 0x88e5240
        core = <optimized out>
        tp = 0x2ab6410
        current_ptid = {pid = 18475, lwp = 18475, tid = 0}
        old_chain = 0x23151a0
        extra_info = <optimized out>
        name = 0xb6f3c0 <line> "ControlExample"
        target_id = <optimized out>
        current_thread = 1
        __PRETTY_FUNCTION__ = "print_thread_info"
#18 0x00000000004d1d39 in mi_cmd_list_thread_groups (command=<optimized out>,
argv=0x2ab67e0, argc=<optimized out>) at ./mi/mi-main.c:929
        id = 1
        inf = <optimized out>
        uiout = 0x2295c00
        back_to = 0x214f110
        available = 0
        recurse = 0
        ids = 0x2341d50
        opts = {{name = 0x746f96 "-available", index = 0, arg_p = 0}, {name =
0x746fa1 "-recurse", index = 1, arg_p = 1}, {name = 0x0, index = 0, arg_p = 0}}
        oind = 1
        oarg = 0x0
#19 0x00000000004d3d19 in mi_cmd_execute (parse=0x28eeed0) at
./mi/mi-main.c:2215
        cleanup = 0x2150000
#20 captured_mi_execute_command (context=0x28eeed0, uiout=0x2295c00) at
./mi/mi-main.c:1950
        cleanup = 0x773e40 <sentinel_cleanup>
#21 mi_execute_command (cmd=0x754cb80 "28-list-thread-groups i1",
from_tty=<optimized out>) at ./mi/mi-main.c:2078
        result = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
        previous_ptid = {pid = 18475, lwp = 18475, tid = 0}
        token = 0x2348710 "28"
        command = 0x28eeed0
        exception = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
#22 0x00000000004cf40d in mi_execute_command_wrapper (cmd=<optimized out>) at
./mi/mi-interp.c:291
No locals.
#23 mi_execute_command_input_handler (cmd=<optimized out>) at
./mi/mi-interp.c:299
No locals.
#24 0x0000000000597ec3 in process_event () at event-loop.c:342
        event_ptr = <optimized out>
        proc = 0x597330 <handle_file_event>
        data = {ptr = 0x0, integer = 0}
#25 0x0000000000598217 in gdb_do_one_event () at event-loop.c:406
        event_source_head = 0
        current = 3
#26 0x0000000000598437 in start_event_loop () at event-loop.c:431
        ex = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
        result = 0
#27 0x0000000000591e03 in captured_command_loop (data=data@entry=0x0) at
main.c:267
No locals.
#28 0x000000000058ffba in catch_errors (func=func@entry=0x591df0
<captured_command_loop>, func_args=func_args@entry=0x0,
errstring=errstring@entry=0x73450e "", mask=mask@entry=RETURN_MASK_ALL)
    at exceptions.c:524
        val = 0
        exception = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
        saved_uiout = 0x2295c00
#29 0x0000000000592b9e in captured_main (data=data@entry=0x7fffb769bfc0) at
main.c:1067
        context = 0x7fffb769bfc0
        argc = <optimized out>
        argv = <optimized out>
        quiet = 0
        set_args = 0
        inhibit_home_gdbinit = 0
        symarg = 0x0
        execarg = 0x0
        pidarg = 0x0
        corearg = 0x0
        pid_or_core_arg = 0x0
        cdarg = 0x0
        ttyarg = 0x0
        print_help = 0
        print_version = 0
        print_configuration = 0
        cmdarg_vec = 0x0
        cmdarg_p = 0x0
        dirarg = 0x2150030
        dirsize = <optimized out>
        ndir = 0
        system_gdbinit = 0x0
        home_gdbinit = 0x0
        local_gdbinit = 0x0
        i = <optimized out>
        save_auto_load = <optimized out>
        objfile = <optimized out>
        pre_stat_chain = 0x773e40 <sentinel_cleanup>
#30 0x000000000058ffba in catch_errors (func=func@entry=0x5920e0
<captured_main>, func_args=func_args@entry=0x7fffb769bfc0,
errstring=errstring@entry=0x73450e "", mask=mask@entry=RETURN_MASK_ALL)
    at exceptions.c:524
        val = 0
        exception = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
        saved_uiout = 0xb67ce0 <def_uiout>
#31 0x0000000000593084 in gdb_main (args=args@entry=0x7fffb769bfc0) at
main.c:1076
No locals.
#32 0x0000000000453b0e in main (argc=<optimized out>, argv=<optimized out>) at
gdb.c:34
        args = {argc = 4, argv = 0x7fffb769c0c8, use_windows = 0, interpreter_p
= 0x7286a4 "console"}
A debugging session is active.

    Inferior 1 [process 18458] will be detached.

Quit anyway? (y or n) Detaching from program: /usr/bin/gdb, process 18458

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]