public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/17681] New: Huge memory leak when using tab completion
@ 2014-12-05 16:15 hadess at hadess dot net
  2014-12-07 18:55 ` [Bug gdb/17681] " xdje42 at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hadess at hadess dot net @ 2014-12-05 16:15 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 17681
           Summary: Huge memory leak when using tab completion
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: hadess at hadess dot net

Using gdb-7.8.1-32.fc21.x86_64

I loaded up a GNOME application which ended up crashing in gdb, printed a
variable ("p priv"), then tried to print the contents of that struct, but
typo'ed. I typed "p priv-" followed by 2 tabs, instead of "p priv->" follow by
2 tabs.

The memory usage ballooned from 1.5GB or resident RAM to more than 3GB.

[99163.091566] Out of memory: Kill process 28369 (gdb) score 443 or sacrifice
child
[99163.091687] Killed process 28369 (gdb) total-vm:4576768kB,
anon-rss:3537952kB, file-rss:0kB

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/17681] Huge memory leak when using tab completion
  2014-12-05 16:15 [Bug gdb/17681] New: Huge memory leak when using tab completion hadess at hadess dot net
@ 2014-12-07 18:55 ` xdje42 at gmail dot com
  2014-12-07 22:00 ` hadess at hadess dot net
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: xdje42 at gmail dot com @ 2014-12-07 18:55 UTC (permalink / raw)
  To: gdb-prs

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

Doug Evans <xdje42 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xdje42 at gmail dot com

--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
I suspect this is not a "leak" per se, but rather just gdb's horrendously bad
support for tab-completion.

The hypothesis is that gdb is reading and expanding all debug information -->
boom.
The "-", I think, triggers a search for all symbols.

There is a patch in the works to limit the damage.
https://sourceware.org/ml/gdb-patches/2014-11/msg00685.html
Beyond that, there is still more gdb can do to be smarter here, but at least
memory usage won't explode.

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/17681] Huge memory leak when using tab completion
  2014-12-05 16:15 [Bug gdb/17681] New: Huge memory leak when using tab completion hadess at hadess dot net
  2014-12-07 18:55 ` [Bug gdb/17681] " xdje42 at gmail dot com
@ 2014-12-07 22:00 ` hadess at hadess dot net
  2015-01-05 19:12 ` [Bug gdb/17681] Tab completion needs better throttling dje at google dot com
  2022-04-08  2:04 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: hadess at hadess dot net @ 2014-12-07 22:00 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Bastien Nocera <hadess at hadess dot net> ---
Doug, I wrongly labelled the bug, it is indeed "normal" just not one bit
efficient. Feel free to retitle.

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/17681] Tab completion needs better throttling
  2014-12-05 16:15 [Bug gdb/17681] New: Huge memory leak when using tab completion hadess at hadess dot net
  2014-12-07 18:55 ` [Bug gdb/17681] " xdje42 at gmail dot com
  2014-12-07 22:00 ` hadess at hadess dot net
@ 2015-01-05 19:12 ` dje at google dot com
  2022-04-08  2:04 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: dje at google dot com @ 2015-01-05 19:12 UTC (permalink / raw)
  To: gdb-prs

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

dje at google dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dje at google dot com
            Summary|Huge memory leak when using |Tab completion needs better
                   |tab completion              |throttling

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/17681] Tab completion needs better throttling
  2014-12-05 16:15 [Bug gdb/17681] New: Huge memory leak when using tab completion hadess at hadess dot net
                   ` (2 preceding siblings ...)
  2015-01-05 19:12 ` [Bug gdb/17681] Tab completion needs better throttling dje at google dot com
@ 2022-04-08  2:04 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2022-04-08  2:04 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |tromey at sourceware dot org
         Resolution|---                         |FIXED

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
I think we have completion throttling now.
See "set max-completions"

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-08  2:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-05 16:15 [Bug gdb/17681] New: Huge memory leak when using tab completion hadess at hadess dot net
2014-12-07 18:55 ` [Bug gdb/17681] " xdje42 at gmail dot com
2014-12-07 22:00 ` hadess at hadess dot net
2015-01-05 19:12 ` [Bug gdb/17681] Tab completion needs better throttling dje at google dot com
2022-04-08  2:04 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).