Bug 640634

Summary: gdb is too resource hungry
Product: [Fedora] Fedora Reporter: Michal Hlavinka <mhlavink>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: jan.kratochvil, pmuldoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-7.2-23.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-28 06:07:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Hlavinka 2010-10-06 14:00:59 UTC
Description of problem:
I've got plasma-desktop crash catched by abrt, but when gdb was generating backtrace, it ate 3.5 GB ram which woke up oom killer.

Version-Release number of selected component (if applicable):
gdb-7.2-16.fc14.x86_64

How reproducible:
always

Steps to Reproduce:
0.debuginfo-install kdebase-workspace-4.5.2-1.fc14.x86_64 (I have kde* packages directly from koji)
1.gdb -core coredump
vsz=428MB, rss=201MB
2.use commands abrt uses for generating backtrace (I'll provide them later, because I'll have to ask abrt's maintainer)

  
Actual results:
gdb consumes 3.3 GB (vsz) and 2.68 GB (rsz)

Expected results:
less occupied memory

Additional info:

Comment 2 Jan Kratochvil 2010-10-06 16:07:35 UTC
#14 in lookup_symbol_global (name=0xb652c4 "char", block=<value optimized out>, domain=VAR_DOMAIN) at ../../gdb/symtab.c:1448

It is the known problem of regression by the .gdb_index acceleration.
Tom Tromey is preparing .gdb_index version 3.

Comment 3 Jan Kratochvil 2010-10-12 16:31:47 UTC
Tom has already checked it in, I missed that:
  FYI: index pre-expansion fix
  http://sourceware.org/ml/gdb-patches/2010-09/msg00452.html
  http://sourceware.org/ml/gdb-cvs/2010-09/msg00165.html

Comment 4 Jan Kratochvil 2010-10-12 16:33:25 UTC
Resource allocation after loading a core file + symbols:
VSZ=2563128 RSS=2323944
->
VSZ= 592284 RSS= 396856

Comment 5 Fedora Update System 2010-10-13 02:55:22 UTC
gdb-7.2-22.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gdb-7.2-22.fc14

Comment 6 Fedora Update System 2010-10-13 06:10:30 UTC
gdb-7.2-22.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gdb'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/gdb-7.2-22.fc14

Comment 7 Fedora Update System 2010-10-14 15:42:41 UTC
gdb-7.2-23.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gdb-7.2-23.fc14

Comment 8 Fedora Update System 2010-10-28 06:07:01 UTC
gdb-7.2-23.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.