Mir

gdb mir_demo_server_shell takes a very long time to start (over a minute)

Bug #1352772 reported by Daniel van Vugt
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Expired
Medium
Unassigned

Bug Description

I can't run mir_demo_server_shell under gdb any more. gdb just hangs :(

$ sudo gdb bin/mir_demo_server_shell
...
Reading symbols from bin/mir_demo_server_shell...done.
(gdb) run
Starting program: /home/dan/bzr/mir/hang/build/bin/mir_demo_server_shell
Got object file from memory but can't read symbols: File truncated.

Update: It starts eventually! You just have to wait a minute or two. So that's still a bug.

summary: - Can't run mir_demo_server_shell under gdb any more
+ gdb mir_demo_server_shell takes a very long time to start (over a
+ minute)
description: updated
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

This happens when using gdb on an executable that is built without optimizations (the default for our builds). A workaround is to build with optimization flags, for instance enabling the debian build flags (cmake -Duse_debflags=true).

No idea why this is happening but gdb seems to be spending a lot of time in:

#0 0x00000000006a4b70 in bfd_seek ()
#1 0x00000000006aa540 in _bfd_generic_get_section_contents ()
#2 0x00000000006be86b in ?? ()
#3 0x00000000006d5184 in _bfd_elf_get_synthetic_symtab ()
#4 0x00000000006be32a in ?? ()
#5 0x0000000000506d41 in ?? ()
#6 0x000000000057a829 in ?? ()
#7 0x000000000057a3f8 in ?? ()
#8 0x0000000000679049 in solib_read_symbols ()
#9 0x00000000006794e8 in solib_add ()
#10 0x0000000000679973 in handle_solib_event ()

I don't think this is bug is caused by Mir, probably a gdb or gcc/ld bug.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Built without optimizations? More like built *with* large amounts of debug symbols?

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> Built without optimizations? More like built *with* large amounts of debug symbols?

Optimizations do indeed reduce the numbers of symbols in the final executable. However, stripping the libraries and executables doesn't fix the problem, which it should if this were just a matter of slow symbol processing. Optimizations also significantly reduce the number of relocations needed, so one possibility is that there is a regression in relocation processing (not sure how gdb deals with them).

Changed in mir:
importance: Undecided → Medium
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

I am not able to reproduce this issue any more, gdb loads and runs the program (built without any optimizations, i.e., our default built) quickly for me now.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I don't think this happens currently (and was probably a tooling problem not a Mir problem)

Changed in mir:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Mir because there has been no activity for 60 days.]

Changed in mir:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.