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 gdb/17557] Very slow load due to millions of identical lseek syscalls opening shared libs


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

--- Comment #2 from Tim Jones <tim@mr-dog.net> ---
I've just build a debug gdb with:

./configure \
    --prefix=$HOME/apps/gdb.debug \
    --with-build-config='bootstrap-debug' \
    --with-lzma

Full backtrace at the same repeating point is:

#0  0x000000314c8f4bb0 in lseek64 () from /lib64/libc.so.6
#1  0x000000314c876596 in __GI__IO_file_seekoff () from /lib64/libc.so.6
#2  0x000000314c8750d7 in fseeko64 () from /lib64/libc.so.6
#3  0x000000000079ee93 in real_fseek (file=0x125ed30, offset=25633575,
whence=0) at bfdio.c:59
#4  0x000000000079fd4d in cache_bseek (abfd=0xfcdef0, offset=25633575,
whence=0) at cache.c:272
#5  0x000000000079f2a9 in bfd_seek (abfd=0xfcdef0, position=25633575,
direction=0) at bfdio.c:325
#6  0x00000000007a79ae in _bfd_generic_get_section_contents (abfd=0xfcdef0,
section=0x1277eb0, location=0x7fffffffbdc0, offset=55, count=4) at libbfd.c:882
#7  0x00000000007aa8b1 in bfd_get_section_contents (abfd=0xfcdef0,
section=0x1277eb0, location=0x7fffffffbdc0, offset=55, count=4) at
section.c:1578
#8  0x00000000007cad3a in elf_x86_64_plt_sym_val (i=21, plt=0x1277eb0,
rel=0x5d29910) at elf64-x86-64.c:5325
#9  0x00000000007e8024 in _bfd_elf_get_synthetic_symtab (abfd=0xfcdef0,
symcount=257408, syms=0x7ffff07a4010, dynsymcount=140294, dynsyms=0x5c17620,
ret=0x7fffffffc008) at elf.c:10077
#10 0x00000000007caf9d in elf_x86_64_get_synthetic_symtab (abfd=0xfcdef0,
symcount=257408, syms=0x7ffff07a4010, dynsymcount=140294, dynsyms=0x5c17620,
ret=0x7fffffffc008) at elf64-x86-64.c:5407
#11 0x0000000000542fcb in elf_read_minimal_symbols (objfile=0x1353900,
symfile_flags=8, ei=0x7fffffffc0a0) at elfread.c:1199
#12 0x000000000054311f in elf_symfile_read (objfile=0x1353900, symfile_flags=8)
at elfread.c:1266
#13 0x00000000005db85d in read_symbols (objfile=0x1353900, add_flags=8) at
symfile.c:875
#14 0x00000000005dbe58 in syms_from_objfile_1 (objfile=0x1353900,
addrs=0x135c1a0, add_flags=8) at symfile.c:1078
#15 0x00000000005dbe9b in syms_from_objfile (objfile=0x1353900,
addrs=0x135c1a0, add_flags=8) at symfile.c:1094
#16 0x00000000005dc093 in symbol_file_add_with_addrs (abfd=0xfcdef0,
name=0x103d200
"/build/branches/tim-jones/super-portion.release.impl/gnu/so/lib/libdedupe_ut.so",
add_flags=8, addrs=0x135c1a0, flags=2, parent=0x0) at symfile.c:1191
#17 0x00000000005dc288 in symbol_file_add_from_bfd (abfd=0xfcdef0,
name=0x103d200
"/build/branches/tim-jones/super-portion.release.impl/gnu/so/lib/libdedupe_ut.so",
add_flags=8, addrs=0x135c1a0, flags=2, parent=0x0) at symfile.c:1280
#18 0x00000000007418ed in solib_read_symbols (so=0x103cff0, flags=8) at
solib.c:636
#19 0x0000000000741fbf in solib_add (pattern=0x0, from_tty=0, target=0xd306c0
<current_target>, readsyms=1) at solib.c:954
#20 0x0000000000742715 in handle_solib_event () at solib.c:1270
#21 0x000000000057dcf0 in bpstat_stop_status (aspace=0xeab5e0,
bp_addr=211732674918, ptid=..., ws=0x7fffffffc6b0) at breakpoint.c:5543
#22 0x00000000005fc163 in handle_signal_stop (ecs=0x7fffffffc690) at
infrun.c:4375
#23 0x00000000005fb67b in handle_inferior_event (ecs=0x7fffffffc690) at
infrun.c:4052
#24 0x00000000005f9a0c in fetch_inferior_event (client_data=0x0) at
infrun.c:3203
#25 0x000000000061d02b in inferior_event_handler (event_type=INF_REG_EVENT,
client_data=0x0) at inf-loop.c:57
#26 0x00000000004bb392 in handle_target_event (error=0, client_data=0x0) at
linux-nat.c:4446
#27 0x000000000061adbf in handle_file_event (data=...) at event-loop.c:762
#28 0x000000000061a2a6 in process_event () at event-loop.c:339
#29 0x000000000061a348 in gdb_do_one_event () at event-loop.c:391
#30 0x000000000061a3bd in start_event_loop () at event-loop.c:428
#31 0x000000000061be26 in cli_command_loop (data=0x0) at event-top.c:181
#32 0x00000000006121ba in current_interp_command_loop () at interps.c:317
#33 0x0000000000613382 in captured_command_loop (data=0x0) at main.c:321
#34 0x000000000060f07f in catch_errors (func=0x613367 <captured_command_loop>,
func_args=0x0, errstring=0x901d2e "", mask=RETURN_MASK_ALL) at exceptions.c:237
#35 0x0000000000614880 in captured_main (data=0x7fffffffcb60) at main.c:1149
#36 0x000000000060f07f in catch_errors (func=0x61377f <captured_main>,
func_args=0x7fffffffcb60, errstring=0x901d2e "", mask=RETURN_MASK_ALL) at
exceptions.c:237
#37 0x00000000006148a9 in gdb_main (args=0x7fffffffcb60) at main.c:1157
#38 0x000000000045f7f4 in main (argc=11, argv=0x7fffffffcc68) at gdb.c:32
#39 0x000000314c821d65 in __libc_start_main () from /lib64/libc.so.6
#40 0x000000000045f6e9 in _start ()

-- 
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]