Bug 636969

Summary: Traceback in "heap" command when attached to gedit
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: gdb-heapAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: dmalcolm
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-23 21:48:28 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 Dave Malcolm 2010-09-23 19:39:14 UTC
Description of problem:
$ gedit&
$ gdb attach $(pidof -x gedit)
(gdb) heap
Blocks retrieved 10000
Blocks retrieved 20000
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
Blocks analyzed 10000
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
Blocks analyzed 20000
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
couldn't categorize pyop:
Traceback (most recent call last):
  File "/usr/share/gdb-heap/heap/commands.py", line 34, in g
    return f(self, args, from_tty)
  File "/usr/share/gdb-heap/heap/commands.py", line 90, in invoke
    t.write(sys.stdout)
  File "/usr/share/gdb-heap/heap/__init__.py", line 264, in write
    colwidths = self._calc_col_widths()
  File "/usr/share/gdb-heap/heap/__init__.py", line 276, in _calc_col_widths
    result.append(self._calc_col_width(colIndex))
  File "/usr/share/gdb-heap/heap/__init__.py", line 280, in _calc_col_width
    cells = [str(row[idx]) for row in self.rows]
UnicodeEncodeError: 'ascii' codec can't encode character u'\u029b' in position 1: ordinal not in range(128)
Error occurred in Python command: 'ascii' codec can't encode character u'\u029b' in position 1: ordinal not in range(128)


Version-Release number of selected component (if applicable):
$ rpm -q gdb gdb-heap glibc gedit python
gdb-7.2-7.fc14.x86_64
gdb-heap-0.5-1.fc14.x86_64
glibc-2.12.90-10.x86_64
gedit-2.30.3-1.fc14.x86_64
python-2.7-7.fc14.x86_64

How reproducible:
100%

Steps to Reproduce:
as above
  
Actual results:
as above

Expected results:
Analysis of memory usage, with no traceback and no errors messages.

Additional info:

Comment 1 Dave Malcolm 2010-09-23 20:38:11 UTC
Root cause was that the python code was falsely matching various blocks of RAM.

Fixed upstream in:
http://git.fedorahosted.org/git/?p=gdb-heap.git;a=commitdiff;h=71cd1516dfb106f9ffd38c1f5cf5f457e6e4367c