Bug 636969 - Traceback in "heap" command when attached to gedit
Summary: Traceback in "heap" command when attached to gedit
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb-heap
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-23 19:39 UTC by Dave Malcolm
Modified: 2010-09-23 21:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-23 21:48:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.