Bug 636969 - Traceback in "heap" command when attached to gedit
Traceback in "heap" command when attached to gedit
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: gdb-heap (Show other bugs)
14
All Linux
low Severity medium
: ---
: ---
Assigned To: Dave Malcolm
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-23 15:39 EDT by Dave Malcolm
Modified: 2010-09-23 17:48 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-23 17:48:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dave Malcolm 2010-09-23 15:39:14 EDT
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 16:38:11 EDT
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.