This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug fortran/17989] gdb hangs on some Fortran stack frames
- From: "tom.k.cook at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 17 Feb 2015 05:46:03 +0000
- Subject: [Bug fortran/17989] gdb hangs on some Fortran stack frames
- Auto-submitted: auto-generated
- References: <bug-17989-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17989
--- Comment #1 from Tom Cook <tom.k.cook at gmail dot com> ---
Here is a stack trace from interrupting GDB while it is hung:
#0 0x00007ffff705cca3 in __pread_nocancel () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00000000004a2532 in linux_proc_xfer_partial (ops=0xc9f4b0, annex=0x0,
writebuf=0x0,
xfered_len=0x7fffffffd568, len=109888164, offset=31738864,
readbuf=0x7fffe45439ec "ies/GHMathUtilities/ghtypes.hpp",
object=TARGET_OBJECT_MEMORY)
at ../../gdb/linux-nat.c:3890
#2 linux_xfer_partial (ops=0xc9f4b0, object=TARGET_OBJECT_MEMORY, annex=0x0,
readbuf=0x7fffe45439ec "ies/GHMathUtilities/ghtypes.hpp", writebuf=0x0,
offset=31738864,
len=109888164, xfered_len=0x7fffffffd568) at ../../gdb/linux-nat.c:4157
#3 0x00000000004a3a23 in linux_nat_xfer_partial (ops=0xc9f4b0,
object=TARGET_OBJECT_MEMORY,
annex=0x0, readbuf=0x7fffe45439ec "ies/GHMathUtilities/ghtypes.hpp",
writebuf=<optimised out>,
offset=31738864, len=109888164, xfered_len=0x7fffffffd568) at
../../gdb/linux-nat.c:3748
#4 0x00000000005df192 in raw_memory_xfer_partial (ops=ops@entry=0xc10080
<thread_db_ops>,
readbuf=readbuf@entry=0x7fffe45439ec "ies/GHMathUtilities/ghtypes.hpp",
writebuf=writebuf@entry=0x0, memaddr=memaddr@entry=31738864, len=109888164,
xfered_len=xfered_len@entry=0x7fffffffd568) at ../../gdb/target.c:1075
#5 0x00000000005e0e76 in memory_xfer_partial_1 (ops=ops@entry=0xc10080
<thread_db_ops>,
object=object@entry=TARGET_OBJECT_MEMORY,
readbuf=readbuf@entry=0x7fffe45439ec "ies/GHMathUtilities/ghtypes.hpp",
writebuf=writebuf@entry=0x0, memaddr=memaddr@entry=31738864, len=<optimised
out>,
xfered_len=0x7fffffffd568) at ../../gdb/target.c:1206
#6 0x00000000005e1139 in memory_xfer_partial (xfered_len=0x7fffffffd568,
len=<optimised out>,
memaddr=31738864, writebuf=0x0, readbuf=0x7fffe45439ec
"ies/GHMathUtilities/ghtypes.hpp",
object=TARGET_OBJECT_MEMORY, ops=0xc10080 <thread_db_ops>) at
../../gdb/target.c:1233
#7 target_xfer_partial (ops=0xc10080 <thread_db_ops>,
object=object@entry=TARGET_OBJECT_MEMORY,
annex=annex@entry=0x0, readbuf=readbuf@entry=0x7fffe45439ec
"ies/GHMathUtilities/ghtypes.hpp",
writebuf=writebuf@entry=0x0, offset=offset@entry=31738864, len=109888164,
xfered_len=0x7fffffffd568) at ../../gdb/target.c:1309
#8 0x000000000056827f in read_value_memory (val=val@entry=0x2765080,
embedded_offset=embedded_offset@entry=0, stack=<optimised out>,
memaddr=memaddr@entry=31695380,
buffer=0x7fffe4539010 "DTBLADED.IN", length=109931648) at
../../gdb/valops.c:968
#9 0x000000000055f175 in value_fetch_lazy (val=0x2765080) at
../../gdb/value.c:3793
#10 0x000000000055f6ba in value_entirely_covered_by_range_vector
(value=0x2765080, ranges=0x2765100)
at ../../gdb/value.c:391
#11 0x00000000005711b1 in value_check_printable (val=val@entry=0x2765080,
stream=stream@entry=0x14b6320, options=0x7fffffffd710) at
../../gdb/valprint.c:809
#12 0x0000000000571596 in common_val_print (val=0x2765080,
stream=stream@entry=0x14b6320,
recurse=recurse@entry=2, options=options@entry=0x7fffffffd710,
language=language@entry=0x829040 <f_language_defn>) at
../../gdb/valprint.c:848
#13 0x00000000005a8252 in print_frame_arg (arg=arg@entry=0x7fffffffd790) at
../../gdb/stack.c:285
#14 0x00000000005a902a in print_frame_args (func=<optimised out>,
frame=frame@entry=0x672f020,
num=num@entry=-1, stream=0xdc7360) at ../../gdb/stack.c:673
#15 0x00000000005a9a37 in print_frame (frame=frame@entry=0x672f020,
print_level=print_level@entry=1,
print_what=print_what@entry=LOCATION, print_args=print_args@entry=1,
sal=...)
at ../../gdb/stack.c:1204
#16 0x00000000005a9f9f in print_frame_info (frame=frame@entry=0x672f020,
print_level=print_level@entry=1, print_what=print_what@entry=LOCATION,
print_args=print_args@entry=1, set_current_sal=set_current_sal@entry=0) at
../../gdb/stack.c:856
#17 0x00000000005aa284 in backtrace_command_1 (count_exp=count_exp@entry=0x0,
show_locals=0,
no_filters=0, from_tty=from_tty@entry=1) at ../../gdb/stack.c:1816
#18 0x00000000005aa79d in backtrace_command (arg=0x0, from_tty=1) at
../../gdb/stack.c:1913
#19 0x000000000067ab76 in execute_command (p=<optimised out>, p@entry=0xc30190
"bt", from_tty=1)
at ../../gdb/top.c:476
#20 0x00000000005b9505 in command_handler (command=0xc30190 "bt") at
../../gdb/event-top.c:494
#21 0x00000000005b9c07 in command_line_handler (rl=<optimised out>) at
../../gdb/event-top.c:692
#22 0x00000000006ca893 in rl_callback_read_char () at
../../readline/callback.c:220
#23 0x00000000005b9569 in rl_callback_read_char_wrapper (client_data=<optimised
out>)
#24 0x00000000005b95b3 in stdin_event_handler (error=<optimised out>,
client_data=0x0)
at ../../gdb/event-top.c:432
#25 0x00000000005b84e2 in gdb_wait_for_event (block=block@entry=1) at
../../gdb/event-loop.c:772
#26 0x00000000005b8699 in gdb_do_one_event () at ../../gdb/event-loop.c:309
#27 0x00000000005b87de in start_event_loop () at ../../gdb/event-loop.c:334
#28 0x00000000005b26b3 in captured_command_loop (data=data@entry=0x0) at
../../gdb/main.c:321
#29 0x00000000005afc35 in catch_errors (func=func@entry=0x5b26a0
<captured_command_loop>,
func_args=func_args@entry=0x0, errstring=errstring@entry=0x7948d2 "",
mask=mask@entry=RETURN_MASK_ALL) at ../../gdb/exceptions.c:237
#30 0x00000000005b3196 in captured_main (data=data@entry=0x7fffffffde60) at
../../gdb/main.c:1149
#31 0x00000000005afc35 in catch_errors (func=func@entry=0x5b2b00
<captured_main>,
func_args=func_args@entry=0x7fffffffde60,
errstring=errstring@entry=0x7948d2 "",
mask=mask@entry=RETURN_MASK_ALL) at ../../gdb/exceptions.c:237
#32 0x00000000005b3a8b in gdb_main (args=args@entry=0x7fffffffde60) at
../../gdb/main.c:1157
#33 0x000000000045f205 in main (argc=<optimised out>, argv=<optimised out>) at
../../gdb/gdb.c:32
This is from gdb latest as of a few hours ago. After a little exploration, the
problem seems to be at frame #9 above, in value_fetch_lazy. 'val' has the
following value:
(gdb) print *val
$13 = {lval = lval_memory, modifiable = 1, lazy = 1, initialized = 1, stack
= 0, released = 0,
regnum = -1, location = {address = 31695380, internalvar = 0x1e3a214,
xm_worker = 0x1e3a214,
computed = {funcs = 0x1e3a214, closure = 0x0}}, offset = 0, bitsize =
0, bitpos = 0,
reference_count = 1, parent = 0x0, frame_id = {stack_addr = 0, code_addr
= 0, special_addr = 0,
stack_status = FID_STACK_INVALID, code_addr_p = 0, special_addr_p = 0,
artificial_depth = 0},
type = 0x68b7c40, enclosing_type = 0x68b7c40, embedded_offset = 0,
pointed_to_offset = 0,
next = 0x2764fd0, contents = 0x7fffe4539010 "DTBLADED.IN", unavailable =
0x0, optimized_out = 0x0}
Line 3790 gets a type for val:
struct type *type = check_typedef (value_enclosing_type (val));
and line 3793 calls read_value_memory:
read_value_memory (val, 0, value_stack (val),
addr, value_contents_all_raw (val),
TYPE_LENGTH (type));
Stepping down into read_value_memory, the value of 'length', obtained using
TYPE_LENGTH(type), is:
(gdb) print length
$14 = 109931648
which seems... unlikely.
--
You are receiving this mail because:
You are on the CC list for the bug.